users@glassfish.java.net

bpel

From: <glassfish_at_javadesktop.org>
Date: Mon, 01 Sep 2008 13:04:09 PDT

Hi,
How to create with "wsdl from database" in the openESB IDE 6.1 array of data?
I know how to create with this tool one row user data from my users table, but I want to sent for insert an array of users.

Why I can't with the xsd definition as unbound to set one or more records elemente?
I need a repeating element from the xsd but I have not this. Do you know why?
I think if I will have this - the insert for array recordes will be insert automaticly

If I have to do that with ForEach, (restart the counter = 0)
I have to set final counter value in properties,
*I want to be able to send dinamyc array! with no limit the final counter*
so I tried to set these but in this 2 ways: *insert the first row only*

1) final counter value = random number (3)
2) I tyrid to defined Count variable to know the record size from the input xml. and finaly put it into the final counter value
as count($UserDetailsOperationIn.req/ns0:record)

{code}
<assign name="Assign1">
            <sxt:trace>
                <sxt:log level="finest" location="onComplete">
                    <from>concat('The number of element in nodeset:', count($UserDetailsOperationIn.req/ns0:record))</from>
                </sxt:log>
            </sxt:trace>
            <copy>
                <from>$UserDetailsOperationIn.req/ns0:record</from>
                <to>$InsertIn.part/ns0:record</to>
            </copy>
        </assign>
        <forEach name="ForEach1" parallel="no" counterName="ForEach1Counter">
            <startCounterValue>0</startCounterValue>
            <finalCounterValue>count($UserDetailsOperationIn.req/ns0:record)</finalCounterValue>
            <scope name="Scope1">
                <sequence name="Sequence1">
                    <assign name="Assign4">
                        <copy>
                            <from>$UserDetailsOperationIn.req/ns0:record</from>
                            <to>$InsertIn.part/ns0:record</to>
                        </copy>
                    </assign>
                    <invoke name="Invoke1" partnerLink="UsersPL" operation="insert" portType="ns1:jdbcPortType" inputVariable="InsertIn" outputVariable="InsertOut" />
                </sequence>
            </scope>
        </forEach>
{code}


Do you have an example?

Have a nice week,
Yael.
[Message sent by forum member 'yael800' (yael800)]

http://forums.java.net/jive/thread.jspa?messageID=296594