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

.NET and attribute order?

Expand Messages
  • Josh
    Hi all, I seem to be running into an interesting issue. I have 9 machines running a client script that connects to a .NET server. The script is the same on
    Message 1 of 1 , Nov 18, 2005
    • 0 Attachment
      Hi all,
      I seem to be running into an interesting issue.  I have 9 machines running a client script that connects to a .NET server.  The script is the same on all servers, the version of SOAP::Lite is 60. However, when one of the machines attempts to try even a test script, the server returns only the "Documentation" page as if I had given no arguments or called a method. SOAP::Lite has trouble parsing an HTML documentation page as a result.

      Interestingly enough, when tracing it, I could only find one thing different between the client machines that are working and the one that is not - attribute order in the <SOAP-ENV:Envelope> tag.

      For example, here is what is sent to the server from a working client:

      POST http://testserver/path/to/webservice.asmx HTTP/1.1
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 644
      Content-Type: text/xml; charset=utf-8
      SOAPAction: http://testserver/path/to/webservice/SOAPTest

      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope
       xmlnssi="http://www.w3.org/1999/XMLSchema-instance"
       xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
       xmlnssd="http://www.w3.org/1999/XMLSchema"
       SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
       xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
           <SOAP-ENV:Body>
               <namesp1:SOAPTest
                xmlns:namesp1="http://
      testserver/path/to/webservice">
                    <namesp2:TestString
                     xsi:type="xsd:string"
                     xmlns:namesp2="http://
      testserver/path/to/webservice">
                         This is a test
                    </namesp2:TestString>
               </namesp1:SOAPTest>
           </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>


      And here is what is sent to the server from the broken client:

      POST http://testserver/path/to/webservice.asmx HTTP/1.1
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 644
      Content-Type: text/xml; charset=utf-8
      SOAPAction: http://testserver/path/to/webservice/SOAPTest

      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope
       xmlnssi="http://www.w3.org/1999/XMLSchema-instance"
       xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
       xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
       xmlnssd="http://www.w3.org/1999/XMLSchema"

       SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
           <SOAP-ENV:Body>
               <namesp1:SOAPTest
                xmlns:namesp1="http://
      testserver/path/to/webservice">
                    <namesp2:TestString
                     xsi:type="xsd:string"
                     xmlns:namesp2="http://
      testserver/path/to/webservice">
                         This is a test
                    </namesp2:TestString>
               </namesp1:SOAPTest>
           </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      As you can see, the only difference between the two is that the SOAP-ENV namespace attribute is moved up in the list.

      Any thoughts on what can cause this, or thoughts on how I can tell SOAP::Lite to move it back to the last attribute sent in the opening envelope tag?

      The code I currently use is as follows:

      my $soap = SOAP::Lite
          -> uri($SOAPuri)
          -> proxy($SOAPproxy)
          -> on_action(sub{sprintf '%s/%s', @_ })
        ;
         
      # execute the methods needed.
      $test_string = "This is a test";
      $SOAP_test_string = SOAP:ata->name('TestString' => $test_string)->type('string')->uri($SOAPuri);
      $result = $soap->SOAPTest($SOAP_test_string);



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