0 Replies Latest reply on Aug 24, 2009 4:45 AM by ravliv

    Problem with SOAPClient

    ravliv

      Hi,
      I'm trying to use SOAPClient to access remote webservice (Axis2). The Axis is configured to use SOAP 1.2. The message is SOAP 1.2 compatible, but the response is still "Transport level information does not match with SOAP Message namespace URI".

      After the long studying of SOAPClient code, I find the problem with content type in the http header.

      The SOAPClient creates the http header with content type "text/xml;charset=UTF-8", but the Axis require content-type "application/soap+xml". If i manually change the http header the response from webservice is correct.

      I would like to know, if there exists some another solution than create own SOAPClient with correct http header.

      Thanks
      Pavel

      The sent message:
      <?xml version='1.0' encoding='UTF-8'?>
      <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
      <soapenv:Body>
      <ns2:SendMessage xmlns:ns2="http://ws.example.be">
      <ns2:msg>
      <ns1:baMessageId xmlns:ns1="http://ws.example.be/xsd">
      </ns1:baMessageId>


      XXX


      <ns1:messageId xmlns:ns1="http://ws.example.be/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />
      <ns1:messageType xmlns:ns1="http://ws.example.be/xsd">Type 1</ns1:messageType>
      <ns1:receiverCode xmlns:ns1="http://ws.example.be/xsd">EDC-1</ns1:receiverCode>
      <ns1:senderApplication xmlns:ns1="http://ws.example.be/xsd">
      </ns1:senderApplication>
      </ns2:msg>
      </ns2:SendMessage>
      </soapenv:Body>
      </soapenv:Envelope>