Creating Web Services and Web Clients
Using the InterSystems IRIS Binary SOAP Format
InterSystems IRIS SOAP support provides an optional proprietary binary SOAP format, which is useful when you send and receive large SOAP messages and want to minimize message size.
As of this release, any InterSystems IRIS web service can receive SOAP requests either in InterSystems IRIS binary SOAP format or in the usual SOAP format. No parameter is needed to enable this behavior. An InterSystems IRIS web client uses binary SOAP format only if it is configured to do so.
This chapter discusses the following:
InterSystems IRIS binary SOAP is carried over HTTP messages as follows:
The message uses the POST method.
The body is a binary representation of objects using a proprietary protocol.
A binary SOAP request includes an HTTP ISCSoap header of the following form:
SOAP sessions are supported. The session information is maintained by using the normal web session cookie. However, the SessionCookie
property for SOAP web clients and web services is not supported, because binary SOAP does not use the CSPCHD proprietary SOAP header.
The following example shows a binary SOAP request:
POST /csp/gsop/GSOP.WebServiceBinary.cls HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; InterSystems IRIS;)
Notice that only the SOAP envelope and its contents are affected. The HTTP header is not affected.
Extending the WSDL for an InterSystems IRIS Web Service
Any InterSystems IRIS web service can receive SOAP requests either in InterSystems IRIS binary SOAP format or in the usual SOAP format. If an InterSystems IRIS web service receives a binary request, it sends a binary response. Otherwise, it sends the usual response. No parameter is needed to enable this behavior.
You can extend the WSDL of a web service so that:
The WSDL publicly states that the web service supports the InterSystems IRIS binary SOAP format in addition to the usual SOAP format.
The WSDL includes information on using the InterSystems IRIS binary SOAP format.
This allows any InterSystems IRIS web client to correctly send messages in this format if wanted.
To extend the WSDL of an InterSystems IRIS web service in this way, set the SOAPBINARY
parameter to 1 for the web service.
Redefining an InterSystems IRIS Web Client to Use Binary SOAP
Specifying the Character Set
property of the web client specifies the InterSystems IRIS character set (for example: Unicode, Latin1) of the web service. If the character set of the client machine and service machine are the same, strings are sent RAW; otherwise they are sent encoded as UTF8.
Details on the InterSystems IRIS Binary SOAP Format
The API for binary SOAP is different from XML SOAP as follows:
Binary SOAP is denoted by the presence of the ISCSoap HTTP header.
Login is via CacheUserName and CachePassword query parameters attached to the URL. No login page is ever returned for binary SOAP.
A binary SOAP request is indicated by setting the SoapBinary
property of the web client class for the method being called.
The request is sent using a normal EntityBody stream.
The response is returned in the Data
property of HttpResponse.