Basic routes require that the interfaces implemented by the endpoints of the route be compatible. The interfaces are defined in the wsdl:portType element of a WSDL contract.
|
Note |
|---|---|
|
You can use XSLT transformers to eliminate the need for endpoint compatibility. |
For two endpoints to have compatible logical interfaces the following conditions must be met:
The wsdl:portType element defining the outbound endpoint's logical interface must contain a matching operation element for each operation element in the wsdl:portType element defining the inbound endpoint's logical interface. Matching operation elements must have the same value in their name attribute.
Each of the matching operation elements must have the same number of input, output, and fault elements.
Each of the matching operation elements’ input elements must be associated to a logical message, defined by a wsdl:message element, whose sequence of part elements have matching types.
Each of the matching operation elements’ output elements must be associated to a logical message whose sequence of part elements have matching types.
Each of the matching operation elements’ fault elements must be associated to a logical message whose sequence of part elements have matching types.
For example, given the two logical interfaces defined in Example 3.1, “Compatible Interfaces” you could construct a route from an endpoint bound to baseballScorePortType to an endpoint bound to baseballGamePortType. However, you could not create a route from an endpoint bound to finalScorePortType to an endpoint bound to baseballGamePortType because the message types used for the getScore operation do not match.
Example 3.1. Compatible Interfaces
<message name="scoreRequest>
<part name="gameNumber" type="xsd:int"/>
</message>
<message name="baseballScore">
<part name="homeTeam" type="xsd:int"/>
<part name="awayTeam" type="xsd:int"/>
<part name="final" type="xsd:boolean"/>
</message>
<message name="finalScore">
<part name="home" type="xsd:int"/>
<part name="away" type="xsd:int"/>
<part name="winningTeam" type="xsd:string"/>
</message>
<message name="winner">
<part name="winningTeam" type="xsd:string"/>
</message>
<portType name="baseballGamePortType">
<operation name="getScore">
<input message="tns:scoreRequest" name="scoreRequest"/>
<output message="tns:basballScore" name="baseballScore"/>
</operation>
<operation name="getWinner">
<input message="tns:scoreRequest" name="winnerRequest"/>
<output message="tns:winner" name="winner"/>
</operation>
</portType>
<portType name="baseballScorePortType">
<operation name="getScore">
<input message="tns:scoreRequest" name="scoreRequest"/>
<output message="tns:basballScore" name="baseballScore"/>
</operation>
</portType>
<portType name="finalScorePortType">
<operation name="getScore">
<input message="tns:scoreRequest" name="scoreRequest"/>
<output message="tns:finalScore" name="finalScore"/>
</operation>
</portType>