2 Replies Latest reply on Feb 27, 2007 2:51 AM by agusgr

    Problem: BPEL Designer

      Hello,
      I' working with Eclipse 3.2.1 and the Eclipse BPEL Designer Runtimes 0.2.0.
      The server is jBoss 4.04 GA with jbpm-bpel-1.1.Beta2.
      I'm developing a very simple bpel process with an invocation to a external web service (the account service of the atm example).
      I have the following files:

      account.wsdl and client.wsdl: with the operations and messages of the web services
      processBankArtifacts.wsdl: a file with the partner links definitions.
      processBank.bpel:a file whit my procces definition.
      I also have a processBank.bpelex file.

      processBankArtifacts.wsdl and processBank.bpelex are generated automatically.
      I import all the files in the bpel-definition.xml, but when I execute the deploy-definition task I foud this error:

      2007-02-23 10:37:11,968 ERROR [org.jbpm.bpel.xml.ProblemHandler] processBank.bpel bpel process is invalid
      org.jbpm.bpel.xml.BpelException: first role's port type not found [/bpws:process/bpws:partnerLinks/bpws:partnerLink[1]]

      The files are:
      client.wsdl
      <?xml version="1.0"?>
      <definitions name="client"
       targetNamespace="urn:samples:cli"
       xmlns:tns="urn:samples:cli"
       xmlns="http://schemas.xmlsoap.org/wsdl/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       MESSAGE TYPE DEFINITION - Definition of the message types used as
       part of the port type defintions
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       <message name="clientRequestMessage">
       <part name="name" type="xsd:string"/>
       </message>
       <message name="clientResponseMessage">
       <part name="balance" type="xsd:double"/>
       </message>
      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       PORT TYPE DEFINITION - A port type groups a set of operations into
       a logical service unit.
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       <!-- portType implemented by the procesoBalance BPEL process -->
       <portType name="ClientPort">
       <operation name="getBalance">
       <input message="tns:clientRequestMessage" />
       <output message="tns:clientResponseMessage"/>
       </operation>
       </portType>
      </definitions>
      

      account.wsdl
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions targetNamespace="urn:samples:account" xmlns="http://schemas.xmlsoap.org/wsdl/"
       xmlns:tns="urn:samples:account" xmlns:typ="urn:samples:account"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
       http://schemas.xmlsoap.org/wsdl/">
      
       <types>
      
       <schema targetNamespace="urn:samples:account" xmlns="http://www.w3.org/2001/XMLSchema">
      
       <complexType name="AccountOperation">
       <sequence>
       <element name="customerName" type="xsd:string" />
       <element name="amount" type="xsd:double" />
       </sequence>
       </complexType>
      
       </schema>
      
       </types>
      
       <message name="customerMessage">
       <part name="customerName" type="xsd:string" />
       </message>
      
       <message name="accessMessage">
       <part name="granted" type="xsd:boolean" />
       </message>
      
       <message name="balanceMessage">
       <part name="balance" type="xsd:double" />
       </message>
      
       <message name="accountOperation">
       <part name="body" type="typ:AccountOperation" />
       </message>
      
       <portType name="AccountSystem">
      
       <operation name="checkAccess">
       <input message="tns:customerMessage" />
       <output message="tns:accessMessage" />
       </operation>
      
       <operation name="queryBalance">
       <input message="tns:customerMessage" />
       <output message="tns:balanceMessage" />
       </operation>
      
       <operation name="updateBalance">
       <input message="tns:accountOperation" />
       <output message="tns:balanceMessage" />
       </operation>
      
       </portType>
      </definitions>
      

      processBankArtifacts.wsdl
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
       xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
      xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
      xmlns:tns="urn:samples:processArtifacts"
      xmlns:wsdl="urn:samples:account" xmlns:wsdl1="urn:samples:cli"
      name="processBankArtifacts"
      targetNamespace="urn:samples:processArtifacts">
      <plnk:partnerLinkType name="Process-Account">
      <plnk:role name="Account" portType="wsdl:AccountSystem"/>
      </plnk:partnerLinkType>
       <plnk:partnerLinkType name="Client-Process">
      <plnk:role name="Client" portType="wsdl1:ClientPort"/>
      </plnk:partnerLinkType>
       <import location="account.wsdl" namespace="urn:samples:account"/>
       <import location="client.wsdl" namespace="urn:samples:cli"/>
      </definitions>
      
      

      processBank.bpel
      <?xml version="1.0" encoding="UTF-8"?>
      <bpws:process xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
       xmlns:ns="urn:samples:processArtifacts" xmlns:ns0="urn:samples:cli"
       xmlns:ns1="urn:samples:account" xmlns:tns="urn:samples:process"
       exitOnStandardFault="yes" name="processBank"
       suppressJoinFailure="yes" targetNamespace="urn:samples:process">
      <bpws:import importType="http://schemas.xmlsoap.org/wsdl/" location="client.wsdl" namespace="urn:samples:cli"/>
      <bpws:import importType="http://schemas.xmlsoap.org/wsdl/" location="account.wsdl" namespace="urn:samples:account"/>
      <bpws:import importType="http://schemas.xmlsoap.org/wsdl/" location="processBankArtifacts.wsdl" namespace="urn:samples:processArtifacts"/>
      <bpws:partnerLinks>
      <bpws:partnerLink myRole="Client" name="Client" partnerLinkType="ns:Client-Process"/>
      <bpws:partnerLink name="Bank" partnerLinkType="ns:Process-Account" partnerRole="Account"/>
      </bpws:partnerLinks>
      <bpws:variables>
      <bpws:variable messageType="ns0:clientRequestMessage" name="ClientRequest"/>
      <bpws:variable messageType="ns0:clientResponseMessage" name="ClientResponse"/>
      <bpws:variable messageType="ns1:balanceMessage" name="BankResponse"/>
      <bpws:variable messageType="ns1:customerMessage" name="BankRequest"/>
      </bpws:variables>
      <bpws:sequence>
      <bpws:receive createInstance="yes" name="Receive" operation="getBalance" partnerLink="Client" portType="ns0:ClientPort" variable="ClientRequest"/>
      <bpws:assign name="Assign" validate="no">
      <bpws:copy>
      <bpws:from part="name" variable="ClientRequest"/>
      <bpws:to part="customerName" variable="BankRequest"/>
      </bpws:copy>
      </bpws:assign>
      <bpws:invoke inputVariable="BankRequest" name="Invoke" operation="queryBalance" outputVariable="BankResponse" partnerLink="Bank" portType="ns1:AccountSystem"/>
      <bpws:assign name="Assign1" validate="no">
      <bpws:copy>
      <bpws:from part="balance" variable="BankResponse"/>
      <bpws:to part="balance" variable="ClientResponse"/>
      </bpws:copy>
      </bpws:assign>
      <bpws:reply name="Reply" operation="getBalance" partnerLink="Client" portType="ns0:ClientPort" variable="ClientResponse"/>
      </bpws:sequence>
      </bpws:process>
      


      Where is the problem?
      Please, can someone help me?
      Sorry for the long post and thanks in advance

      Agus

        • 1. Re: Problem: BPEL Designer
          aguizar

          The WSDL library we use (WSDL4J) seems to be sensitive to the order in which definitions appear in the WSDL document. Your processBankArtifacts.wsdl file references port type Client-Process before it imports the file that contains its declaration, client.wsdl.

          Try moving the imports above your partner link types.

          • 2. Re: Problem: BPEL Designer

            Thank you Alejandro.

            Agus