How to Use SOAP-Encoded Arrays

Oracle SOA Suite provides support for SOAP RPC-encoded arrays. This support enables Oracle BPEL Process Manager to operate as a client calling a SOAP web service (RPC-encoded) that uses a SOAP 1.1 array.

The following example provides an example of a SOAP array payload named myFavoriteNumbers.

<myFavoriteNumbers SOAP-ENC:arrayType="xsd:int2">
<number>3</number>
<number>4</number>
</myFavoriteNumbers>

In addition, ensure that the schema element attributes attributeFormDefault and elementFormDefault are set to "unqualified" in your schema. The following example provides details:

attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="java:services" xmlns:s0="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

The following features are not supported:

  • A service published by BPEL that uses a SOAP array

  • Partially-transmitted arrays

  • Sparse arrays

  • Multidimensional arrays

To use a SOAP-encoded array:

The following example shows how to prepare SOAP arrays with the bpelx:append tag in a BPEL project.

  1. Create a BPEL process in Oracle JDeveloper.

  2. Prepare the payload for the invocation. Note that bpelx:append is used to add items into the SOAP array.

    <bpws:assign> 
       <bpws:copy>
          <bpws:from variable="input" part="payload" query="/tns:value"/>
          <bpws:to variable="request" part="strArray"
          query="/strArray/JavaLangstring"/>
       </bpws:copy>
    </bpws:assign>
    <bpws:assign>
       <bpelx:append>
       <bpelx:from variable="request" part="strArray"
       query="/strArray/JavaLangstring1"/>
       <bpelx:to variable="request" part="strArray" query="/strArray"/>
       </bpelx:append>
    </bpws:assign>
    
  3. Import the following namespace in your WSDL file. Oracle JDeveloper does not understand the SOAP-ENC tag if the import statement is missing in the WSDL schema element.

    <xs:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />