使用 ksoap2 捕获 .net webservice 输出参数
我试图使用Android SDK调用.net webservice,使用ksoap2库很简单,包括传递和获取复杂类型。但是我遇到了一个更复杂的问题, SoapSerializationEnvelope.getResult() 或者 SoapSerializationEnvelope.getResponse() 只给出 Web 方法的返回值,但是当方法中存在 out 参数时,我如何获取它们?
我找到了一个工作方法来通过设置 AndroidHttpTransport.debug=true 来获取它们,从而能够获取 AndroidHttpTransport.responseDump 然后解析此 xml 字符串并获取值难道
the thing is that就没有更简单的方法来获取这些参数吗?
excuse me for the bad formatted question, but this is my first time using it:S..提前致谢
i was trying to call a .net webservice with the Android SDK, that was simple using the ksoap2 library, including passing and getting complex types.yet i faced a more complicated problem, the
SoapSerializationEnvelope.getResult()
or SoapSerializationEnvelope.getResponse() only gives the return value of the web method, but when there is out parameters in the method, how can i get them?
i found a work arround to get them by setting the AndroidHttpTransport.debug=true and thus being able to get AndroidHttpTransport.responseDump and then parsing this xml string and get the values out of it
the thing is that
isn't there any simpler way to get these out parameters?
excuse me for the bad formatted question, but this is my first time using it:S..
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅我对 如何检索二进制文件的回答Android 中 Web 服务的数据?
它展示了如何访问响应参数。
See my answer to How to retrieve binary data from Web Service in Android?
It shown how to access the response parameters.