开发者

Whats the best and most comprehencive SOAP library available with relation to querying not serving

My google-fu is not turning up very promising results for a SOAP library in java, mostly they are for setting up SOAP services where as I need to communicate WITH such a service.

I realise that SOAP is just a matter of building and parsing XML but ideally I would like object mapping and handling done transparently.

So far I have looked at Apache Axis and X-Fire (now Apache CXF) and both seem to deal more with serving SOAP services than actually working with SOAP services.

Could anyone guide me to any gems for dealing with SOAP or have per开发者_JS百科sonal experience dealing with SOAP services in Java.


The frameworks you mention do produce client code.
E.g. for CXF How-to-create-client
They do not only deploy a web service.They provide client code to consume it as well!
The idea is that you run the corresponding automatic tool (wsdl2java for CXF or wsimport shipped with Java for jax-ws) to parse the service's WSDL and the client stubs and required artifacts to communicate with the web service will be created.
Then in your code you use the client stubs to communicate with the web service while the marshall/demarshalling from XML to java types is handled transparently by the framework.
There is also JAX-WS you can look into and if you want something simple you can use SAAJ to send soap messages directly to the web service endpoint.
In the frameworks you mention you should look into the parts that refer to client stub generation and consuming web services


For querying a SOAP service, you can use an implementation of the JAX-WS standard such as Project Kenai or the default version included in JDK 6+.

This article shows a sample of setting up a SOAP client (as opposed to a server) using the standard. Given a WSDL, you should be able to use standard tools for your client. This is another example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