incubator-agila-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronan Barrett <ronan.barr...@computing.dcu.ie>
Subject Combining WSDLs
Date Tue, 10 May 2005 17:41:37 GMT
Hi Matthieu et al.
I've been reading and setting up Twister this week and have come across
an issue i'm sure you guys can resolve.

I'm have a BPEL workflow which executes 3 services and then returns a
response. I'm happy to say I can get 1 to work (i can see the correct
response in the logger & xindice output)  but no more due to the WSDL
import limitation issue outlined in the documentation.

So my question is how do you successfully combine WSDL files which are
normally separate? I have tired to cut and paste but this results in the
2nd server never getting invoked and no response is returned. 

I have tested the files on the IBM WS-BPEL engine and they work well. I
would however like to get them working on Twister as I intend to return
the source code of the project I am building to the community (a Web
Service Topology configuration language).

By the way i'm pretty pleased with your work so far. There are a few
things which could be tidied up in the help files. If I get my proof of
concept up and running I'll work my ideas on to you.

Here are the 3 files of interest (i've altered the flow to 2 services
for brevity).. A 4th file is my bad attempt at merging the WSDLs
1) The workflow BPEL

<process xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
targetNamespace="http://acme.com/wsdl/Hub"
         name="HubService"
xmlns:Hub="http://acme.com/wsdl/Hub"         
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:CoreBanking="http://CoreBanking"
         xmlns:RiskManagement="http://RiskManagement"       
         xmlns:CreditCard="http://CreditCard"
         suppressJoinFailure="yes">
  <partnerLinks>
    <partnerLink name="ClientService" partnerLinkType="Hub:ClientPLT"/>
    <partnerLink name="CoreBankingService"
partnerLinkType="Hub:CoreBankingPLT"/>
    <partnerLink name="RiskManagementService"
partnerLinkType="Hub:RiskManagementPLT"/>
    <partnerLink name="CreditCardService"
partnerLinkType="Hub:CreditCardPLT"/>
  </partnerLinks>
  
  <variables>
    <!-- Variables must be "part" of a message-->
    <variable name="ServiceRequest"
messageType="Hub:ServiceRequestType"/>
    <variable name="ServiceResponse"
messageType="Hub:ServiceResponseType"/>
    <variable name="AccountNameRequest"
messageType="CoreBanking:getAccountNameRequest"/>
    <variable name="AccountNameResponse"
messageType="CoreBanking:getAccountNameResponse"/>
<variable name="RiskAssessmentRequest"
messageType="RiskManagement:getRiskAssessmentRequest"/>
    <variable name="RiskAssessmentResponse"
messageType="RiskManagement:getRiskAssessmentResponse"/>    
<variable name="CreditCardRequest"
messageType="CreditCard:getCreditCardRequest"/>
    <variable name="CreditCardResponse"
messageType="CreditCard:getCreditCardResponse"/>    
  
  </variables>  

  <sequence name="RBseq1">
<receive name="receiveRequest" partnerLink="ClientService"
portType="Hub:HubPortType" 
             operation="Hub" variable="ServiceRequest"
createInstance="yes"/>
              
   <assign name="RBass1">
<copy>
<from variable="ServiceRequest" part="accountNumber"/>
    <to variable="AccountNameRequest" part="accountNumber"/>
</copy>
</assign>               
             
    <invoke name="invokeCoreBanking" partnerLink="CoreBankingService"
portType="CoreBanking:CoreBankingPortType" operation="getAccountName"
            inputVariable="AccountNameRequest"
outputVariable="AccountNameResponse">          
    </invoke>       

   <assign name="RBass2">
    <copy>
    <from expression="boolean('true')"/>
    <to variable="ServiceResponse" part="getCreditCardReturn"/>
</copy>
</assign>     

    <reply name="sendReply" partnerLink="ClientService"
portType="Hub:HubPortType" operation="Hub"
           variable="ServiceResponse">
    </reply>
  </sequence>
</process>

2) The workflow WSDL
<?xml version="1.0"?>
<!-- autogenerate definitions from tdl.xml -->
<definitions name="HubService" 
	targetNamespace="http://acme.com/wsdl/Hub" 
	xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns="http://schemas.xmlsoap.org/wsdl/"	
	xmlns:Hub="http://acme.com/wsdl/Hub"
    xmlns:CoreBanking="http://CoreBanking"
    xmlns:RiskManagement="http://RiskManagement"
    xmlns:CreditCard="http://CreditCard">
                
   <message name="ServiceRequestType">
      <part name="accountNumber" type="xsd:int"/>
   </message>
   <message name="ServiceResponseType">
      <part name="getCreditCardReturn" type="xsd:boolean"/>
   </message>    
                
	<!--end autogenerate-->
	<portType name="HubPortType">
		<operation name="Hub">
			<input message="Hub:ServiceRequestType"/>
			<output message="Hub:ServiceResponseType"/>
		</operation>
	</portType>

  <plt:partnerLinkType name="ClientPLT">
    <plt:role name="Client">
      <plt:portType name="Hub:HubPortType"/>
    </plt:role>
  </plt:partnerLinkType>

  <plt:partnerLinkType name="CoreBankingPLT">
    <plt:role name="CoreBanking">
      <plt:portType name="CoreBanking:CoreBankingPortType"/>
    </plt:role>
  </plt:partnerLinkType>
  
  <plt:partnerLinkType name="RiskManagementPLT">
    <plt:role name="RiskManagement">
      <plt:portType name="RiskManagement:RiskManagementPortType"/>
    </plt:role>
  </plt:partnerLinkType>  
  
  <plt:partnerLinkType name="CreditCardPLT">
    <plt:role name="CreditCard">
      <plt:portType name="CreditCard:CreditCardPortType"/>
    </plt:role>
  </plt:partnerLinkType>  
  
	<!-- end autogenerate-->
	<service name="HubService">
   </service>
