on 03-15-2010 3:06 PM
Hi all,
I've a complex data output from a Web Service that I cannot read from WD.
It's an array of:
String firstName
String lastName
String[] myArray
When I run it from WS navigator it works (see screenshot1)
http://img705.imageshack.us/img705/3945/complex1.jpg
but when I run it from Web Dynpro I cannot access myArray values of each row, I can read only the first entry (see WD structure screenshot2).
http://img28.imageshack.us/img28/3614/complex2.jpg
Since I wrote the WS I can easily change the structure but what kind of structure will allow me to read the array values from WD?
Thanks,
Omri
Solved it on my own by casting the result to plain java list object...
List theList = wdContext.currentResponseComplex2Element().modelObject().getComplexBean();
for (int i=0; i<wdContext.nodeComplexBean().size(); i++) {
ComplexBean complexBean = (ComplexBean) theList.get(i);
wdComponentAPI.getMessageManager().reportSuccess(complexBean.getFirstName());
wdComponentAPI.getMessageManager().reportSuccess(complexBean.getLastName());
ArrayOfString arrayOfString = complexBean.getMyArray();
List stringList = arrayOfString.getString();
for (int j=0; j<stringList.size(); j++) {
String_Item stringItem = (String_Item) stringList.get(j);
wdComponentAPI.getMessageManager().reportSuccess(stringItem.getItem());
}
}
wdComponentAPI.getMessageManager().reportSuccess("----------------------------------------------------");
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.