Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to assign array in a BPEL process
    primarykey
    data
    text
    <p>I have a simple string as input and after calling a web service which adds the string to an array.Now i have to assign the array to the output(which i have set as a string array in the schema).The enterprise manager gives a fault and says the result contains multiple nodes for the XPath expression given.The Assign activity is shown as pending.So basically how do i assign an array or a list to the output variable which is also set as an array.The wsdl file used is:</p> <pre><code>&lt;?xml version = '1.0' encoding = 'UTF-8'?&gt; &lt;definitions name="ReturnTypeService" targetNamespace="http://examples2/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://examples2/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" &gt; &lt;types&gt; &lt;xsd:schema&gt; &lt;xsd:import namespace="http://examples2/" schemaLocation="http://localhost:7101/Examples2-Examples2-context-root/ReturnTypePort?xsd=1"/&gt; &lt;/xsd:schema&gt; &lt;/types&gt; &lt;message name="display"&gt; &lt;part name="parameters" element="tns:display"/&gt; &lt;/message&gt; &lt;message name="displayResponse"&gt; &lt;part name="parameters" element="tns:displayResponse"/&gt; &lt;/message&gt; &lt;portType name="ReturnType"&gt; &lt;operation name="display"&gt; &lt;input message="tns:display"/&gt; &lt;output name="displayResponse" message="tns:displayResponse"/&gt; &lt;/operation&gt; &lt;/portType&gt; &lt;binding name="ReturnTypePortBinding" type="tns:ReturnType"&gt; &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt; &lt;operation name="display"&gt; &lt;soap:operation soapAction=""/&gt; &lt;input&gt; &lt;soap:body use="literal"/&gt; &lt;/input&gt; &lt;output&gt; &lt;soap:body use="literal"/&gt; &lt;/output&gt; &lt;/operation&gt; &lt;/binding&gt; &lt;service name="ReturnTypeService"&gt; &lt;port name="ReturnTypePort" binding="tns:ReturnTypePortBinding"&gt; &lt;soap:address location="http://localhost:7101/Examples2-Examples2-context-root/ReturnTypePort"/&gt; &lt;/port&gt; &lt;/service&gt; &lt;/definitions&gt; </code></pre> <hr> <p>@vanto Is there a way to assign an array from input variable to invoke_input variable?The problem is there are multiple inputs in my web service so i am not able to copy the wrapping element in input variable to wrapping variable in invoke variable.Will copy the snippet of the code here :</p> <pre><code>&lt;assign name="Assign1"&gt; &lt;copy&gt; &lt;from variable="inputVariable" part="payload" query="/ns2:process/ns2:dsaName"/&gt; &lt;to variable="Invoke1_processList_InputVariable" part="parameters" query="/ns1:processList/dsaName"/&gt; &lt;/copy&gt; &lt;copy&gt; &lt;from variable="inputVariable" part="payload" query="/ns2:process/ns2:linesOfData"/&gt; &lt;to variable="Invoke1_processList_InputVariable" part="parameters" query="/ns1:processList/linesOfData"/&gt; &lt;/copy&gt; &lt;copy&gt; &lt;from variable="inputVariable" part="payload" query="/ns2:process/ns2:description"/&gt; &lt;to variable="Invoke1_processList_InputVariable" part="parameters" query="/ns1:processList/description"/&gt; &lt;/copy&gt; &lt;copy&gt; &lt;from variable="inputVariable" part="payload" query="/ns2:process/ns2:application"/&gt; &lt;to variable="Invoke1_processList_InputVariable" part="parameters" query="/ns1:processList/application"/&gt; &lt;/copy&gt; &lt;/assign&gt; </code></pre> <p>The problem is only one is of list type all others are of string type.The XML for this is:</p> <pre><code>&lt;element name="process"&gt; &lt;complexType&gt; &lt;sequence&gt; &lt;element name="dsaName" type="string" minOccurs="0"/&gt; &lt;element name="linesOfData" type="string" minOccurs="0" maxOccurs="unbounded"/&gt; &lt;element name="description" type="string" minOccurs="0"/&gt; &lt;/sequence&gt; &lt;/complexType&gt; &lt;/element&gt; &lt;element name="processResponse"&gt; &lt;complexType&gt; &lt;sequence&gt; &lt;element name="result" type="string" minOccurs="0" maxOccurs="unbounded"/&gt; &lt;/sequence&gt; &lt;/complexType&gt; &lt;/element&gt; &lt;/schema&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload