SOAP

Normally web services are called using a SOAP toolkit, such as Axis or ASP.NET. However, the SOAP web services can be called directly over HTTP by POSTing a correctly formatted SOAP request (called a SOAP envelope). This is sometimes useful in JavaScript when using the XmlHttpRequest object.

 

An example SOAP request for the getSettings web method is formatted like this:

POST /Dekho/services/ConfigurationService HTTP/1.1

Host: localhost

SOAPAction: ""

Content-Type: text/xml; charset=utf-8

Content-Length: 280

 

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <getSettings/>

  </soap:Body>

</soap:Envelope>

 

A successful response will be something like:

HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Content-Type: text/xml;charset=utf-8

Transfer-Encoding: chunked

Date: Fri, 14 Aug 2009 04:30:33 GMT

 

<?xml version="1.0" encoding="utf-8"?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <soapenv:Body>

    <getSettingsResponse xmlns="">

      <ns1:getSettingsReturn xmlns:ns1="http://config.dekho.esriau.com.au">

        <ns1:allowDomains></ns1:allowDomains>

        <ns1:allowInsecureDomains></ns1:allowInsecureDomains>

        <ns1:appName>Dekho</ns1:appName>

        <ns1:appTitle>Dekho</ns1:appTitle>

        <ns1:appType>2</ns1:appType>

        <ns1:authentication>0</ns1:authentication>

        :

        :

        <ns1:zoomSlider>false</ns1:zoomSlider>

        <ns1:zoomToSelectionMaxScale>3000.0</ns1:zoomToSelectionMaxScale>

      </ns1:getSettingsReturn>

    </getSettingsResponse>

  </soapenv:Body>

</soapenv:Envelope>

Versions of Dekho prior to v3.0 used an XML-formatted string for all input and outputs from web services. Dekho 3.0 has replaced this with explicit types to allow the same services to be used efficiently via BlazeDS and SOAP.


Errors