Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 6 HTTP and SOAP Channels : Understanding the WSDL to Project Resource Mapping

Understanding the WSDL to Project Resource Mapping
A WSDL file describes a web service. The WSDL Import utility imports a WSDL file and generates TIBCO BusinessEvents project artifacts using elements in the WSDL. TIBCO BusinessEvents can import abstract and concrete WSDL files. The source of the WSDL could be, for example, a ActiveMatrix BusinessWorks SOAPRequestReply activity.
Example WSDL
The table following this example shows which WSDL elements and attributes are used to create TIBCO BusinessEvents project artifacts. Elements and attributes used in the import are highlighted in bold text. Differences between import from abstract and concrete WSDL files are also highlighted. See Table 18, Imported WSDL Project Artifacts for more details.

 
<?xml version="1.0" encoding="UTF-8"?>
<!--Created by TIBCO WSDL-->
<wsdl:definitions omitted to keep the example short>
   <wsdl:types>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.books.org" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://www.books.org">
. . . . . . Elements omitted
      </xsd:schema>
   </wsdl:types>
. . . . . . Elements omitted
 
Note: In an abstract WSDL the following elements are used in the import. However in a concrete WSDL, the <wsdl:binding> elements are used instead.
 
   <wsdl:portType name="GetBookPortType">
      <wsdl:operation name="GetBook">
         <wsdl:input message="tns:GetBookRequestMessage"/>
         <wsdl:output message="tns:GetBookResponseMessage"/>
      </wsdl:operation>
   </wsdl:portType>
 
Note: This is a concrete WSDL example, so the <wsdl:binding> elements are used in the import. (In an abstract WSDL, the <wsdl:portType> element contents are used instead.)
 
   <wsdl:binding name="getBookBinding" type="tns:GetBookPortType">
      <soap:binding style="document"
                transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="GetBook">
         <wsdl:documentation>The operation has no documentation
         </wsdl:documentation>
         <soap:operation style="document" soapAction="/Service/getBook"/>
         <wsdl:input>
            <soap:body use="literal" parts="part1"/>
            <soap:header use="literal"
                     message="tns:TransactionRecordMessage" part="user"/>
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal" parts="part1"/>
            <soap:header use="literal"
                     message="tns:TransactionRecordMessage" part="transactionID"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="getBook">
      <wsdl:port name="getBookHttpPort" binding="tns:getBookBinding">
         <soap:address location="http://ACME:9090/Service/getBook"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>

 
Example Project Folder Structure
Suppose you import the example WSDL above into a Studio project called Library. The imported and generated project artifact names would appear as shown in the Project Folders and Resources column in the table below. Folders that are added by TIBCO BusinessEvents are shown in bold. The example is a concrete WSDL. In the WSDL Source column the source of folder and resource names is given for abstract as well as concrete WSDL sources.
For abstract WSDLS: <wsdl:service> is not present, so the folder structure starts from the folder created from <wsdl:portType>.
For abstract WSDLs, in <wsdl:portType> section.
For concrete WSDLs, in <wsdl:binding> section.
For abstract WSDLs, in <wsdl:portType> section.
For concrete WSDLs, in <wsdl:binding> section.
For abstract WSDLs, in <wsdl:portType> section.
For concrete WSDLs, in <wsdl:binding> section.
For abstract WSDLs, in <wsdl:portType> section.
For concrete WSDLs, in <wsdl:binding> section.
The host and port come from the <soap:address location>
How Project Artifacts are Named
Channel Folders
Given a concrete WSDL, folders are created for all the elements after the port, up to the last forward slash of the location URL. The text after the last forward slash is the channel name. For example, given the following location URL:
http://ACME:9090/Service/Trial/getBook
The folder structure would be /Service/Trial and the channel name would be getBook.
Destination Names
In a concrete WSDL, the SOAPAction attribute of a <soap:operation> element specifies the URL of a destination. It also becomes the destination name. Forward slashes (/), colons (:), and periods (.) are converted to underscore characters (_) to form the name. For example:
http://www.acme.com/TNT/webservices/getByteField
Becomes:
http___www_acme_com_TNT_webservices_getByteField
Rules and Rule Functions
For each operation, the import utility creates a rule and a rule function. The rule has no body. The rule functions have SoapEventOut as the return type. Null value is returned by default.
For example, the GetBook operation becomes a GetBook rule in the GetBookPortType folder which is in the Rules folder, and also a GetBook rule function in the Rulefunctions folder.
You implement the rules and rule functions in your project according to the web service you want to implement.
Events
The <wsdl:input> element becomes a request event and the <wsdl:output> element becomes a response event. Each event type inherits from the SoapEvent event type.
Event names come from the message attributes. In the example, the request event is GetBookRequestMessage and the response event is GetBookResponseMessage.
Faults
Faults specified in a WSDL are used in the outbound SOAP event, as the Fault element.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved