简体   繁体   English

如何解决我的SOAP问题?

[英]How to resolve my SOAP issues?

I have a windows app to test connecting to a 3rd party web service. 我有一个Windows应用程序来测试连接到第三方网络服务。

I've created a service reference using the wsdl that was provided. 我已经使用提供的wsdl创建了服务引用。

The way the web service will work is a 4 step process. Web服务的工作方式分为四个步骤。

  1. Method call to get session ID. 用于获取会话ID的方法调用。
  2. Method call to pass arguments 传递参数的方法调用
  3. Method call to execute arguments. 执行参数的方法调用。
  4. Method call to get results. 方法调用以获取结果。

Now here is the strange part: I can make the first call no issue. 现在,这是一个奇怪的部分:我可以打第一通电话。

Calls 2 and 3 do not work from my . 从我的电话打出的电话2和3无效。 net appliaction. 净应用。

I get the error: Error in deserializing body of reply message for operation 'setArguments'. 我收到错误:反序列化操作“ setArguments”的回复消息正文时出错。 End element 'Body' from namespace ' http://www.w3.org/2003/05/soap-envelope ' expected. 预期来自命名空间“ http://www.w3.org/2003/05/soap-envelope ”的元素“ Body”。 Found element 'ns:setArgumentsResponse' 找到元素“ ns:setArgumentsResponse”

I am at a total loss with this. 我对此一无所知。

What I've done. 我做了什么

  1. I am capturing my post in Fiddler. 我正在Fiddler中捕捉我的帖子。

    • When I examine the body everything looks correct. 当我检查身体时,一切看起来都正确。
    • If I take the same response that I captured and post it in Fiddler it works. 如果我收到与我相同的响应并将其发布到Fiddler中,则它将起作用。
  2. I've tried the this in Python at it works. 我已经在Python中尝试过了。

Is there some obscure setting that I could possibly be missing in my application? 我的应用程序中可能缺少一些晦涩的设置吗?

My findings in step 1 should prove that I am creating a valid request. 我在步骤1中的发现应证明我正在创建一个有效的请求。 Could . 可以 。 NET possibly be choking on the response? NET可能在响应中令人窒息?

Any suggestions would be appreciated. 任何建议,将不胜感激。

FYI: binding="customBinding" I've also tried basicBinding and got the same results. 仅供参考:binding =“ customBinding”我也尝试了basicBinding并获得了相同的结果。

EDIT: I just wrapped a try/catch around each method and when I call method 4 I get a result. 编辑:我只是在每个方法周围包装了try / catch,当我调用方法4时我得到了结果。 So the error must be on the response. 因此错误必须在响应上。 Right? 对?

Issues appears to be that I am consuming a Java web service. 问题似乎是我正在使用Java Web服务。

I originally added it as a Service Reference which is causing my serialization errors on the response. 我最初将其添加为服务参考,这导致了响应中的序列化错误。

I removed this reference and re-added a Web Reference and it appears to be working without the serialization error. 我删除了此参考,并重新添加了Web参考,它似乎可以正常工作而没有序列化错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM