cancel
Showing results for 
Search instead for 
Did you mean: 

Model Execution Error

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member185086
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hey Satish,

Thanks! I tried that with a valid Material Number.. execution still got error.. I wonder what could be the error? It is just simple execution using web service model.. Why does other model works but not this.. ?_?..

former_member185086
Active Contributor
0 Kudos

Hi Jackson

I could be a problem of that interface only.

Let see

Best Regards

Satish Kumar

Former Member
0 Kudos

What can i do now?

It is funny.. I got 4 models,

Customer

SalesOrg

Material

Order

However Material and Customer do not work.. even though I make sure I have specified ALL input values.. What could be wrong..?

former_member185086
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi there,

That means I imported 4 adaptive web services into web dyn pro as model and only 2 of them can be executed but not the other 2. It gives the error as stated above. Don't know what is wrong..

Former Member
0 Kudos

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..

former_member185086
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Satish,

Yes I tested again, hardcoded values.. All values are there just before execution.. However it just cannot get pass the 'execution' line.

I tested in Web Services Navigator with the same values and there is result..

Former Member
0 Kudos

I think I know WHY. Hang in there for my good news!

Former Member
0 Kudos

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!!

Answers (0)