1

i'm trying to do a simple service orchestration using BPEL: i have a service with an operation that lets me to upload a file and i want to orchestrate it with a process that allows me to upload more than one file.

To achieve this i defined an input variabile that is an array of custom elements each one containing a string (the name) and a base64Binary (the file content).

What i'm trying to do is to receive those files and invoke the upload service with a ForEach loop that iterates until all the files are uploaded.

I've successfully deployed my process in Apache ODE and i've generated a client using WSDL2Java to test it. The problem is that when i call the service i get an Axis Fault:

Exception in thread "main" org.apache.axis2.AxisFault: axis2ns75:selectionFailure
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at _import.invocation.ws.ImportOrchestrationStub.process(ImportOrchestrationStub.java:182)
at it.italsystem.client.Client.main(Client.java:58)

The exception is thown in the moment i call stub's process method.

I've read that usually you get this failure when you try to use some variable that hasn't been initialized, but they should be, since i'm using BPEL designer for Eclipse and when i add some assign activity it asks me if i want to initialize the variables.

I hope someone can give me some advice, or tell me if i'm doing something stupid, since i'm quite new to BPEL :)

Here it is my process' code:

<bpel:process name="ImportOrchestration"
     targetNamespace="http://ws.invocation.import"
     suppressJoinFailure="yes"
     xmlns:tns="http://ws.invocation.import"
     xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
     xmlns:ns1="http://services.italsystem.it">

<!-- Import the client WSDL -->
<!-- <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import> -->
<bpel:import namespace="http://services.italsystem.it" location="ImportModule.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
<bpel:import location="ImportOrchestrationArtifacts.wsdl" namespace="http://ws.invocation.import" 
        importType="http://schemas.xmlsoap.org/wsdl/" />

<!-- ================================================================= -->         
<!-- PARTNERLINKS                                                      -->
<!-- List of services participating in this BPEL process               -->
<!-- ================================================================= -->         
<bpel:partnerLinks>
    <!-- The 'client' role represents the requester of this service. -->
    <bpel:partnerLink name="client"
                 partnerLinkType="tns:ImportOrchestration"
                 myRole="ImportOrchestrationProvider"
                 />

    <bpel:partnerLink name="ImportPL" partnerLinkType="tns:ImportType" partnerRole="ImportRole"></bpel:partnerLink>
</bpel:partnerLinks>

<!-- ================================================================= -->         
<!-- VARIABLES                                                         -->
<!-- List of messages and XML documents used within this BPEL process  -->
<!-- ================================================================= -->         
<bpel:variables>
    <!-- Reference to the message passed as input during initiation -->
    <bpel:variable name="input"
              messageType="tns:ImportOrchestrationRequestMessage"/>

    <!-- 
      Reference to the message that will be returned to the requester
      -->
    <bpel:variable name="output"
              messageType="tns:ImportOrchestrationResponseMessage"/>

    <bpel:variable name="ImportPLRequest" element="ns1:importSingleFile"/>
    <bpel:variable name="ImportPLResponse" element="ns1:importFileResponse"/>          

</bpel:variables>

<!-- ================================================================= -->         
<!-- ORCHESTRATION LOGIC                                               -->
<!-- Set of activities coordinating the flow of messages across the    -->
<!-- services integrated within this business process                  -->
<!-- ================================================================= -->         
<bpel:sequence name="main"><!-- Receive input from requester. 
         Note: This maps to operation defined in ImportOrchestration.wsdl 
         -->
    <bpel:receive name="receiveInput" partnerLink="client" portType="tns:ImportOrchestration" operation="process" variable="input" createInstance="yes" />

    <!-- Generate reply to synchronous request -->
    <bpel:forEach parallel="no" counterName="Counter" name="ForEach" xmlns:http="urn:http:namesapce">
        <bpel:startCounterValue>1</bpel:startCounterValue>
        <bpel:finalCounterValue>
            <![CDATA[count($input.payload/tns:file/tns:name)]]>
        </bpel:finalCounterValue>
        <bpel:scope>
            <bpel:sequence>
                <bpel:assign validate="no" name="Assign">
                    <bpel:copy>
                        <bpel:from>
                            <![CDATA[$input.payload/tns:file/tns:name]]>
                        </bpel:from>
                        <bpel:to variable="ImportPLRequest">
                            <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:name]]></bpel:query>
                        </bpel:to>
                    </bpel:copy>
                    <bpel:copy>
                        <bpel:from>
                            <![CDATA[$input.payload/tns:file/tns:content]]>
                        </bpel:from>
                        <bpel:to variable="ImportPLRequest">
                            <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:content]]></bpel:query>
                        </bpel:to>
                    </bpel:copy>
                </bpel:assign>
                <bpel:invoke name="Invoke" partnerLink="ImportPL" operation="importSingleFile" portType="ns1:ImportServicePortType" inputVariable="ImportPLRequest1" outputVariable="ImportPLResponse1"></bpel:invoke>

            </bpel:sequence>
            <bpel:variables>
                <bpel:variable name="ImportPLResponse1" messageType="ns1:importSingleFileResponse"></bpel:variable>
                <bpel:variable name="ImportPLRequest1" messageType="ns1:importSingleFileRequest"></bpel:variable>
            </bpel:variables>
        </bpel:scope>
    </bpel:forEach>

    <bpel:assign validate="no" name="Assign1">
        <bpel:copy>
            <bpel:from>
                <bpel:literal xml:space="preserve">&quot;Done!&quot;</bpel:literal>
            </bpel:from>
            <bpel:to part="payload" variable="output">
                <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
            </bpel:to>
        </bpel:copy>
    </bpel:assign>
    <bpel:reply name="replyOutput" partnerLink="client" portType="tns:ImportOrchestration" operation="process" variable="output" />

