on 03-23-2009 1:11 PM
Hello all,
I have created a DC of type Web Services and created a deployable proxy using a (*.wsdl) file. Now I using this proxy in a simple standalone java application.
When I call this webservice in my java code, it returns Invalid Response Code: (401) Unauthorized error.
Then I went to the Visual Admin Tool and set the authentication of the proxy as BASIC and typed the userid/password. It worked.
Now my issue is that I dont want to have this fixed userid/password on the server side. I want userid/password to be passed to the webservice dynamically from my java code without having to manually set them using the Visual Admin Tool.
How to achieve this ?
Thanks
Hi Vikram
Please check the following links
http://help.sap.com/saphelp_nw04s/helpdata/en/bb/961f07328bc3448e0e570e6b3c650f/content.htm
and
and
https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/1f3ac55d-0501-0010-e2ba-832279d7cae9 [original link is broken]
I hope it helps
Regards
Chen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thnx Chetan.
Wat I was trying to achieve was quite basic. I have figured it out myself using this code.
I had to just set the user/password in the java code using the _setproperty methods of the port.
Eg:
port is an object of MI_OS_XXXX class of wsdl and is used to send the request to the web service.
In the java code add:
port._setProperty(MI_OS_XXXX .USERNAME_PROPERTY, login); // login is a string holding the userid
port._setProperty(MI_OS_XXXX .PASSWORD_PROPERTY, password);
And in Visual Admin Tool, set the Authentication of proxy to None and remove the username and password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.