KSOAP2 编组复杂对象数组

发布于 2024-11-15 12:39:17 字数 292 浏览 8 评论 0原文

我想将一组复杂对象作为参数发送到 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

强者自强 2024-11-22 12:39:17

我找到了 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文