The BrokerWSDL file of the mortgage broker service is stored in the
tutorial/MortgageBroker folder of the project. The following is the WSDL code for this service:
"http://www.tibco.com/schemas/Untitled/MortgageBroker/
Schema.xsd" location="../Metadata/LoanSchema.xsd"/>
<message name="MessageIn">
<part name="loanRequest" element="ns:LoanRequest"/>
<message name="MessageOut">
<part name="loanReply" element="ns:LoanReply"/>
<message name="MessageFault">
<part name="fault" element="ns:Error"/>
<portType name="BrokerPT">
<operation name="requestLoanOperation">
<input message="tns:MessageIn"/>
<output message="tns:MessageOut"/>
<fault name="fault1" message="tns:MessageFault"/>
The mortgage broker WSDL contains one port type, BrokerPT. The
BrokerPT port type contains one operation,
requestLoanOperation. This operation has an input, output, and fault message.
The mortgage broker service will call one of three partner third-party services from Bank_A, Bank_B, or Bank_C. Each of these third-party services implements the same abstract interface. Because the third-party services have agreed to implement the same interface, the mortgage broker service can switch between the third-party services without changing the implementation of the mortgage broker service.
The abstract interface used by the third-party services is contained in the tutorial/Metadata folder of the project. The
Metadata folder contains the
BankWSDLAbstract WSDL file and the
LoanSchema XSD referenced by the WSDL. The following is the
BankWSDLAbstract WSDL file:
<documentation>Common service interface to request for a
loan from a bank</documentation>
"http://www.tibco.com/schemas/Untitled/MortgageBroker/
Schema.xsd" location="LoanSchema.xsd"/>
<message name="MessageIn">
<part name="loanRequest" element="ns:BrokerLoanRequest"/>
<message name="MessageOut">
<part name="loanReply" element="ns:LoanReply"/>
<message name="MessageFault">
<part name="fault" element="ns:Error"/>
<operation name="loanApprovalOperation">
<input message="tns:MessageIn"/>
<output message="tns:MessageOut"/>
<fault name="fault1" message="tns:MessageFault"/>
The BankWSDLAbstract contains one port type,
BankPT. The
BankPT port type contains one operation,
loanApprovalOperation. This operation has an input, output, and fault message. See the
LoanSchema.xsd file in the
Metadata folder of the project for a description of the structure of the
BrokerLoanRequest,
LoanReply, and
Error messages.
Each third-party service publishes a concrete WSDL file with the bindings to the endpoint where the service can be invoked. Each concrete WSDL file references the
BankWSDLAbstract WSDL. The mortgage broker service stores the third-party partner service concrete WSDL files in the
tutorial/MortgageBroker/PartnerWSDLs folder of the project. For example, the following is the concrete WSDL for the Bank_A service:
<wsdl:import location = "../../Metadata/BankWSDLAbstract.wsdl" namespace = "http://xmlns.example.com/BankWSDL"/>
<wsdl:service name = "Bank_A_Service">
<wsdl:port binding = "tns:BankPTEndpoint2Binding" name = "BankPTEndpoint2">
<soap:address location = "http://localhost:9091/ExternalServices/Bank_A/Bank_A_Service.serviceagent/BankPTEndpoint2"/>
<wsdl:binding name = "BankPTEndpoint2Binding" type = "ns0:BankPT">
<soap:binding style = "document" transport = "http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name = "loanApprovalOperation">
<soap:operation soapAction = "/ExternalServices/Bank_A/Bank_A_Service.serviceagent/BankPTEndpoint2/loanApprovalOperation" style = "document"/>
<soap:body parts = "loanRequest" use = "literal"/>
<soap:body parts = "loanReply" use = "literal"/>
<wsdl:fault name = "fault1">
<soap:fault name = "fault1" use = "literal"/>