cancel
Showing results for 
Search instead for 
Did you mean: 

WDWSModelExecuteException: Exception on execution of web service with WSDL

Paras_AU
Participant
0 Kudos

Experts,

I have coded a search webservice using MDM SP05 API , now while building webDynpro UI around the same , I imported the adaptive webservice model using the following steps,

Select "Models"

o Right click -> Create Model

o Select "Import Adaptive Web Service Model"

o Give it a name

o Give it a package

o Select Local Server

o Next

o Select "No Logical Destinations"

o Next

o Select the appropriate Web Service (EX: DocWebService)

o Finish

o Reload and rebuild project

As a result I get the webserrvice model imported and displayed in the webDynPro explorer . In the webservice navigator the output on passing the input parameters is as expected.The webserivice takes two string input parameters and returns a 0...N arraylist . Now from the webDynPro end when i try and execute the same via a getVendors( ) method in the controller I get the following error returned

"com.sap.tc.webdynpro.model.webservice.api.WDWSModelExecuteException: Exception on execution of web service with WSDL URL 'http://mb1es1006:50100/searchVendor/Config1?wsdl' with operation 'searchVendor' in interface 'searchVendorVi_Document'

class com.sap.tc.webdynpro.model.webservice.api.WDWSModelExecuteException

"

follwing is the code from component controller, which execute the webservice:

public void getVendors( )

{

//@@begin getVendors()

IWDMessageManager messageMgr = wdThis.wdGetAPI().getComponent().getMessageManager();

SearchVendorModel model = new SearchVendorModel();

SearchVendor sVndr = new SearchVendor(model);

String name = wdContext.currentContextElement().getVendorName();

if(name != null && !name.equals(""))

sVndr.setName(name);

else

sVndr.setName("");

String vendorNumber = wdContext.currentContextElement().getVendorNumber();

if(vendorNumber != null && !vendorNumber.equals(""))

sVndr.setVendorNumber(vendorNumber);

else

sVndr.setVendorNumber("");

Request_SearchVendor req = new Request_SearchVendor(model);

req.setSearchVendor(sVndr);

wdContext.nodeRequest_SearchVendor().bind(req);

try

{

wdContext.nodeRequest_SearchVendor().currentRequest_SearchVendorElement().modelObject().execute();

//wdContext.nodeSearchVendorResponse().invalidate();

wdContext.nodeResponse().invalidate();

wdContext.nodeResponse().nodeSearchVendorResponse().invalidate();

ArrayList al = (ArrayList) wdContext.currentSearchVendorResponseElement().getResponse();

//IVendorsElement element; "

First screen has two user input fields and a search button, on press of which the getVendors( ) method from the controller is called after which there is a call to fire the output plug to the result screen which displays the record returned in a tableUI control bound to the context node i.e mapped to the component controller. The above error message shows up on the result screen.

Kindly look in and advise ASAP. Its urgent......guys

Full points to any helpful answer.

Paras

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Paras, I’m getting a little bit lost with the model name.

Suppose your model name is Request_SearchVendor and input parameters are name and vendorNumber. The code should be something like:

….

//Get input data

String name = wdContext.currentContextElement().getVendorName();

IF (name is null ) -> name = “”.

String vendorNumber = wdContext.currentContextElement().getVendorNumber();

IF (vendorNumber is null ) -> sVndr.setVendorNumber("");

//instantiate the model

Request_SearchVendor req = new Request_SearchVendor();

wdContext.nodeRequest_SearchVendor().bind(req);

//Fill model input parameters

wdContext.nodeRequest_SearchVendor().currentRequest_SearchVendorElement().SetName(name);

wdContext.nodeRequest_SearchVendor().currentRequest_SearchVendorElement().SetvendorNumber(vendorNumber);

try

{

//execute model

wdContext.nodeRequest_SearchVendor().currentRequest_SearchVendorElement().modelObject().execute();

….

}

Hope it helps

Paras_AU
Participant
0 Kudos

SearchVendorModel is the model name in the explorer, I instantiate the SearchVendor Model class using;

SearchVendorModel model = new SearchVendorModel();

SearchVendor sVndr = new SearchVendor(model);

Then i set up the input parameters in the SearchVendor object using sVndr reference, and the reuse the same to populate the 'req' model instantiated using the model(SearchVendorModel) .... (double effort, point taken)

Request_SearchVendor req = new Request_SearchVendor(model);

req.setSearchVendor(sVndr);

then bind using,

wdContext.nodeRequest_SearchVendor().bind(req);

and then I execute the model using

wdContext.nodeRequest_SearchVendor().currentRequest_SearchVendorElement().modelObject().execute();

Though mine is a bit twisted way, but I hope both code pieces accomplish the same stuff ......... ??

Paras