开发者

Using KSOAP with Android. Problems with custom namespace

Here's my big trouble. I'm trying to invoke a specific ws with this request:

Here's my Java code used in an Android project:

First, is it possible to print out the XML generated by this request? Anyway, the result returned开发者_运维技巧 by my request is always a "fail", I think that's because the SetReport tag use a specific namespace.(e.g. <**ws:**SetReport> ) How do I specify this type of namespace in my request?? In other words, how can I create an Envelope with xmlns:xs="http://ws.comunichiamo.com" ?


You've already set the namespace when creating the SoapObject and that's the correct way.

You can obtain the real strings being sent between client and server by setting

androidHttpTransport.debug = true;

and then looking into androidHttpTransport.requestDump and responseDump after the request.

(What is a "fail"? Is it an exception? What does it say?)

Some notes: you don't need to set the type for primitive ones like String and ints, and if you're using last version of KSoap2 there should be an HttpTransportSE class that is suggested to use in place of AndroidHttpTransport.

(+1 per user e password ;) )

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