Thanks Matt,

Works like charm.
-------------------------
Vineesh Thomas Devasia
-------------------------

Matthieu Riou-5 wrote:
> 
> On Thu, May 29, 2008 at 2:06 AM, Vineesh Thomas <[EMAIL PROTECTED]>
> wrote:
> 
>>
>> Hi,
>>
>> I am passing an array of model class(Data object) to a webservice and get
>> back a array of String.
>>
>> Since I won't be knowing  the number of objects in the array that will be
>> passed to the webservice so I have to iterate the received object[] and
>> set
>> it to the request message of the webservice before invoking.
>>
>> Now the problem is before assigning values I have to initialize the
>> variable. I know only to initialize the request param as a literal and I
>> am
>> not able to iterate within the assign tag.
>>
>> For e.g.
>> In My input SOAP msg, the array of data object looks like :
>>                  <dmx:processMarks>
>>                    <dmx:m>
>>                        <dmx1:marks/>
>>                        <dmx1:marks/>
>>                        <dmx1:marks/>
>>                        <dmx1:name/>
>>                     </dmx:m>
>>                     <dmx:m>
>>                        <dmx1:marks/>
>>                        <dmx1:marks/>
>>                        <dmx1:marks/>
>>                        <dmx1:name/>
>>                     </dmx:m>
>>                  </dmx:processMarks>
>>
>> Here each <dmx:m/>  represents an object in the array. So when I receive
>> this data in the bpel and if I have to initialize another variable of the
>> same size(which changes based on the number of object passed in the
>> array)how do I got about it ?  Kindly share some sample examples or code
>> snippets if possible.
>>
>> I tested for a case where I am assuming that I know the number of objects
>> in
>> the Object[] being passed. i.e. I am passing 2 object in my Object[] and
>> I
>> have hard coded the initialization for these 2 objects within the bpel.
>> That
>> is working fine. So invoking a webservice by passing an object[] and
>> getting
>> back an array of string is working fine, but with the hard coding for the
>> initialization part as described above.
>>
> 
> BPEL doesn't easily support array iteration, you may want to look at the
> doXslTransform XPath extension method and do your manipulation in an XSL
> stylesheet.
> 
> Matthieu
> 
> 
>>
>> I am attaching my bpel file along.
>> http://www.nabble.com/file/p17530609/DM.bpel DM.bpel
>> --
>> View this message in context:
>> http://www.nabble.com/Trouble-initializing-an-array-of-Data-object-in-BPEL.-tp17530609p17530609.html
>> Sent from the Apache Ode Dev mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Trouble-initializing-an-array-of-Data-object-in-BPEL.-tp17530609p17541740.html
Sent from the Apache Ode Dev mailing list archive at Nabble.com.

Reply via email to