cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the response from the web services.

Former Member
0 Kudos

I m sending a request object to web services ant that service is returning a complex response object which i want to display on the screen.I m invoking the web services using following code:

wdContext.currentRequest_CommonGenesChargesPortType_viewMOPElement().modelObject().execute();

wdContext.nodeViewMOPResponse().invalidate();

So could anybody tell me from where acn i get the response object ,from which statement.

i.e:can i do (Response Object)=wdContext.currentRequest_CommonGenesChargesPortType_viewMOPElement().modelObject().execute();

or

(Response Object)=wdContext.nodeViewMOPResponse().invalidate();

i.e which statement will return the response object.

Accepted Solutions (0)

Answers (2)

Answers (2)

Yashpal
Active Contributor
0 Kudos

Hi,

first u have to request so create a object of request class and set the required attributes .and execute the model .node when u import the webservice model two nodes namely request and response are there so create a model node in ur component and map it to the model response node so when u execute model by proper method the output i.e response is present in that node .

thanks,

yashpal

arun_srinivasan
Contributor
0 Kudos

hi Amit,

go and see in the context node. there will be a sub node which contains the response data. just bind it and use it in your program.

just create a value attribute and value node in the view context and bind to the response node in the context.

Hope this helps,

Regards,

Arun

Former Member
0 Kudos

Hi Arun,

I got the data in the context in the response node .But the problem is that the web service returns an array of objects which inturns has array ob object, I m only able to get those values from the response node from the context which are simple string type.Could u pls tell me how can i get the complex data which is present in the response node in the context.

Can i traverse the node(i.e) the rray in the context.CAn u tell me wat can i do.The response node has the complex structure as defined in the WSDL file ,i just need to get the data present in the array of that context which is populated by the web service.

arun_srinivasan
Contributor
0 Kudos

hi amit,

can you give a idea of the context structure.

tell me what its type are.you can traverse through the node.

hope it helps,

Regards,

Arun