Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

SoapBindingStyle

Specifies the binding style or SOAP invocation mechanism used by this method, when it is used as a web method. Applies only in a class that is defined as a web service or web client.

Usage

To override the default binding style used by the method (when it is used as a web method), use the following syntax:

Method name(formal_spec) As returnclass [ WebMethod, SoapBindingStyle = soapbindingstyle ] 
{
   //implementation
}

Where soapbindingstyle is one of the following:

  • document (default) — This web method uses document-style invocation.

    With this binding style, the SOAP messages are formatted as documents and typically have only one part.

    In the SOAP messages, the <Body> element typically contains a single child element. Each child of the <Body> element corresponds to a message part.

  • rpc — This web method uses RPC (remote procedure call)-style invocation.

    With this binding style, the SOAP messages are formatted as messages with multiple parts.

    In the SOAP messages, the <Body> element contains a single child element whose name is taken from the corresponding operation name. This element is a generated wrapper element, and it contains one child element for each argument in the argument list of the method.

Important:

For a web service that you create manually, the default value of this keyword is usually suitable. When you generate a web client or service from a WSDL with the SOAP Wizard, Caché sets this keyword as appropriate for that WSDL; if you modify the value, your web client or service may no longer work.

Details

This keyword lets you specify the binding style used by a web method. It affects the format of the SOAP body (but not any SOAP headers).

For a given method, this keyword overrides the SoapBindingStyle class keyword.

Default

If you omit this keyword, the style attribute of <soap:operation> element is determined instead by the value for the SoapBindingStyle class keyword instead.

Relationship to WSDL

The SoapBindingStyle method keyword specifies the value of the style attribute of <soap:operation> element within the <binding> section of the WSDL. For example, if the SoapBindingStyle method keyword is document, the WSDL could look as follows:

...
<binding ...>
 ...
    <operation ...>
        <soap:operation ... style="document"/>
...

In contrast, if SoapBindingStyle is rpc, the WSDL could instead be as follows:

...
<binding ...>
 ...
    <operation ...>
        <soap:operation ... style="rpc"/>
...

The binding style also affects the request and response <message> elements for the web method, as follows:

  • If the binding style is document, each message has only one part by default. For example:

    <message name="AddSoapIn">
        <part name="parameters" .../>
    </message>

    If the ARGUMENTSTYLE parameter is message, then a message can have multiple parts. For example:

    <message name="AddSoapIn">
       <part name="a" .../>
       <part name="b" .../>
    </message>
    
  • If the binding style is rpc, a message can have multiple parts. For example:

    <message name="AddSoapIn">
        <part name="a" .../>
        <part name="b" .../>
    </message>

Effect on SOAP Messages

For information, see the entry for the SoapBindingStyle class keyword.

Use with %XML.DataSet

If you use this keyword with a method that uses an object of type %XML.DataSet as input or output, some limitations apply. See the entry for the SoapBindingStyle class keyword.

See Also

Feedback