Loading ...
Sorry, an error occurred while loading the content.

Getting SOAP envelope right.

Expand Messages
  • Neal Rhodes
    We are trying to use SOAP-Lite-0.710.08 to make a healthcheck procedure to access our own Web Service running under Linux/Tomcat5/OpenEdge 10. This is running
    Message 1 of 1 , Sep 4, 2008
      We are trying to use SOAP-Lite-0.710.08 to make a healthcheck procedure to access our own Web Service running under Linux/Tomcat5/OpenEdge 10.   This is running just fine in production, and SoapUI has no problem generating requests with our WSDL.     It's a simple query:


      use diagnostics;
      use warnings;

      use SOAP::Lite +trace => debug;

      my $query = SOAP::Lite->service("file:./tdiev.wsdl");
      my $results = $query->tdireqhandler('TXPL0000011', '', '', '', '', '12345', '', '', '', '', '', '', 'test');

      if ($results) {
        print "Result is $results\n";
      else {
        print "no Results \n";

      When it runs, the tomcat5 server end barfs up loads of messages that basically say the envelope isn't right.  I can see from other queries that succeed that
      it's expecting <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http:
      //www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">   and that's not what it's getting. 

      Reading some of the notes on bugs I hear that sending valid envelopes based on the WSDL may be a weakness of the current version.   It seems that I might be able to compel it to spit out headers more like what we need with the use of the namespace() and other methods, but try as I might I can't seem to get the syntax right.

      Here's the debug:

      SOAP::Transport::HTTP::Client::send_receive: POST HTTP/1.1
      Accept: text/xml
      Accept: multipart/*
      Accept: application/soap
      Content-Length: 1106
      Content-Type: text/xml; charset=utf-8
      SOAPAction: ""

      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:S1="urn:soap-fault:details" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:S2="urn:tempuri-org:tdiev" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:tempuri-org"><soap:Body><S2:tdireqhandler><w_queryOriginator xsi:type="xsd:string">TXPL0000011</w_queryOriginator><w_query_Id xsi:type="xsd:string" /><w_query_Time xsi:type="xsd:string" /><w_Doc_Number xsi:type="xsd:string" /><w_QueryVIN xsi:type="xsd:string" /><w_QueryPlate xsi:type="xsd:string">1234 5</w_QueryPlate><w_QueryDriver_License xsi:type="xsd:string" /><w_QueryReg_Name xsi:type="xsd:string" /><w_QueryFirst_Name xsi:type="xsd:string" /><w_QueryLast_Name xsi:type="xsd:string" /><w_QueryDOB xsi:type="xsd:string" /><w_asofDtStr xsi:type="xsd:string" /><w_test xsi:type="xsd:string">test</w_test></S2:tdireqhandler></soap:Body></soap:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
      Connection: close
      Date: Thu, 04 Sep 2008 21:30:56 GMT
      Server: Apache-Coyote/1.1
      Content-Length: 810
      Content-Type: text/xml;charset=utf-8
      Client-Date: Thu, 04 Sep 2008 21:31:02 GMT
      Client-Response-Num: 1

      <?xml version='1.0' encoding='UTF-8'?>
      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <faultstring>An error was detected in the Web Service request. (10894)</faultstring>
      <ns1:FaultDetail xmlns:ns1="urn:soap-fault:details"><errorMessage>Error in SOAP parameter: SOAP-ENV:VersionMismatch: Envelope element must be associated with the ''''''''''''''''http://schemas.xmlsoap.org/soap/envelope/'''''''''''''''' namespace. (10914)</errorMessage><requestID>11d1def534ea1be0:1050dca:11bddbec85f:-7ffe#4ae9e</requestID></ns1:FaultDetail>

      no Results

    Your message has been successfully submitted and would be delivered to recipients shortly.