KSOAP2 编组复杂对象数组
我想将一组复杂对象作为参数发送到 .NET Web 服务。我的类是 ksoap2 可序列化的。进行调用后,SoapRequest 属性将我的数组显示为 AnyType。这会产生转换错误,因为服务器不知道如何转换它。
理论:
我觉得这个问题可以通过Marshalling来解决。我已经看过 See Sharp Geers 上的示例,但这些都是针对原始类型的。如何创建数组并将类型包含在 WriteInstance 方法中?
谁能提供用于编组复杂对象数组的示例代码?
预先感谢,
克雷格
I would like to send an array of complex objects as a parameter to a .NET web service. The class I have is ksoap2 serializable. After I make the call, the SoapRequest property shows my array as AnyType. This gives a casting error because the server does not know how to convert it.
Theory:
I feel that the issue can be solved with Marshalling. I have seen the examples on See Sharp Geers, but those are for primitive types. How do you do an array and include the type in the WriteInstance method?
Can anyone provide sample code for marshalling an array of complex objects?
Thanks in advance,
Craig
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了 ksoap2 google 群组的链接:如何发送 Complext type Array 描述了如何发送复杂类型的数组。也许这会对你有所帮助。在寻找一种将一个复杂对象发送到 wcf 服务的方法时发现了它。但我无法正常工作:/如果您有任何想法,请检查我的问题;)
kSoap2 序列化错误
I found a link to the ksoap2 google group: How to send a Complext type Array which describes how to send an array of complex type. Maybe this will help you. Found it while searching for a way to send one complex object to a wcf service. But i don't get it working :/ If you have any idea, check my question ;)
kSoap2 serialisation error