on 01-22-2008 11:04 AM
Hi experts,
I would like to invoke a webservice request which return a list of Object as a response.
I refer to the adaptive web service model for web dynpro, however, the example is only to sent a list of input object to the web service.
//@@begin javadoc:sendEmail()
/** Declared method. */
//@@end
public void sendEmail() {
//@@begin sendEmail()
...
// call Email Web Service and update dependent model node 'Response'
wdContext.currentRequest_SendEmailElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
...
//@@end
}
if I were to have an object say SaleDetails return as response instead of a integer (returnCode as show in the example). Can i do the following:
wdContext.currentRequest_SendEmailElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
SaleDetails details = (SaleDetails) wdContext.currentRequest_SendEmailElement().getAttributeValue("saledetails");
can advise?
thank you.
Hi,
You are talking about the response of the model node. If the webservice is supposed to return an object of type SaleDetails, then the response node will contain a node of SaleDetails type with all the attributes of SaleDetails.
You dont have to explicitly cast anything.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.