开发者

I Need to write the resulting array to a variable which is anytype and unbounded in BPEL using Java Embedded

I need to call a Stored Procedure running in DB2.Since the Oracle DB Adapter Doesnt support DB2 , I have used Java Embedding to call the Stored Procedure . I Dont have a problem in Calling the Stored procedure using Java Embedding and getting the result Set.The problem starts when is start assinging the result set to the output variable .I use the below snipped to set the variable.

rset=statement.executeQuery("SELECT name, number, salary from Employee");
rset = statement.getResultSet();
int j=1;
 if (rset != null)
{
while(rset.next())
{
    name=rset.getString("name");
    name=rset.getString("number");
    name=rset.getString("salary");
    setVariableData("temp","payload","/ns1:code1["+j+"]/ns1:empname",name); 
    s开发者_JS百科etVariableData("temp","payload","/ns1:code1["+j+"]/ns1:empno",number);
    setVariableData("temp","payload","/ns1:code1["+j+"]/ns1:salary",salary); 
        j=j+1;
}
}

In the above mentioned Code I expect to display all the empname,number and salary details of all the employees to be assigned to output variable temp .But the output i see is only the last employee details .The remainin employee details are not shown .If i replace the variable j with either 1 or 2 or 3 etc i get the output of only that array element details whereas other details are not known .Can someone help me in getting the whole result set to a output variable .


Have you tried to create the "/ns1:code1["+j+"] element before setting is sub element ?

I foudn this issue report :

http://oraclefusion1011.blogspot.com/2011/01/issue-with-setvariabledata-in-java.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