on 09-04-2007 12:31 PM
Hi,
I have created a function module in R/3, and made it RFC enabled.Now i am trying to use this webservice in creating CO for web service.Now when i test it, i am getting this error:
Web service method http://<hostname>.<fully qualified domain name>.com:8001/sap/bc/soap/wsdl11?services=ZADDITION&sap-client=400&sap-user=<user ID>&sap-password=<Password>
invocation failed: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://<hostname>.<fully qualified domainname>.com:8001/sap/bc/soap/rfc"; nested exception is:
com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://<hostname>.<fully qualified domain name>.com:8001/sap/bc/soap/rfc"
What can be the reason??
any help will be highly apprecaiated!!
Thanks & Regards
Ameya
Hi,
Just one update: This WSDL URL is working fine and has no errors!! i have tested it in Browser.
Thanks in advance
Regards,
Ameya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As per the error I think the problem is regarding authorization. Does the web service hold authontication? If it holds then please provide actual UserId and password at the time of creation callable object or at the exposing time you can remove the authorization check. Then try it. Bucause when you are testing the Web Service I think it is asking for UserId and password before executing it. So here also you need to specify the same userId and Password. Please check it and then let me know.
Thanks
Chandan
Ciao Ameya,
You know that in order to create a WS CO, you can choose 2 options:
WDSL URL Select or
Logical Destination Select.
If i correctly understand you have used the first option,
but i think you have to use the second
(the help guide says "You use logical destination when you want to: Choose from a set of previously defined WSDL files; Invoke web services that need authentication; Invoke ABAP web services.")
and then you have to configure the logical destination (<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/f8/7889ce12924273a379c1c590675573/frameset.htm">help</a>).
Hope this help.
Regards
Luca
Well, one more update..
i tried using other WSDL url for Webservice other that of ABAP and it is
<b>http://www.webservicex.net/WeatherForecast.asmx?WSDL</b>
But this too is giving me this following error:
Could not load WSDL: GenericServiceFactory initialization problem when trying to load Web service model for WSDL: http://www.webservicex.net/WeatherForecast.asmx?WSDL
i have configured WebService container in Visual Admin as well and set proxy settings too.
Any idea??
Regards,
Ameya
Also please tell me,do i need to generate the WSIL file of consuming this service? i am talking in context with the ABAP web service..for this i am doing Logical destinations configuration, but i am confused that before doing this do i need to generate any WSIL file??if yes then, what would be the <b>process template ID & process version?</b>..
I think i have messed up..not getting what exactly i need to do..
please help me..
Thanks,
Ameya
Ok, this is my method:
once you've created the web service, go to transaction WSADMIN, open folder SOAP_Application_for_RFC-compliant, search your WS and get the URL (Example: Z_My_WS URL is /sap/bc/srt/rfc/sap/Z_My_WS).
Now go to Visual Admin: ServerXXXXX>Services>Web Services Security, in run time tab, open: Security configuration>Web Services Clients>sap.com>DynamicWSProxies create; in URL form insert:
http://<hostname>.<fully qualified domain name>.com:80XX/sap/bc/srt/rfc/sap/Z_My_WS?sap-client=XXX&wsdl=1.1, insert SysID, client, lang, for authentication select BASIC and insert UID & PWD. Then SAVE.
Last Step: in GP Design time select Logical Destination and select the one which you have created previously.
Select Logical Destination EndPoint and select yours.
Hope it works.
Luca
Hi,
for ABAP i have created a web service using my RFC function module just now, made the entry as you suggested for logical destination.
For http://www.webservicex.net/WeatherForecast.asmx?WSDL Webservice too, do i need to set logical destination??
Regards,
Ameya
Hi,
Yes i am getting error Could not find logical destination interfaces, check the <b>WSIL URL</b> inserted in visual admin.
Look.,
1)my function module name is ZADDITION,(RFC enabled)
2)IN transaction WSADMIN, i got the URL as
default_host/sap/bc/srt/rfc/sap/ZADDITION
in visual Admin i put this url
http://<host><fully qualified domain name>:8001/sap/bc/srt/rfc/sap/ZADDITION?sap-client=800&wsdl=1.1,
please tell me this host name is R/3 server or the portal server?
IN visual admin i put the above stated url,inserted SID,client,language, Basic Authentication,given UIDPW,
Then in Design time i was able to fine Logical destination name : Exposing,
then i clicked on search. but nothing happened
What can be the problem..is there any problem in my url??
please guide me, i think we have almost solved this..You have helpd me a lot..
Regards,
Ameya
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.