Wednesday, December 17, 2014

The SOAP Protocol - Response

In the last post, we covered a sample SOAP Request and deciphered what each part of it means. In this one, we will cover the Response. Remember, Web Service APIs are all about an interface, request and response. In case of SOAP, the interface is a WSDL, the request is a XML specifying a method and parameters, and the response is also an XML as shown below. Let's crack it open

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 30 May 2008 23:59:20 GMT

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <testPingResponse xmlns="http://api.echosign">
      <pong>
        <message xmlns="http://dto.api.echosign">It works!</message>
      </pong>
    </testPingResponse>
  </soap:Body>
</soap:Envelope>

Quick Notes
1. 200 : The  is the standard HTTP Status code. 200 means success. 
2. <testPingResponse>: Is the root of the response from EchoSign. Could have been named anything
3. <pong>, <message> : We have structured the response to be having a pong element with a message element containing the actual message.

SOAP API Method changesThe service provider is flexible to structure the request and response as they want, but once published in a WSDL, it should not change. Any changes in the request and response, will require a new version to be published.

Check out the various versions of the EchoSign SOAP API here. The yellow and green stars represent the new APIs that we added in this version 19 and those that were changed from version 18 respectively




2 comments:

  1. It is an interesting post. The previous one was also very informative and this one also has made us aware about the machine language used. Thank you for the post.

    ReplyDelete
  2. The main thing about your website is HTTP and if you can not understand this program then you are in big trouble. To understand something you first have to create an outline for example I create a dissertation outline before making a dissertation.

    ReplyDelete