cancel
Showing results for 
Search instead for 
Did you mean: 

Authentication for access to web service from web dynpro

Former Member
0 Kudos

Hi all,

I am consuming a SAP provided (from ECC SE) web service using document type WSDL in web dynpro. The web Service is using XI proxies and runs using SOAP protocol.

I tried to create a model using the WSDL URL, i got a error message: "Inavalid WSDL or WSDL not found."

So I downloaded the WSDL file to local system and then provided the WSDL from local file system. This gave me the structure of the Web Service but i suppose accessing it without the authentication is still an issue because the WSDL requires ABAP user authentication.

When i run the WSDL URL from the browser, I have to provide a userid and password for accessing this webservice but in web dynpro i have found no such option, hence I get a rmi error at runtime.

Where should i give the authentication for this?

Or is there any workaround solution in which i dont have to give any authentication at all?

~Ankit

null

Accepted Solutions (0)

Answers (2)

Answers (2)

arun_srinivasan
Contributor
0 Kudos

hi

Check for the methods like setuser and set password for your webservice

Request_<webservicename> request=new Request_<webservicename>();

wdContext.nodeRequest_<webservicename>().bind(request);

wdContext.currentRequest_<webservicename>Element().modelObject()._setUser("sdnuser");

wdContext.currentRequest_<webservicename>Element().modelObject()._setPassword("sdnuser");

wdContext.node<webservicename>Request().current<webservicename>RequestElement().setRequest(company);

try

{

wdContext.currentRequest_<webservicename>Element().modelObject().execute();

}

catch (Exception e) {

wdComponentAPI.getMessageManager().reportWarning("Exception:"+e);

}

Hope this helps,

Regards,

Arun

Former Member
0 Kudos

hi,

<b>wdcontext.currentRequestXxelement().modelObject()._setUsername(userId);

wdcontext.currentRequestXxelement().modelObject()._setPassword(pwd);

wdcontext.currentRequestXxelement().modelObject().execute();</b>

Regards,

Naga