</bpel:sequence>
</bpel:process>

UPDATE: after your advices i made some changes, here are the results:

<bpel:process name="ImportOrchestration"
     targetNamespace="http://ws.invocation.import"
     suppressJoinFailure="yes"
     xmlns:tns="http://ws.invocation.import"
     xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
     xmlns:ns1="http://services.italsystem.it">

<bpel:import namespace="http://services.italsystem.it" location="ImportModule.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
<bpel:import location="ImportOrchestrationArtifacts.wsdl" namespace="http://ws.invocation.import" 
        importType="http://schemas.xmlsoap.org/wsdl/" />

<bpel:partnerLinks>
    <bpel:partnerLink name="client"
                 partnerLinkType="tns:ImportOrchestration"
                 myRole="ImportOrchestrationProvider"
                 />

    <bpel:partnerLink name="ImportPL" partnerLinkType="tns:ImportType" partnerRole="ImportRole"></bpel:partnerLink>
</bpel:partnerLinks>

<bpel:variables>
    <bpel:variable name="input"
              messageType="tns:ImportOrchestrationRequestMessage"/>
    <bpel:variable name="output"
              messageType="tns:ImportOrchestrationResponseMessage"/>
    <bpel:variable name="ImportPLResponse" messageType="ns1:importSingleFileResponse"></bpel:variable>
    <bpel:variable name="ImportPLRequest" messageType="ns1:importSingleFileRequest"></bpel:variable>                  
</bpel:variables>

<bpel:sequence name="main">
    <bpel:receive name="receiveInput" partnerLink="client" portType="tns:ImportOrchestration" operation="process" variable="input" createInstance="yes" />

    <bpel:forEach parallel="no" counterName="Counter" name="ForEach" xmlns:http="urn:http:namesapce">
        <bpel:startCounterValue>1</bpel:startCounterValue>
        <bpel:finalCounterValue>
            <![CDATA[count($input.payload/tns:file/tns:name)]]>
        </bpel:finalCounterValue>
        <bpel:scope>
            <bpel:sequence>
                <bpel:assign validate="no" name="InitializeAssign">
                    <bpel:copy>
                        <bpel:from>
                            <bpel:literal xml:space="preserve">0</bpel:literal>
                        </bpel:from>
                        <bpel:to part="parameters" variable="ImportPLRequest">
                            <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:name]]></bpel:query>
                        </bpel:to>
                    </bpel:copy>
                    <bpel:copy>
                        <bpel:from>
                            <bpel:literal xml:space="preserve">0</bpel:literal>
                        </bpel:from>
                        <bpel:to part="parameters" variable="ImportPLRequest">
                            <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:content]]></bpel:query>
                        </bpel:to>
                    </bpel:copy>
                </bpel:assign>
                <bpel:assign validate="no" name="Assign">

                    <bpel:copy>
                        <bpel:from>
                            <![CDATA[$input.payload/tns:file/tns:name]]>
                        </bpel:from>
                        <bpel:to variable="ImportPLRequest">
                            <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:name]]></bpel:query>
                        </bpel:to>
                    </bpel:copy>
                    <bpel:copy>
                        <bpel:from>
                            <![CDATA[$input.payload/tns:file/tns:content]]>
                        </bpel:from>
                        <bpel:to variable="ImportPLRequest">
                            <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:content]]></bpel:query>
                        </bpel:to>
                    </bpel:copy>
                </bpel:assign>
                <bpel:invoke name="Invoke" partnerLink="ImportPL" operation="importSingleFile" portType="ns1:ImportServicePortType" inputVariable="ImportPLRequest" outputVariable="ImportPLResponse"></bpel:invoke>

            </bpel:sequence>
        </bpel:scope>
    </bpel:forEach>

    <bpel:assign validate="no" name="Assign1">

        <bpel:copy>
            <bpel:from>
                <bpel:literal xml:space="preserve">DONE</bpel:literal>
            </bpel:from>
            <bpel:to part="payload" variable="output">
                <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
            </bpel:to>
        </bpel:copy>
    </bpel:assign>
    <bpel:reply name="replyOutput" partnerLink="client" portType="tns:ImportOrchestration" operation="process" variable="output" />

