on 02-27-2009 7:14 AM
Hi guys,
I need desperate advise on this because I have no idea why is my model execution keep giving me the error. I am executing this through ADAPTIVE web service while querying through OVS.
"com.sap.tc.webdynpro.model.webservice.api.WDWSModelExecuteException: Exception on execution of web service with WSDL URL 'http://j2eedevt:50000/DemoWebOrderWSMaterial/Config1?wsdl ' with operation 'Get_MaterialBySalesArea' in interface 'DemoWebOrderWSMaterial_Document'"
when I tries to execute using the Material Model. As you can see I have set everything correctly. The logic of the code is EXACTLY the same as my other model like SalesOrg etc, but they all could be execute easily but not this. Can someone advise what could go wrong? I have checked almost everything but as the exception did not reveal much information, I could not really go about finding what's wrong.
public void onQuery(
IWDNodeElement queryInputNodeElement,
IWDNode queryOutputNode) {
IPublicDemoWSController.IMaterialElement ovsInput =
(IPublicDemoWSController.IMaterialElement) queryInputNodeElement;
IPublicDemoWSController.IMaterialDataNode ovsOutput =
(IPublicDemoWSController.IMaterialDataNode) queryOutputNode;
try {
// Bind the model to input node.
DemoWSMaterial model = new DemoWSMaterial();
Request_Get_MaterialBySalesArea request =
new Request_Get_MaterialBySalesArea(model);
wdContext.nodeRequest_Get_MaterialBySalesArea().bind(request);
Get_MaterialBySalesArea getMaterial =
new Get_MaterialBySalesArea(model);
getMaterial.setMaterial(ovsInput.getMaterialNum());
getMaterial.setSalesOrg(wdContext.nodeSalesOrgDT1().currentSalesOrgDT1Element().getSalesOrg());
getMaterial.setDescription(ovsInput.getDescription());
request.setGet_MaterialBySalesArea(getMaterial);
wdComponentAPI.getMessageManager().reportException(
"test1",
true);
// invalidate 'Output' model node via a top-down access
// approach
request.execute();
wdComponentAPI.getMessageManager().reportException(
"test2",
true);
// Sync data in the context with data from the model.
wdContext.nodeGet_MaterialBySalesAreaResponse().invalidate();
//ovsInput.node().getChildNode("MaterialDT", 0).invalidate();
} catch (Exception e) {
wdComponentAPI.getMessageManager().reportException(
e.toString(),
true);
}
}
Edited by: Jackson Yap on Feb 27, 2009 8:41 AM
Hi
Do one thing
getMaterial.setMaterial(ovsInput.getMaterialNum());
In this line put some hardcode real material number and then check whether Model is executed successfully or not and
/ Sync data in the context with data from the model.
wdContext.nodeGet_MaterialBySalesAreaResponse().invalidate();
//ovsInput.node().getChildNode("MaterialDT", 0).invalidate();
Comment this line.
Now deploy and send the error message(if any)
Let see
Best regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
funny.. I got 4 models .....is not clear to me
Ok in transaction screen of R/3 you have got 4 list and these list are
Customer
SalesOrg
Material
Order.
Is this the case ?
if yes select a particular ,will display input ,output ,table structure and message.
If Ok then fine else explain the case very clear?
Best Regards
Satish Kumar
Hey I was wondering could this be the problem?
I included these in the DoINIT so that the fields in the windows could be editable:
if (wdContext.nodeHeader().size() == 0) {
wdContext.nodeHeader().addElement(
wdContext.nodeHeader().createElement());
}
// Instantiate Material Value node
if (wdContext.nodeMaterial().size()==0) {
wdContext.nodeMaterial().addElement(wdContext.nodeMaterial().createElement());
}
However I then do the binding again in the doQuery again as above.
Could this be the problem? I am still trying to find out the problem..
Hi
getMaterial.setSalesOrg(wdContext.nodeSalesOrgDT1().currentSalesOrgDT1Element().getSalesOrg());
How this value is coming?
and Is all model is working fine from R/3 GUI ?
and Problem in execution form webdynpro ???
wdComponentAPI.getMessageManager().reportException("test1",true); //Delete this line exception will occur after execute statement of if u want to display some messege then use
wdComponentAPI.getMessageManager().reportSuccess("test1",);
Best Regards
Satish Kumar
Yes!! Here is the problem :
1. Normally for Adaptive Web Service, If you have initiated all values, it should be okay.
2. If you are getting execution error, check your authentication type in your web service configurator. It was not working at first because I got no idea why it was changed to BASIC when it should be none.
It is all solved!! Thank you Satish!!
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.