on 10-26-2006 7:40 PM
Hi,
Here is the story. I have web services deployed at a certain URL and they are working correctly. Now I want to use them in my WebDyn Pro application. So I created an Adaptive Web Service model from the URL using the default settings. I now have the model in WD. Now I add it as a used model in my component. I drag and drop one of my services Request_***** tree in my Controller. I did the same thing in my view. Now, how do I call the service?
Thanks in advance for any information on the subject you can give me.Here is What I tried in the wdDoInit of my view (the problem I encountered are comments above each statements):
//@@begin javadoc:wdDoInit()
/** Hook method called to initialize controller. */
//@@end
public void wdDoInit()
{
//@@begin wdDoInit()
//Load the data for the units table
try
{
//from the controller, the currentRequest_GetUnitsElement is null at run time
IPublicPAFDAnalysis.IRequest_GetUnitsElement wRequestElement =
wdThis.wdGetPAFDAnalysisController().wdGetContext().currentRequest_GetUnitsElement();
wRequestElement.modelObject().execute();
//try creating an element, where can I get the model from?
IPublicPAFDAnalysis.IRequest_GetUnitsElement wRequestElement =
wdThis.wdGetPAFDAnalysisController().wdGetContext().createRequest_GetUnitsElement();
//from the view, the currentRequest_GetUnitsElement is null at run time
wdThis.wdGetContext().currentRequest_GetUnitsElement().modelObject().execute();
//try creating an element, where can I get the model from?
IPublicPAFDAnalysis.IRequest_GetUnitsElement wRequestElement =
wdThis.wdGetContext().createRequest_GetUnitsElement();
wdThis.wdGetPAFDAnalysisController().wdGetContext().nodeRequest_GetUnits().invalidate();
}
catch(Exception pE)
{
//an error occured when trying to get data from the web service
pE.printStackTrace();
}
//@@end
}
I should have mentioned that we are using netweaver 2004s for the first time.
Message was edited by: Mathieu Poitras
I was able to do it using the Apply template option on the controller. It created a executeRequest method in the controller and created the model and the nodes in the wdDoInit of the controller. I hope this can be useful to others.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.