SOAP client for Android

2019-06-09 17:19发布

问题:

I have faced up to building SOAP client for Android. I found out there is a ksoap2 lib from some posts, for example. But there is SAAJ (SOAP with Attachments API for Java) as well.

My question is: is it possible to use it? Has anyone ever tried SAAJ for Android apps?

Thx a lot.

回答1:

If the WSDL for your target service is not that complicated you should check out httpclient bundled with Android core libraries. It's trivial to use. You can trap request/response through SoapUI or Fiddler and then use them as base XML templates within your client.



回答2:

No, you can't use SAAJ for android unfortunately. It relies on the javax.xml package, which android won't work with.