</bpel:sequence>
</bpel:process>

Here there is also the WSDL file generated by Eclipse BPEL Designer:

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.invocation.import" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="http://services.italsystem.it" name="ImportOrchestration" targetNamespace="http://ws.invocation.import">

<plnk:partnerLinkType name="ImportType">
<plnk:role name="ImportRole" portType="wsdl:ImportServicePortType"/>
</plnk:partnerLinkType>
<import location="ImportModule.wsdl" namespace="http://services.italsystem.it"/>
<types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://ws.invocation.import">

        <element name="ImportOrchestrationRequest" type="tns:ImportOrchestrationReqType">
        </element>

        <element name="singleEntry">
            <complexType>
                <sequence>
                    <element minOccurs="0" name="name" nillable="true" type="string"/>
                    <element minOccurs="0" name="content" nillable="true" type="base64Binary"/>
                </sequence>
            </complexType>
        </element>

        <element name="ImportOrchestrationResponse">
            <complexType>
                <sequence>
                    <element name="result" type="string"/>
                </sequence>
            </complexType>
        </element>

        <complexType name="ImportOrchestrationReqType">
            <sequence minOccurs="1" maxOccurs="unbounded">
                <element name="file" type="tns:SingleFile"></element>
            </sequence>
        </complexType>

        <complexType name="SingleFile">
            <sequence>
                <element name="name" type="string"></element>
                <element name="content" type="base64Binary"></element>
            </sequence>
        </complexType>
    </schema>
</types>


<message name="ImportOrchestrationRequestMessage">
    <part name="payload" element="tns:ImportOrchestrationRequest"/>
</message>
<message name="ImportOrchestrationResponseMessage">
    <part element="tns:ImportOrchestrationResponse" name="payload"/>
</message>

<portType name="ImportOrchestration">
    <operation name="process">
        <input message="tns:ImportOrchestrationRequestMessage"/>
        <output message="tns:ImportOrchestrationResponseMessage"/>
    </operation>
</portType>   

<plnk:partnerLinkType name="ImportOrchestration">
    <plnk:role name="ImportOrchestrationProvider" portType="tns:ImportOrchestration"/>
</plnk:partnerLinkType>

<binding name="ImportOrchestrationBinding" type="tns:ImportOrchestration">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="process">
        <soap:operation soapAction="http://ws.invocation.import/process"/>
        <input>
            <soap:body use="literal"/>
        </input>
        <output>
            <soap:body use="literal"/>
        </output>
    </operation>
</binding>

<service name="ImportOrchestration">
    <port binding="tns:ImportOrchestrationBinding" name="ImportOrchestrationPort">
        <soap:address location="http://localhost:8080/ode/processes/ImportOrchestration"/>
    </port>
</service>
</definitions>

Finally there is the WSDL of the service that the process utilizes. It has 2 operations, but the only one the process uses is "importFile".

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://services.italsystem.it" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax23="http://exceptions.italsystem.it/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://services.italsystem.it">
<wsdl:documentation>ImportService</wsdl:documentation>
<wsdl:types>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exceptions.italsystem.it/xsd">

        <xs:complexType name="ServiceException">
            <xs:complexContent>
                <xs:extension base="xs:anyType" />
            </xs:complexContent>
        </xs:complexType>   

    </xs:schema>
    <xs:schema xmlns:ax24="http://exceptions.italsystem.it/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://services.italsystem.it">
        <xs:import namespace="http://exceptions.italsystem.it/xsd"/>
        <xs:element name="ImportServiceServiceException">
            <xs:complexType>
                <xs:sequence>
                    <xs:element minOccurs="0" name="ServiceException" nillable="true" type="ax23:ServiceException"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="importFile">
            <xs:complexType>
                <xs:sequence>
                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                    <xs:element minOccurs="0" name="dh" nillable="true" type="xs:base64Binary"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="importFileResponse">
            <xs:complexType>
                <xs:sequence>
                    <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="importSingleFile">
            <xs:complexType>
                <xs:sequence>
                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                    <xs:element minOccurs="0" name="content" nillable="true" type="xs:base64Binary"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="importSingleFileResponse">
            <xs:complexType>
                <xs:sequence>
                    <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:schema>
