cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in setting node within a node.

Former Member
0 Kudos

Hi,

I am using the deprecated webservice model to create an XI model in my web dynpro.

When I import this model, I get a 3 level node structure for request:

Context

|_Child1 (Request_MI_EmployerPeopleFinderOB_Sync_MI_EmployerPeopleFinderOB_Sync)

|_Child2 (MT_EmployerPeopleFinderRequest)

|_Child3 (Record)

|_Attribute1 (Namekey)

|_Attribute 2...and more attributes.

From my code I need to set these attributes and pass on as input parameters to the XI web service.

I set the attributes for child 3 as:

Request_MI_EmployerPeopleFinderOB_Sync_MI_EmployerPeopleFinderOB_Sync inp = new Request_MI_EmployerPeopleFinderOB_Sync_MI_EmployerPeopleFinderOB_Sync();

ComplexType_DT_EmployerPeopleFinderRequest MTnode = inp.getMT_EmployerPeopleFinderRequest();

ComplexType_Record idnode = new ComplexType_Record();

idnode.setNAMEKEY("1");

idnode.setNAMEVALUE("Terri");

idnode.setOPTIONVALUE("0");

idnode.setFIELDKEY(null);

idnode.setFIELDVALUE(null);

MTnode.setRecord(idnode);

inp.setMT_EmployerPeopleFinderRequest(MTnode);

wdContext.nodeRequest_MI_EmployerPeopleFinderOB_Sync_MI_EmployerPeopleFinderOB_Sync().bind(inp);

executeRequest_MI_EmployerPeopleFinderOB_Sync_MI_EmployerPeopleFinderOB_Sync();

The step MTnode.setRecord(idnode); fails...

because when I try to access MTnode.getRecord().getNAMEVALUE("Terri") and print in on the webdynpro code, I get null as the output.

Since the MTNode is not set properly, the inp is also not getting properly generated and hence the bind() is not successful.

This results in a null input to the XI webservice and exception is thrown.

Please guide as to how to set the MTNode in this case.

Please note that since it is a web service based model, there are very few methods available.I am not able to access the Record node wdContext.nodeRecord.currentElement.getNAMEKEY(); since currentElement is not available over the Record node.

Please help.

Thanks,

Sonali M S

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Closed.

Former Member
0 Kudos

Hello,

so i havent testet but ive read some time ago, that in special cases you need the invalidate method to push context into a model node.

Try to invalidate all the nodes after your have use the bind command and after binding and invalidating them try to execute them again.

Like this:


node2.setName("bla");
node.bind(node2);
node.execute();
node.invalidate();
// No you should be able to access the content.

So im not sure if this will help u in your case but i hope so!

I know normaly you will delete all the content inside a node with the invalidate method, but i remember myself i've red somewhere in Model Nodes you need to call invalidate first, please try and answer here if it worked or not, i'm interested in the result too.

kind regards

Fabian