Reputation: 17765
Provided a WSDL I create a dynamic web service client. What I want is to expose the methods and the types of the parameters those methods have and test the code from a webpage. Bare in mind that the client is dynamic, so what I have to build must me able to work with different WSDLs.
What I want to do is what the Eclipse web service explorer does for testing a web service client from the provided user interface. How does it find the methods and the parameters? Does it parse the WSDL? I've searched for the source code, but I couldn't find anything relevant. I don't even know where to begin.
What I want is suggestions and some guidance of what I have to build, what is already provided out there (that I'm not aware obviously) and a place to begin. I'm not asking for code.
Upvotes: 3
Views: 1551
Reputation: 12221
Essentially creating a generic web services client would involve the following:
As a suggestion why not look at the SOAP UI project which is really great as a generic web service test client. As it is open source you might be able to learn how they do it. Go have a look at the project here
Also go look at the Apache CXF framework. This framework will allow you to easily create a webservice client. See this tutorial for more information: how to create a client in CXF. CXF is also usable via javascript so it might be what you are looking for see this link
I would suggest that you try leveraging these tools before you try to invent one yourself as parsing WSDL's and XSD while NOT difficult to parse it going to take a substantial programming effort. CXF already has this covered for you if I read your question right.
Upvotes: 3