开发者

Apache Axis web service clients vs plain SOAP requests

开发者 https://www.devze.com 2023-01-02 15:05 出处:网络
I\'m looking for the best way to consume a Java web service that returns rather large and complex objects.

I'm looking for the best way to consume a Java web service that returns rather large and complex objects.

I am currently using Apache Axis clients generated from the wsdl, (using eclipse "generate web service client" tool). We have concerns about performance of this. The service proxy objects are not thread safe, and they are rather heavy to instantiate, 2-3 MB on the JVM.

The other alternative is making HTTP connections and building a String SOAP requests. I would have to interpret the response, and build objects from the XML. Would this be a better alternative to the heavy axis objects?

I searched f开发者_StackOverflow中文版or good reading on this, if any one had any links I would greatly appreciate it.


In general, I found that through performance testing. Pure Soap requests are much more efficient that the ApacheAxis clients. The soap requests make it necessary for you to write your own XML parsing code, but in my case, I found the performance gains worth it.

0

精彩评论

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