To set up the Document Flow Definition, you upload the WSDL (Web Service Definition Language) files that define the Web service, as described in Configuring the hub. Alternatively, you can enter the equivalent Document Flow Definitions manually through the Community Console.
To enter the equivalent Document Flow Definitions manually, follow the procedures in Creating a document definition flow. You must also create the Document Flow, Activity and Action entries individually under the Protocol Web Service, as described below, paying particular attention to the requirements for the Action and its relationship to the received SOAP messages.
In terms of the Package/Protocol/Document Flow/Activity/Action hierarchy of Document Flow Definitions, a supported Web service is represented as:
Package: None (name and code), version N/A
Protocol: Web Service (name and code), version 1.0
Document Flow: '{<web service namespace>}:<web
service name>' (name and code), which is required to be
unique among document flows for the Web Service protocol. This is
typically the WSDL's namespace and name
Activities: One activity for each Web service operation,
with name and code:
'{<operation namespace>}:<operation name>'
Actions: One action for the input message of each operation, with name and code:
'{<namespace of identifying xml element = first child of soap:body>}:<name of identifying xml element = first child of soap:body>'
The critical definitions are the Actions because WebSphere Business Integration Connect will use an Action's namespace and name to recognize an incoming Web service request SOAP message and route it appropriately based on a defined participant connection. The namespace and name of the first child XML element of the received SOAP message's soap:body element must match a known Action's namespace and name in WebSphere Business Integration Connect's Document Flow Definitions.
For example, if a Web service request SOAP message is as follows (for a Document-Literal SOAP binding):
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/ 2001/XMLSchema-instance"> <soapenv:Body> <nameAndAddressElt xmlns="http://www.helloworld.com/xsd/helloDocLitSchema"> <titleElt xmlns="">Mr</titleElt> <nameElt xmlns="">Joe Smith</nameElt> <addressElt xmlns=""> <numberElt>123</numberElt> <streetElt>Elm St</streetElt> <cityElt>Peoria</cityElt> </addressElt> </nameAndAddressElt> </soapenv:Body> </soapenv:Envelope>
Then WebSphere Business Integration Connect would look for a
defined Web Service Action with this code:
{http://www.helloworld.com/xsd/helloDocLitSchema}:nameAndAddressElt
For an RPC binding style SOAP request message for example:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/ 2001/XMLSchema-instance"> <soapenv:Body> <ns1:helloWorldRPC soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/ encoding/ xmlns:ns1="http://www.helloworld.com/helloRPC"> <name xsi:type="xsd:string">Joe Smith</name> </ns1:helloWorldRPC> </soapenv:Body> </soapenv:Envelope>
WebSphere Business Integration Connect would look for a defined Web Service action with this code: {http://www.helloworld.com/helloRPC}:helloWorldRPC
For an RPC binding, the namespace and name of the first child element of the soap:body of a SOAP request message should be the namespace and name of the applicable Web service operation.
For Document-Literal binding, the namespace and name of the first child element of the soap:body of a SOAP request message should be the namespace and name of the XML 'element' attribute in the 'part' element of the input 'message' definition for the Web service.
The definition for a Web service should be contained in a primary WSDL file, with extension ".wsdl", which might import additional WSDL files through the "import" element. If there are imported files, these may be uploaded with the primary file using one of the following methods:
Example:
Primary WSDL file 'helloworldRPC.wsdl' contains
'<import namespace="http://www.helloworld.com/wsdl/helloRPC.wsdl" location= "bindingRPC.wsdl"/>'
Imported WSDL file 'bindingRPC.wsdl' contains
'<import namespace="http://www.helloworld.com/wsdl/helloRPC.wsdl" location= "port/porttypeRPC.wsdl"/>'
Zip file should contain the following:
Name Path helloworldRPC.wsdl bindingRPC.wsdl porttypeRPC.wsdl port\
When a WSDL file definition of a Web service is uploaded, the original WSDL is saved as a Validation Map. (Web service messages are not actually validated by WebSphere Business Integration Connect. They are passed through directly, with the original service end-point URL.) This is called the private WSDL.
In addition a public WSDL is saved with the private URL replaced by a target URL, as provided by the user in the Document Flow Upload input. The public WSDL will be provided to the users of the Web service, who will invoke the Web service at the target's URL (the public URL). WebSphere Business Integration Connect will then route the Web service request to a gateway that is the original Web service provider's private URL. WebSphere Business Integration Connect acts as a proxy, forwarding the Web service request to a private provider URL, which is hidden from the Web service user.
Both the private and public WSDLs (including any imported files) can be downloaded from the Community Console after the WSDL has been uploaded.
Business Integration Connect provides a way to import WSDL files. If a Web service is defined in a single WSDL file, you can upload the WSDL file directly. If the web service is defined using multiple WSDL files (this happens when you have imported WSDL files, within a primary WSDL file), they would be uploaded in a ZIP archive.
To upload a single WSDL file or ZIP archive, use the following procedure.
For a Web service provided by a participant (which will be invoked by the Community Manager), enter the public URL of the participant with a query string. For example, http(s)://<target host:port>/bcgreceiver/Receiver?to=<participant business ID>.
A set of XML schemas that describe the XML files that can be uploaded through the console is provided on the Business Integration Connect installation medium. Uploaded files are validated against these schemas. The schema files are a useful reference for determining the cause of an error when a file cannot be uploaded because of non-conforming XML. The files are: wsdl.xsd, wsdlhttp.xsd, and wsdlsoap.xsd, which contain the schema describing valid Web Service Definition Language (WSDL) files.
The files are located in: B2BIntegrate\packagingSchemas
The final step in creating the necessary Document Flow Definitions for a new Web service is to set up an interaction with the same Web service Document Flow Action as both the Source and the Target.
To create interactions, use the following procedure.