由于缺少元素而导致未处理的 SoapException
不幸的是,这个问题不太容易回答,因为我无法真正为您提供相应的 WSDL。但也许你无论如何都能帮助我。
设置:我有一个 C#.Net 4 应用程序,通过 wsdl.exe 生成的类与 SOAP Web 服务进行通信。
ZWmGetEpc storage = new ZWmGetEpc();
storage.IpLgnum = "XYZ";
Z_WM_GET_EPC erpInventory = new Z_WM_GET_EPC();
ZWmGetEpcResponse response = erpInventory.ZWmGetEpc(storage);
到目前为止,一切都很好。但是当我启动程序时,我在 erpInventory.ZWmGetEpc(storage)
上收到错误,即未处理的 SoapException:
CX_ST_MATCH_ELEMENT:.System expected element 'IpLgnum'
但在调试控制台中我可以清楚地看到对象 storage
> 有一个元素IpLgnum
,它应该是"XYZ"
。
有什么想法吗?
unfortunately a not too easy to answer question, as I cannot really provide you with the correpsonding WSDL. But maybe you can help me anyways.
Setting: I have a C#.Net 4 application communicating to a SOAP webservice via a class, generated by wsdl.exe.
ZWmGetEpc storage = new ZWmGetEpc();
storage.IpLgnum = "XYZ";
Z_WM_GET_EPC erpInventory = new Z_WM_GET_EPC();
ZWmGetEpcResponse response = erpInventory.ZWmGetEpc(storage);
So far, so good. But when I start the program, I get an error on erpInventory.ZWmGetEpc(storage)
, namely an unhandled SoapException:
CX_ST_MATCH_ELEMENT:.System expected element 'IpLgnum'
But in the debug console I can clearly see that the object storage
has an element IpLgnum
, which is "XYZ"
just as it should be.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 John 指出的那样,错误消息来自 Web 服务本身。因此我的问题不能这样回答。
As John points out, the error message is from the web service itself. My question therefore cannot be answered just like that.