Consumer scenario

A common scenario is the flow of a request from a map, through SOAP and HTTP adapters to the Web Service, and the flow of the response back to the map from the Web Service.

The adapter is designed to be called in a GET map function call. The third parameter of the GET is the request message. For example:

Response = GET("SOAP", "-HDR -TRANSPORT 'HTTP(-URL http://
www.stuff.com -T)'", PACKAGE(Request))

Adapter Action Sequence

The following describes the sequence of actions that occur in the consumer scenario.

  • The request message is first passed to the SOAP Adapter.
  • The request message might or might not have a SOAP envelope. If the envelope is not provided, the adapter adds it.
  • The request message might or might not have a SOAP envelope header. The adapter does nothing with the header. If it is not provided in the request, then no header is sent.
  • The adapter specified in the -TRANSPORT command is invoked to issue the request and receive a reply. Typically, this is the HTTP adapter that will then send an HTTP request and return the HTTP response.
  • The SOAP Adapter is invoked a second time to process the reply.
  • The adapter looks in the body to see if there is a Fault tag. If there is, the SOAP Adapter returns an error message that is comprised of the faultstring and the faultcode.
  • The SOAP envelope is removed unless the -RAW command is specified.
  • If the adapter is called with the -HDR command, and there is a SOAP envelope header, the header data will be returned.
  • If the adapter is called with the -RETURN command, then all XML tags are removed and only the specified datum from the response message is returned. If the response message returns more than one datum, then the whole XML response message is returned with a warning code. This command is mutually exclusive with the -HDR command.