VB.net Soap 客户端无法在 PHP Soap 服务器上运行
我使用 nusoap 用 PHP 编写了一个肥皂服务。它与我用 PHP 编写的测试客户端工作得很好,但是,我们的客户用 vb.net 编写了他的客户端,但它不起作用。我没有看到任何错误,但该服务没有正确解析他的请求。
我让 nusoap 生成 WSDL,它看起来不错。如果我将我发送的消息与他的其中一条消息进行比较,我确实发现信封中存在一些差异,但我不确定问题是在我这边还是他那边。
以下是好的和坏的反应。
好:
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns6361:uploadDocument xmlns:ns6361="http://tempuri.org">
<__numeric_0>
<firmCode xsi:type="xsd:string">999*site1</firmCode>
<docID xsi:type="xsd:string">id</docID>
<docType xsi:type="xsd:string">tif</docType>
<document xsi:type="xsd:string">SUkqAMpDAAAmoFy..lots of data omitted here</document>
</__numeric_0>
</ns6361:uploadDocument>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
坏:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://www.inassist.com/docupload"
xmlns:types="http://www.inassist.com/docupload/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<q1:uploadDocument xmlns:q1="urn:server">
<firmCode xsi:type="xsd:string">999*site1</firmCode>
<docID xsi:type="xsd:string">0000007126</docID>
<docType xsi:type="xsd:string">PDF</docType>
<document xsi:type="xsd:base64Binary">JVBERi0xLj..data omitted...</document>
</q1>
</soap:Body>
</soap:Envelope>
谁能指出我正确的方向吗?谢谢。
I wrote a soap service in PHP using nusoap. It works fine with the test client I wrote in PHP, however, our customer wrote his client in vb.net and it is not working. There are no errors that I see, but the service is not parsing his requests properly.
I am letting nusoap generate the WSDL, and it looks fine. If I compare a message that I send in to one of his messages, I do see a few differences in the envelope, but I'm not sure if the problem is on my end or his.
Here are the good and bad responses.
Good :
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns6361:uploadDocument xmlns:ns6361="http://tempuri.org">
<__numeric_0>
<firmCode xsi:type="xsd:string">999*site1</firmCode>
<docID xsi:type="xsd:string">id</docID>
<docType xsi:type="xsd:string">tif</docType>
<document xsi:type="xsd:string">SUkqAMpDAAAmoFy..lots of data omitted here</document>
</__numeric_0>
</ns6361:uploadDocument>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Bad:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://www.inassist.com/docupload"
xmlns:types="http://www.inassist.com/docupload/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<q1:uploadDocument xmlns:q1="urn:server">
<firmCode xsi:type="xsd:string">999*site1</firmCode>
<docID xsi:type="xsd:string">0000007126</docID>
<docType xsi:type="xsd:string">PDF</docType>
<document xsi:type="xsd:base64Binary">JVBERi0xLj..data omitted...</document>
</q1>
</soap:Body>
</soap:Envelope>
Can anyone please point me in the right direction? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,最大的问题是良好响应中的
<__numeric_0>
标签。如果您可以修改您的结尾以消除对此标记的需要,那么唯一可能的问题类似于
uploadDocument
的命名空间,即错误响应中的q1
和ns6361
在好的文档中。It appears to me that the biggest problem is going to be the
<__numeric_0>
tag in the good response.If you can modify your end to eliminate the need for this tag, then the only other possible problem looks like the namespace for the
uploadDocument
, which isq1
in the bad response andns6361
in the good document.