</definitions>

3) The external web service WSDL
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://CoreBanking"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://CoreBanking" xmlns:intf="http://CoreBanking"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2RC3
Built on Feb 28, 2005 (10:15:14 EST)-->

   <wsdl:message name="getAccountNameRequest">

      <wsdl:part name="accountNumber" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="getAccountNameResponse">

      <wsdl:part name="getAccountNameReturn" type="xsd:string"/>

   </wsdl:message>

   <wsdl:portType name="CoreBanking">

      <wsdl:operation name="getAccountName"
parameterOrder="accountNumber">

         <wsdl:input message="impl:getAccountNameRequest"
name="getAccountNameRequest"/>

         <wsdl:output message="impl:getAccountNameResponse"
name="getAccountNameResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="CoreBankingSoapBinding" type="impl:CoreBanking">

      <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="getAccountName">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getAccountNameRequest">

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="getAccountNameResponse">

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="CoreBankingService">

      <wsdl:port binding="impl:CoreBankingSoapBinding"
name="CoreBanking">

         <wsdlsoap:address
location="http://localhost:8080/axis/services/CoreBanking"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>

4) The merged WSDL which does not work...
<?xml version="1.0"?>
<!-- autogenerate definitions from tdl.xml -->
<definitions name="HubService" 
	targetNamespace="http://acme.com/wsdl/Hub" 
	xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns="http://schemas.xmlsoap.org/wsdl/"	
	xmlns:Hub="http://acme.com/wsdl/Hub"
	xmlns:impl="http://CoreBanking"
    	xmlns:CoreBanking="http://CoreBanking"
    	xmlns:RiskManagement="http://RiskManagement"
    	xmlns:CreditCard="http://CreditCard"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
	xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:apachesoap="http://xml.apache.org/xml-soap"  
	xmlns:intf="http://CoreBanking"
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

  <plt:partnerLinkType name="ClientPLT">
    <plt:role name="Client">
      <plt:portType name="Hub:HubPortType"/>
    </plt:role>
  </plt:partnerLinkType>

  <plt:partnerLinkType name="CoreBankingPLT">
    <plt:role name="CoreBanking">
      <plt:portType name="CoreBanking:CoreBankingPortType"/>
    </plt:role>
  </plt:partnerLinkType>
  
  <plt:partnerLinkType name="RiskManagementPLT">
    <plt:role name="RiskManagement">
      <plt:portType name="RiskManagement:RiskManagementPortType"/>
    </plt:role>
  </plt:partnerLinkType>  
  
  <plt:partnerLinkType name="CreditCardPLT">
    <plt:role name="CreditCard">
      <plt:portType name="CreditCard:CreditCardPortType"/>
    </plt:role>
  </plt:partnerLinkType>
 
   <wsdl:message name="ServiceRequestType">
      <wsdl:part name="accountNumber" type="xsd:int"/>
   </wsdl:message>
   <wsdl:message name="ServiceResponseType">
      <wsdl:part name="getCreditCardReturn" type="xsd:boolean"/>
   </wsdl:message>    
                
   <wsdl:message name="getAccountNameRequest">

      <wsdl:part name="accountNumber" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="getAccountNameResponse">

      <wsdl:part name="getAccountNameReturn" type="xsd:string"/>

   </wsdl:message>


	<wsdl:portType name="HubPortType">
		<wsdl:operation name="Hub">
			<wsdl:input message="ServiceRequestType"/>
			<wsdl:output message="ServiceResponseType"/>
		</wsdl:operation>
	</wsdl:portType>

   <wsdl:portType name="CoreBanking">

      <wsdl:operation name="getAccountName"
parameterOrder="accountNumber">

         <wsdl:input message="impl:getAccountNameRequest"
name="getAccountNameRequest"/>

         <wsdl:output message="impl:getAccountNameResponse"
name="getAccountNameResponse"/>

      </wsdl:operation>

   </wsdl:portType>  
  
   <wsdl:binding name="CoreBankingSoapBinding" type="impl:CoreBanking">

      <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="getAccountName">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getAccountNameRequest">

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="getAccountNameResponse">

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

	<!-- end autogenerate-->
   <wsdl:service name="HubService">
   </wsdl:service>
	<wsdl:service name="CoreBankingService">
      		<wsdl:port binding="impl:CoreBankingSoapBinding"
name="CoreBanking">
        	 	<wsdlsoap:address
location="http://localhost:8080/axis/services/CoreBanking"/>
		</wsdl:port>
	</wsdl:service>
</definitions>

Thanks in advance and good work!
Regards,
Ronan



Mime
View raw message