0 Replies Latest reply on Dec 7, 2006 2:58 PM by bertrand.njiipwo

    Application Descriptor: WS invokation with unknow name from

      Hello @all,

      i'm facing the following problem:

      I'm trying to call a web service from a well know category (schufa, travelAgency f.e.) but at calling time the name of the web service is unknow (see. Background infos).

      My problem: At the design time i don't know the name of the WS which will be invoke. Therefore i can't not specify the name of that WS but only the cathegory name in the URL "http://somemachine:8089/context/services/travelAgency".

      If i specify for example in {JBPM.BPEL.EXAMPLE}/hello/web/wsdl/bpel-application.xml following:

      <partnerLink name="Approving">
       <partnerRole>
       <wsa:EndpointReference xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
       <wsa:Address>USE_ACTUAL_URI_FROM_CATALOG</wsa:Address>
       <wsa:ServiceName xmlns:travelAgency="urn:samples:travelAgency">travelAgency:TravelAgencyService</wsa:ServiceName>
       </wsa:EndpointReference>
       </partnerRole>
       </partnerLink>
       </partnerLinks>
       <serviceCatalogs>
       <urlCatalog contextUrl="http://localhost:8080/">
       <!-- published WSDL document of the remote service -->
       <wsdl location="context/services/travelAgency"/>
       </urlCatalog>
       </serviceCatalogs>
      


      For the concret case where a WS with name TravelAgencyA is the best one the config will look like:
      <serviceCatalogs>
       <urlCatalog contextUrl="http://localhost:8080/">
       <!-- published WSDL document of the remote service -->
       <wsdl location="context/service/travelAgencyA?wsdl"/>
       </urlCatalog>
       </serviceCatalogs>



      Q: If is use did i explicitly need to incorporate the SOAPMessage in the HTTP-Request in the code or it's done automaticaly before the web service call?


      the HTTP-Request is routed and received by the performance module but didn't contain the parameters in the SOAPMessage before the ws call.



      For Background:

      The problem is that at the time clients (BPEL-process) make a WS call they know only the name of the category (schufa, travelAgency). Some perfomance module will call the best service when the request is receive.

      For this purpose clients just need to specify in their HTTP-request the name of the category: ("http://localhost:8089/context/travelAgency") they request. Service provider register web services under that category an the choise of which WS to invoke is token on the fly.

      So my problem is that i know only the WSDL-Description of services in that named cathegory (All WSs in that category implement the same interface).

      schufa.wsdl
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:samples:schufa" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" targetNamespace="urn:samples:schufa" name="SchufaService">
       <message name="validCustomerRequest">
       <part name="_surname" type="xsd:string"/>
       <part name="_firstname" type="xsd:string"/>
       </message>
       <message name="validCustomerResponse">
       <part name="validCustomerReturn" type="xsd:string"/>
       </message>
       <portType name="SchufaWS">
       <operation name="validCustomer" parameterOrder="_surname _firstname">
       <input name="validCustomerRequest" message="tns:validCustomerRequest"/>
       <output name="validCustomerResponse" message="tns:validCustomerResponse"/>
       </operation>
       </portType>
      </definitions>
      

      schufa.impl.wsdl
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:samples:schufa" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="urn:samples:schufa" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
       http://schemas.xmlsoap.org/wsdl/">
       <import namespace="urn:samples:schufa" location="schufa.wsdl"/>
       <binding name="SchufaSOAPBinding" type="tns:SchufaWS">
       <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
       <operation name="validCustomer">
       <soap:operation soapAction="urn:samples:schufa:validCustomer"/>
       <input>
       <soap:body use="literal" namespace="urn:samples:schufa"/>
       </input>
       <output>
       <soap:body use="literal" namespace="urn:samples:schufa"/>
       </output>
       </operation>
       </binding>
       <service name="SchufaService">
       <port name="schufaPort" binding="tns:SchufaSOAPBinding">
       <soap:address location="REPLACE_WITH_ACTUAL_URI"/>
       </port>
       </service>
      </definitions>
      

      Process interface
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:samples:loanapproval" xmlns:loanapproval="urn:samples:loanapproval" xmlns:schufa="urn:samples:schufa" xmlns:types="urn:samples:loanapprovalTypes" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" targetNamespace="urn:samples:loanapproval">
       <import namespace="urn:samples:schufa" location="interface/schufa.wsdl"/>
       <types>
       <schema targetNamespace="urn:samples:loanapprovalTypes" xmlns="http://www.w3.org/2001/XMLSchema">
       <element name="loanProcessFault" type="types:loanProcessFaultType"/>
       <complexType name="loanApplicationType">
       <sequence>
       <element name="firstName" type="string"/>
       <element name="lastName" type="string"/>
       <element name="amount" type="float"/>
       </sequence>
       </complexType>
       <complexType name="approvalDecisionType">
       <sequence>
       <!--element name="approved" type="boolean"/-->
       <element name="approved" type="string"/>
       </sequence>
       </complexType>
       <complexType name="loanProcessFaultType">
       <sequence>
       <element name="ErrorCode" type="int"/>
       <element name="ErrorMessage" type="string"/>
       </sequence>
       </complexType>
       </schema>
       </types>
       <message name="applyRequest">
       <part name="loanRequestParameters" type="types:loanApplicationType"/>
       </message>
       <message name="applyResponse">
       <part name="loanResponse" type="types:approvalDecisionType"/>
       </message>
       <message name="applyLoanProcessFault">
       <part name="loanFault" element="types:loanProcessFault"/>
       </message>
       <portType name="LoanProcessPortType">
       <operation name="apply">
       <input message="tns:applyRequest"/>
       <output message="tns:applyResponse"/>
       <fault name="LoanProcessFault" message="tns:applyLoanProcessFault"/>
       </operation>
       </portType>
       <!-- Describe the relation between the -->
       <plt:partnerLinkType name="LoanProcessingPLT">
       <plt:role name="lender">
       <plt:portType name="tns:LoanProcessPortType"/>
       </plt:role>
       </plt:partnerLinkType>
       <!-- Describe the relation between the -->
       <plt:partnerLinkType name="SchufaPLT">
       <plt:role name="schufa">
       <plt:portType name="schufa:SchufaWS"/>
       </plt:role>
       </plt:partnerLinkType>
      </definitions>


      BPEL Process:
      <process name="loanapproval" suppressJoinFailure="yes" targetNamespace="urn:samples:loanapproval" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:tns="urn:samples:loanapproval" xmlns:loanapproval="urn:samples:loanapproval" xmlns:schufa="urn:samples:schufa" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/
       http://schemas.xmlsoap.org/ws/2003/03/business-process/">
       <partnerLinks>
       <partnerLink name="LoanProcessing" partnerLinkType="loanapproval:LoanProcessingPLT" myRole="lender"/>
       <partnerLink name="SchufaLink" partnerLinkType="tns:SchufaPLT" partnerRole="schufa"/>
       </partnerLinks>
       <variables>
       <variable name="applyRequest" messageType="loanapproval:applyRequest"/>
       <variable name="applyResponse" messageType="loanapproval:applyResponse"/>
       <variable name="schufaRequest" messageType="schufa:validCustomerRequest"/>
       <variable name="schufaResponse" messageType="schufa:validCustomerResponse"/>
       </variables>
       <sequence>
       <receive createInstance="yes" name="LoanApplication" operation="apply" partnerLink="LoanProcessing" portType="loanapproval:LoanProcessPortType" variable="applyRequest"/>
       <assign name="AssignLoanInfo_forApproval">
       <copy>
       <from variable="applyRequest" query="/loanRequestParameters/lastName" part="loanRequestParameters"/>
       <to variable="schufaRequest" part="_surname"/>
       </copy>
       <copy>
       <from variable="applyRequest" query="/loanRequestParameters/firstName" part="loanRequestParameters"/>
       <to variable="schufaRequest" part="_firstname"/>
       </copy>
       </assign>
       <invoke inputVariable="schufaRequest" name="SchufaCheck" operation="validCustomer" outputVariable="schufaResponse" partnerLink="SchufaLink" portType="schufa:SchufaWS"/>
       <assign name="AssignSchufaDecision">
       <copy>
       <from variable="schufaResponse" part="validCustomerReturn"/>
       <to variable="applyResponse" query="/loanResponse/approved" part="loanResponse"/>
       </copy>
       </assign>
       <reply name="ApprovalDecision" operation="apply" partnerLink="LoanProcessing" portType="loanapproval:LoanProcessPortType" variable="applyResponse"/>
       </sequence>
      </process>
      
      


      I'm runnig with the configuration: JBoss AS 4.0.4.GA, jbpm.bpel1-beta1, jbpm-3.1. java 1.5.06, jwsdp-1.6, ant-1.6.5


      Any suggestion howto configure my bpel-application descriptor (bpel-application.xml)? Any advice will help a lot.

      Thanks in advance.

      Bertrand

      My