</wsdl:types>
<wsdl:message name="importFileRequest">
    <wsdl:part name="parameters" element="ns:importFile"/>
</wsdl:message>
<wsdl:message name="importFileResponse">
    <wsdl:part name="parameters" element="ns:importFileResponse"/>
</wsdl:message>
<wsdl:message name="ImportServiceServiceException">
    <wsdl:part name="parameters" element="ns:ImportServiceServiceException"/>
</wsdl:message>
<wsdl:message name="importSingleFileRequest">
    <wsdl:part name="parameters" element="ns:importSingleFile"/>
</wsdl:message>
<wsdl:message name="importSingleFileResponse">
    <wsdl:part name="parameters" element="ns:importSingleFileResponse"/>
</wsdl:message>
<wsdl:portType name="ImportServicePortType">
    <wsdl:operation name="importFile">
        <wsdl:input message="ns:importFileRequest" wsaw:Action="urn:importFile"/>
        <wsdl:output message="ns:importFileResponse" wsaw:Action="urn:importFileResponse"/>
        <wsdl:fault message="ns:ImportServiceServiceException" name="ImportServiceServiceException" wsaw:Action="urn:importFileImportServiceServiceException"/>
    </wsdl:operation>
    <wsdl:operation name="importSingleFile">
        <wsdl:input message="ns:importSingleFileRequest" wsaw:Action="urn:importSingleFile"/>
        <wsdl:output message="ns:importSingleFileResponse" wsaw:Action="urn:importSingleFileResponse"/>
        <wsdl:fault message="ns:ImportServiceServiceException" name="ImportServiceServiceException" wsaw:Action="urn:importSingleFileImportServiceServiceException"/>
    </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ImportServiceSoap11Binding" type="ns:ImportServicePortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <wsdl:operation name="importFile">
        <soap:operation soapAction="urn:importFile" style="document"/>
        <wsdl:input>
            <soap:body use="literal"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal"/>
        </wsdl:output>
        <wsdl:fault name="ImportServiceServiceException">
            <soap:fault use="literal" name="ImportServiceServiceException"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="importSingleFile">
        <soap:operation soapAction="urn:importSingleFile" style="document"/>
        <wsdl:input>
            <soap:body use="literal"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal"/>
        </wsdl:output>
        <wsdl:fault name="ImportServiceServiceException">
            <soap:fault use="literal" name="ImportServiceServiceException"/>
        </wsdl:fault>
    </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ImportServiceSoap12Binding" type="ns:ImportServicePortType">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <wsdl:operation name="importFile">
        <soap12:operation soapAction="urn:importFile" style="document"/>
        <wsdl:input>
            <soap12:body use="literal"/>
        </wsdl:input>
        <wsdl:output>
            <soap12:body use="literal"/>
        </wsdl:output>
        <wsdl:fault name="ImportServiceServiceException">
            <soap12:fault use="literal" name="ImportServiceServiceException"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="importSingleFile">
        <soap12:operation soapAction="urn:importSingleFile" style="document"/>
        <wsdl:input>
            <soap12:body use="literal"/>
        </wsdl:input>
        <wsdl:output>
            <soap12:body use="literal"/>
        </wsdl:output>
        <wsdl:fault name="ImportServiceServiceException">
            <soap12:fault use="literal" name="ImportServiceServiceException"/>
        </wsdl:fault>
    </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ImportServiceHttpBinding" type="ns:ImportServicePortType">
    <http:binding verb="POST"/>
    <wsdl:operation name="importFile">
        <http:operation location="importFile"/>
        <wsdl:input>
            <mime:content type="application/xml" part="parameters"/>
        </wsdl:input>
        <wsdl:output>
            <mime:content type="application/xml" part="parameters"/>
        </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="importSingleFile">
        <http:operation location="importSingleFile"/>
        <wsdl:input>
            <mime:content type="application/xml" part="parameters"/>
        </wsdl:input>
        <wsdl:output>
            <mime:content type="application/xml" part="parameters"/>
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>
<wsdl:service name="ImportService">
    <wsdl:port name="ImportServiceHttpSoap11Endpoint" binding="ns:ImportServiceSoap11Binding">
        <soap:address location="http://localhost:8080/axis2/services/ImportService.ImportServiceHttpSoap11Endpoint/"/>
    </wsdl:port>
    <wsdl:port name="ImportServiceHttpSoap12Endpoint" binding="ns:ImportServiceSoap12Binding">
        <soap12:address location="http://localhost:8080/axis2/services/ImportService.ImportServiceHttpSoap12Endpoint/"/>
    </wsdl:port>
    <wsdl:port name="ImportServiceHttpEndpoint" binding="ns:ImportServiceHttpBinding">
        <http:address location="http://localhost:8080/axis2/services/ImportService.ImportServiceHttpEndpoint/"/>
    </wsdl:port>
