cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice table problem

Former Member
0 Kudos

Hello.

i have some web service which takes a table of elements as input. I created model of service, created a node in context and bind this service method to a node. Then i wanted to create some lines in table and execute this method. But i dont know what is the right way of creating and adding row to table. Everytimes i finished with no error but also NO LINES of table were transferred.

Context looks like this:

Context -> SaveList(model node to which is service bind) -> aUpdateList(table)

I tried to do it this way:


Request_AdministrationSoap_updateUserList srvc = new Request_AdministrationSoap_updateUserList();

wdContext.nodeSaveList().bind(srvc);

for...{
    IAUpdateListElement newEl = (IAUpdateListElement) wdContext.nodeAUpdateList().createAUpdateListElement(new ComplexType_User());
    ...some setters to newEL
   wdContext.nodeAUpdateList().addElement(newEl);
}

wdContext.currentSaveListElement().modelObject().execute();

I think that there should be line:

ComplexType_User newEl = new ComplexType_User();

But then i dont know how to add this line to srvc-i think that there should be some metho like addAUpdateList(...) but there is no similar one :(.

thanks for every advice....

JJ

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Jiri,

1. AUpdateList must be child of SaveList node, supplyingRelationRole must be set for AUpdateList.

2. Instead of adding elements, add instances of CompleType_User to srvc, something like srvc.addUser( new ComplexType_User() ) -- actula method name may differ.

3. After you have fully populated srvc object with all necessary users execute wdContext.nodeSaveList().bind(srvc) (i.e. after modified "for" loop, not before)

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi,

thanks for a quick answer.

ad 1. its ok

ad 2. - this method i was looking for and there is now one similar - how is it possible?

ad 3. thanks, i will do it....

But where may be a problem with second note?

JJ

Answers (0)