Skip to main content

Using the Caché Binary SOAP Format

Caché 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 Caché web service can receive SOAP requests either in Caché binary SOAP format or in the usual SOAP format. No parameter is needed to enable this behavior. A Caché web client uses binary SOAP format only if it is configured to do so.

This chapter discusses the following:

Also see “WSDL Differences for Caché Binary SOAP Format” in the appendix “Details of the Generated WSDLs.”

Note:

If a Caché web service or web client uses this proprietary binary SOAP format, you cannot use WS-Security or WS-Policy features with this web service or client. See Securing Caché Web Services.

Introduction

Caché binary SOAP is carried over HTTP messages as follows:

  • The message uses the POST method.

  • Content-Type is always "application/octet-stream".

  • 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:

    ISCSoap: NAMESPACE/Package.Class.Method
    
  • SOAP sessions are supported. The session information is maintained by using the normal CSP 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; Cache;)
Host: localhost:8080
Connection: Close
ISCSoap: http://www.myapp.org/GSOAP.WebServiceBinary.Divide
Content-Type: application/octet-stream
Content-Length: 90

00085hdBinaryClient.MyAppSoap.Dividearg1arg2t

Notice that only the SOAP envelope and its contents are affected. The HTTP header is not affected.

Extending the WSDL for a Caché Web Service

Any Caché web service can receive SOAP requests either in Caché binary SOAP format or in the usual SOAP format. If a Caché 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:

  1. The WSDL publicly states that the web service supports the Caché binary SOAP format in addition to the usual SOAP format.

  2. The WSDL includes information on using the Caché binary SOAP format.

This allows any Caché web client to correctly send messages in this format if wanted.

To extend the WSDL of a Caché web service in this way, set the SOAPBINARY parameter to 1 for the web service.

For details on the changes, see “WSDL Differences for Caché Binary SOAP Format” in the appendix “Details of the Generated WSDLs.”

Redefining a Caché Web Client to Use Binary SOAP

You can redefine an existing Caché web client so that it uses Caché binary SOAP format. To do so, set the SOAPBINARY parameter or the SoapBinary property to 1 for the web client. You may need to make additional changes; see “WSDL Differences for Caché Binary SOAP Format” in the appendix “Details of the Generated WSDLs.”

Specifying the Character Set

The SoapBinaryCharset property of the web client specifies the Caché 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.

The SoapBinaryCharset property defaults to the SOAPBINARYCHARSET parameter, which defaults to null, which always converts strings to UTF8.

Details on the Caché Binary SOAP Format

The API for binary SOAP is different from XML SOAP as follows:

  • For CSP server:

    • Binary SOAP is denoted by the presence of the ISCSoap HTTP header.

    • The Initialize() method of the web service is not called.

    • A normal %request.Content stream is used in the initial implementation.

    • Login is via CacheUserName and CachePassword query parameters attached to the URL. No login page is ever returned for binary SOAP.

    • If an invalid login occurs, then an instance of %SOAP.FaultOpens in a new tab is returned.

  • For %Net.HttpRequestOpens in a new tab responses:

    • 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.

FeedbackOpens in a new tab