Using the HTTP Binding Component

XML/HTTP GET Processing

The HTTP Binding Component is used as a provider proxy to provide connectivity to services in the JBI environment, or as consumer proxy to invoke services. The binding component implements the HTTP 1.1 GET binding defined in the WSDL 1.1 Specification, enabling applications to consume or provide services from the JBI environment using a web browser-like HTTP GET interaction.

Configuring the HTTP Binding Component for HTTP Get Interactions

To configure the HTTP Binding Component to function for HTTP GET interactions, the WSDL file of the service to which the binding component is acting as proxy, needs to use the following HTTP binding language elements defined in the WSDL 1.1 Specification:

Examples that demonstrate how to configure the HTTP Binding Component as a provider proxy or consumer proxy are available at Using the HTTP Binding Component with the HTTP GET method and Using the HTTP Binding Component with the HTTP POST Method.

Binding Details

The following sections describe how the HTTP Binding Component supports and implements the HTTP Binding language elements. Unless indicated otherwise, each of the WSDL elements described below are defined in the namespace http://schemas.xmlsoap.org/wsdl/http/.

http:binding Element

The <http:binding> element:


Note –

Currently the HTTP Binding Component only supports GET and POST values (please note that HTTP methods are case-sensitive).


Example:


<http:binding verb="POST"/>

http:address Element

The <http:address> element:

Example:


<http::address location="http://localhost/MyService/MyPort"/>

http:operation Element

The <http:operation> element:

The HTTP Binding Component supports a blank location attribute value for this element.

Example:


Given:
    <http:operation location="Submit">
    <http:address location="http://localhost/MyService/MyPort">

The full HTTP request URI is: 
http://localhost/MyService/MyPort/Submit

http:urlEncoded Element

The <http:urlEncoded> element:

Example:


Given this description:
<wsd:message name="MyMessage">
    <wsdl:part name="partA" type="xsd:string"/>
    <wsdl:part name="partB" type="xsd:string"/>
</wsdl:message>
...
<wsdl:portType name="MyPortType">
    <wsdl:operation name="MyOperation">
        <wsdl:input message="MyMessage"/>
    </wsdl:operation>
</wsdl:portType>
...
<wsdl:binding name="MyBinding" type="MyPortType">
    <http:binding verb="GET"/>
    <wsdl:operation name="MyOperation">
        <wsdl:input>
            <http:urlEncoded/>
        </wsdl:input>
    </wsdl:operation>
</wsdl:binding>
...
<wsdl:service name="MyService">
    <wsdl:port name="Port1" binding="MyBinding">
        <http:address location="http://localhost/MyService/MyPort"/>
    </wsdl:port>
</wsdl:service>

Given these values mapped to the input parts:
"valueY" -> "partA"
"valueZ" -> "partB"

The full HTTP request URI is:
http://localhost/MyService/MyPort/MyOperation/partA=valueY&partB=valueZ

http:urlReplacement

The <http:urlReplacement/> element:

Example:


Given this description:
<wsd:message name="MyMessage">
    <wsdl:part name="partA" type="xsd:string"/>
    <wsdl:part name="partB" type="xsd:string"/>
</wsdl:message>
...
<wsdl:portType name="MyPortType">
    <wsdl:operation name="MyOperation">
        <wsdl:input message="MyMessage"/>
    </wsdl:operation>
</wsdl:portType>
...
<wsdl:binding name="MyBinding" type="MyPortType">
    <http:binding verb="GET"/>
    <wsdl:operation name="MyOperation/(partA)/subcategory/(partB)">
        <wsdl:input>
            <http:urlReplacement/>
        </wsdl:input>
    </wsdl:operation>
</wsdl:binding>
...
<wsdl:service name="MyService">
    <wsdl:port name="Port1" binding="MyBinding">
        <http:address location="http://localhost/MyService/MyPort"/>
    </wsdl:port>
</wsdl:service>

Given these values mapped to the input parts:
"valueY" -> "partA"
"valueZ" -> "partB"

The full HTTP request URI is:
http://localhost/MyService/MyPort/MyOperation/valueY/subcategory/valueZ