on 05-25-2010 6:54 AM
Hi experts,
I have created web service with "Basic Auth SOAP" as configuration type,
To consume that webservice in webdynpro java, i have chosen adaptive webservice model and selected "No logical destinations" ,
i did not find any setter methods to set the username and password to that webservice.
how can i set the username and password .
Regards,
Srinivas.
Hi Srinivas,
Destionation is mandatory along with user credentials for invoking the webservice.
IWSXXXXReqElement wseleReq = wdContext.nodeXXXX().currentnodeXXXXXElement();
IWSXXSERVive wsservice = wdContext.CurrentElement();
wseleReq .setXXXXInput("INput Value");
wsservice.modelObject()._setUser("webuser");
wsservice.modelObject()._setPassword("essent99");
wsservice.modelObject()._setXXXXDestinationName(wdThis.wdGetWebserviceCompInterface().getXXXDestination("DESTINATION_NAME");
wsserviceService.modelObject()._setEndPoint(wdThis.wdGetWebserviceCompInterface().getEndPoint("DESTINATION_NAME"));
wsservice.modelObject().execute();
Regards,
Lavanya.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
Once you create a WS model by giving URL,No need to mention the basic authentication in the code .
For that you need to create a destinations in the Visual adminstrator.
Once you create the WS destinations,at runtime it will check the basic authentications and then excute the service.
Pls find the below link for complete information about WS model and advantage.
Note: Advantages of using WS destinations.
Link Name:
What are Web Service destinations in AWS model good for? When to use them and how to configure them?
Link:http://wiki.sdn.sap.com/wiki/display/WDJava/FAQ-Models-AdaptiveWebService
Revert back to me incase if you need any clarification on this.
Regards,
Lavanya.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI ,
Create a webservice destinations in the visual administrator.
In VA you need to mention the basic authention to access the webservice.
Follow the below link to create destiantions in VA.
(Follow the steps from Fig 11.)
http://wiki.sdn.sap.com/wiki/display/WDJava/ConsumingABAPWebServiceinJavaWD
Regards,
Lavanya.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Once u select "No Logical Destinations", in the next screen, enter the URL and user id and password.
Ensure that the use has the privileges to execute the WS (for testing use Administrator role)
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If that is the case, u have an option to set the username and password thru code also.
After u create the object of the model and bind it to the node and before calling the execute statement u can set the username and password like this:
wdContext().current<ModelNodeName>Request()._setUsername("<username>");
wdContext().current<ModelNodeName>Request()._setPassword("<password>");
Hope this helps you.
Regards,
Poojith MV
Hi Srinivas,
Which version of NWDS are you in? This is a bug in NWDS. We faced this issue earlier. As a result we started authenticating the user id and password in the WSDL URL like
&sap-user=<xiuser>&sap-password=<xipass> at the end. In the higer version of NWDS, may be this bug is fixed.
Regards,
Ganesh N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.