ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Boisvert" <boisv...@intalio.com>
Subject Re: Mapping Arrays
Date Wed, 05 Sep 2007 21:52:21 GMT
Hi Anup,

You'll need to use XSLT to perform assignments between arrays of different
structure.   To give you an idea...  (this is not tested/valid XSL)

<xsl:template match="/">
  <soapenc:array>
    <xsl:for-each select="instance-info/id">
      <entry><xsl:value-of select="id"/></entry>
    </xsl:for-each>
  </soapenc:array>
</xsl:template>


Note that SOAP encoding is not supported so that might be a bigger
consideration.

alex


On 9/5/07, Anup Chandran <anup.chandran@3ds.com> wrote:
>
>
> Hi
>
> Can someone guide me on how to map arrays in an assign activity.
>
> My BPEL definition has a variable "getInstanceInfoOutput"
>
> <bpws:variable messageType="ns0:getInstanceInfoOutput"
> name="getInstanceInfoOutput"/>
>
> The pmapi.wsdl has this definition for getInstanceInfoOutput
>     <message name="getInstanceInfoOutput">
>         <part name="instance-info" type="typ:tInstanceInfo"/>
>     </message>
>
> I'm try to map elements of "instance-info" into a String[] (which is the
> input for an external service).
>
> The definition of the external service input data types are as follows.
>
> <wsdl:types>
>   <schema targetNamespace="http://client.engineering.cbp.jpo"
> xmlns="http://www.w3.org/2001/XMLSchema">
>    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>    <complexType name="ArrayOf_xsd_string">
>     <complexContent>
>      <restriction base="soapenc:Array">
>       <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
>      </restriction>
>     </complexContent>
>    </complexType>
>   </schema>
> </wsdl:types>
>
>    <wsdl:message name="setAttributeRequest">
>
>       <wsdl:part name="in0" type="soapenc:string"/>
>
>       <wsdl:part name="in1" type="impl:ArrayOf_xsd_string"/>
>
>       <wsdl:part name="in2" type="impl:ArrayOf_xsd_string"/>
>
>    </wsdl:message>
>
>
> My Assign looks like this: Not sure if it is correct. I'm trying to map
> iid
> and other attributes from instance-info into an array of in1.
>
> <bpws:assign name="AssignInstanceInfoToSetAttribute" validate="no">
> <bpws:copy>
> <bpws:from part="instance-info" variable="getInstanceInfoOutput">
> <bpws:query
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0
> "><![CDATA[/ns:iid]]></bpws:query>
> </bpws:from>
> <bpws:to part="in1" variable="CBPWorkflowPartnerLinkRequest">
> <bpws:query
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0
> ">in1[0]</bpws:query>
> </bpws:to>
> </bpws:copy>
> </bpws:assign>
>
> Regards
> Anup
> --
> View this message in context:
> http://www.nabble.com/Mapping-Arrays-tf4387603.html#a12509191
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message