locked
XML Datasource SOAP request RRS feed

  • Question

  • I'm trying to build a query against a soap endpoint that doesn't appear to support the soapAction being sent within the <Body>.

    Here's my query:

    <Query>
    <Method Name="pingServer" Namespace="namespace">
      <Parameters>
      <Parameter Name="Authentication" Type="Xml" />
      </Parameters>
    </Method>
    </Query>

    Here's what gets sent out:

    POST URL HTTP/1.1
    SOAPAction: namespace/pingServer
    Content-Type: text/xml
    Host: <host>
    Content-Length: 379
    Expect: 100-continue
    
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <pingServer xmlns="namespace"> <!--this is the element the server is not liking-->
          <Authentication><login_name>username</login_name><password>pw</password></Authentication>
        </pingServer>
      </soap:Body>
    </soap:Envelope>
    The expected request should look like this (basically have the Authentication element without the surrounding soapaction element)
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <Authentication><login_name>username</login_name><password>pw</password></Authentication>
      </soap:Body>
    </soap:Envelope>

    Here's what a working request (sent via C# app) looks like:

    POST URL HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    SOAPAction: "pingServer"
    Host: <host>
    Content-Length: 365
    Expect: 100-continue
    Accept-Encoding: gzip, deflate
    Connection: Keep-Alive
    
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
      <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <Authentication xmlns="namespace">
          <login_name>username</login_name>
          <password>pw</password>
        </Authentication>
      </s:Body>
    </s:Envelope>
    

    I'm wondering if there's any way to not send the soapAction in the body?


    Thank you in advance for your help. If you think you may be able to help with any of my unanswered threads please look at them here

    Friday, October 18, 2013 6:18 PM

All replies