</wsdl:service>
</wsdl:definitions>
giocarmine
  • 580
  • 1
  • 13
  • 29
  • Can you provide the complete error message. Complete message helps to identify the line no. where this problem occurs. – warunapww Jun 18 '12 at 09:24
  • i added the complete exception stack :) – giocarmine Jun 18 '12 at 09:49
  • Please post the server side error message :) – warunapww Jun 18 '12 at 11:33
  • There is no server side message, in the logs i cannot find anything. Even in the Eclipse console, from wich i start ODE server nothing is written. – giocarmine Jun 18 '12 at 12:10
  • You can enable debug logging in ODE's log4j configuration. The logs are then more detailed. Without seeing your WSDLs its difficult to tell how the literal for the initilizing copy statement should look like. – vanto Jun 18 '12 at 12:30
  • I've added the Process WSDL. Thank you for the advice, the logs are more verbose now, even if i still don't understand what happens it is a step forward :) I can see the first time i find a "fail" in the log is in client.process: routing failed. I clearly see the SOAP fault message generated, i hoped it would contain some useful information, instead it contains an "axis2ns1:selectionFailure" and nothing more :( – giocarmine Jun 18 '12 at 13:07

2 Answers2

1

Looking at the BPEL file, I can see that for some reason, you have not initialized the "ImportPLRequest" variable inside the foreach. You just copying the values into the variable without proper initialization logic.

EDITED after adding the process's WSDL.
Looking at your first copy statement in the updated BPEL file. Before you copy some value into "ImportPLRequest" variable's "ns1:name" element, you should initialize the "ImportPLRequest" variable. You have only provided the WSDL for the BPEL process, but this variable is created out of a message in your partner service's WSDL. If you can provide the WSDL for partner service, we can help with the initialization block. You can refer [1] as a reference for variable initialization. See the first copy statement.

1 - https://svn.wso2.org/repos/wso2/carbon/platform/trunk/products/bps/modules/samples/product/src/main/resources/bpel/2.0/CreditRating/CreditRating.bpel

HTH

warunapww
  • 966
  • 4
  • 18
  • 38
  • I added another Assign activity just before the one where i copy the values. Again Eclipse designer asked me if i wanted to initialize the variable..again i said yes, but i still get the same error :( – giocarmine Jun 18 '12 at 10:02
  • Thank you Waruna, i added the service's WSDL in the post :) – giocarmine Jun 19 '12 at 06:47
1

You assign to the variable called ImportPLRequest, defined at the top level scope, in your first assign activity. However, you use the variable ImportPLRequest1 in your invoke activity. This variable is uninitialized and therefore the error. As a side note: This should not be a problem with your response variable.

However, I wonder why you get a selectionFailure. I think an uninitializedVariable fault would be right in this case. Maybe, this is a bug in ODE.

joergl
  • 2,850
  • 4
  • 36
  • 42
  • oh thank you it was a problem for sure! I changed it and used ImportPLRRequest (and Response) instead of ImportPLRRequest1, and redefined them in the varlables section of the file. I needed to change the "element" attribute with a "messageType" one, otherwise i get an error. Unlucky when i run the client i still get that fault :( – giocarmine Jun 18 '12 at 10:24
  • uninitializedVariable is only to be thrown when a variable is read (and is not initialized). When writing, only a selectionFailure will be thrown when the elements to be selected in the to-expression is not there. – vanto Jun 18 '12 at 12:28
  • @vanto: Yes, I meant exactly that. I was talking about ImportPLRequest1 which is read in the invoke without being initialized before (I assume you need to read a variable to use it as an inputVariable in an invoke). Anyway, girocamine's error seems to originate from somewhere else. EDIT: I looked up the spec and section 8.1 makes that clear: "This includes the and activity, where the presence of an uninitialized part also results in the standard fault bpel:uninitializedVariable." – joergl Jun 18 '12 at 18:24
  • @joergl Indeed, I didn't read carefully enought. In this case its probably a bug in ODE. I filed a [JIRA](https://issues.apache.org/jira/browse/ODE-970). – vanto Jun 19 '12 at 13:41