cancel
Showing results for 
Search instead for 
Did you mean: 

Web service response

Former Member
0 Kudos

Hi,

Iam using a web service model. I have WS respose whose object heirarchy stucture is

Respose>STModifyRsType[]>STModifyRsType>StatusType[]>StatusType

So there is an array of StatusType which i need to traverse.I need to show one info which is contained in StatusType object.I have tried many options but iam not able to see the array through program.

Follwoing is my response object and its associcated classes. The input field to which this is binded is disabled also.

Response_MST modifyRes = new Response_MST();

wdContext.nodeModifyResponse().bind(modifyRes);

STModifyRsType modifyRsTypeArray[] = new STModifyRsType[1];

STModifyRsType stModifyRsType = new STModifyRsType();

modifyRsTypeArray[0] = stModifyRsType;

StatusType modifyStatus[] =new StatusType[1];

StatusType modifyStatusType =new StatusType();

modifyStatus[0]=modifyStatusType;

stModifyRsType.setStatus(modifyStatus);

modifyRes.setResult(modifyRsTypeArray);

It would of great help if some body can throw some light on this.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sujesh,

I guess you have written this code in webdynpro. You told that this is response heirarchy. So, it should give you some value instead of setting some value.

Have you made model for Webservice?

If you have written this code in your webservice source then what you are doing with that?

Regards,

Bhavik

Former Member
0 Kudos

Hi Bhavik,

Yes , i understand that i do not need to set any value or any object because i need to read from response. I had put this code just to find that if my input fields getting enabled or not. but it doesnt. in init we generally put this code for request so taht my input fields get enabled. Pls help me how we can parse response object from the context to get the required objects...

should i invalidate the node respose after the WS call before parsing???

Former Member
0 Kudos

Hi Sujesh,

I think you can create a node hierarchy of the same response type in your context and bind the result of response object with ur context node and then try displaying it in a text view or something.

hope this helps..

Regards,

Sirisha.R.S

Former Member
0 Kudos

I have already binded the input fields to respective respose objects. but StatusType is coming as array and i need to parse the reponse to show only valid element of the array. so i guesss manual coding is required. As iam new to WD, finding it difficult to understand how to travverse through the response to get the deepest object. the structure is as given in the post...any help???