简体   繁体   中英

VB.net soap client not working on PHP soap server

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.

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 is q1 in the bad response and ns6361 in the good document.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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