问题
I'm developing a web service client that needs to execute operation exposed on tomcat with axis2. The client has all the wsdl files that are needed. I can't import them statically with netbeans or eclipse because the client needs to discover the wsdl at runtime (this has been already done) and then execute them in an fixed order... What should I do? My program is able to get those wsdl files but I don't know what to do with them... What should I use: jax-ws? jax-rpc?? Can you give me a link to a guide or something else??
Thank you in advance
回答1:
Depending on your stack you can write webservice clients using a variety of tools/framework/libraries. Such as Spring-WS, Apache CXF or JAX-WS RI. Take a look at some and you'll get a feeling how to consume webservices.
回答2:
What client platform/implementation and webservice rumtime do you intend to use on the client? For example if it is JAVA, you can use the RAD tooling from IBM or wsdl2java AXIS ant task to generate the java stubs. If it is MS platform, you can use Visual Studio tooling from MS to generate csharp stubs from the WSDL. Then you populate the objects to create the SOAP xml message format that your webservice provider expects.
回答3:
You might look into Dynamic Clients with Apache CXF, looks like it can do exactly what you're looking for.
来源:https://stackoverflow.com/questions/1109632/java-web-service-client