cancel
Showing results for 
Search instead for 
Did you mean: 

InvalidResponseCodeException: Invalid Response Code: (401)

Former Member
0 Kudos

Hello all,

I imported adaptive web service model in webdynpro java, and tried to execute the model. I am getting following exception:

Exception on execution of web service on destination 'SP_DEST' for operation 'Query' in interface 'QueryServiceSoap': Invalid Response Code: (401) Unauthorized. The requested URL was:"http://x.x.x.x:xxxx/_vti_bin/spsearch.asmx"; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://x.x.x.x:xxxx/_vti_bin/spsearch.asmx"

In visual admin I have put basic authentication with username and password for destinations.

Any solutions please...?

Thanks in advance,

Sandesh

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

This error - 401 signifies either of below but one thing is sure that your call is reaching upto destination and at valid end point

1. the user credentials that you are passing are not accepted by destnation, issue at destination with userID/pass

2. check if userID contains domain like username@abc .... and if userID contains spl chars like #,$,@ etc ...there are chance of error....so if this is the case then ask the destination person to remove domain from userID (I'd faced same issue and resolved by removing domain from userID)

Hope this helps.

Former Member
0 Kudos

@ Sachchidanand

I have put the domain also properly along with username.

Any help would be higly appreciated...

thanks,

Sandesh

Edited by: sandesh kumbhar on Aug 7, 2009 4:37 PM

Former Member
0 Kudos

ok , my guess was right !

contact to destination and tell that person to deallocate the domain for that userID and try without domain ....it'll work definately

I know only that if there is a domain in userID (even if you mention it correctly) it does n't work (sorry but I don't know the reason) ... FYI .... I struggled for 3 days to conclude that the issue is with domain only !

just try this and let me know if needed more

Former Member
0 Kudos

Hi,

Check if you have correct url, I never saw "_vti_bin" as a part of url.

Check if this service/wsdl available from internet explorer with user/password u supplied for this destination.

vtibin is secured and restricted folder but I may be wrong but reconfirm again. HTTP path must be something else.

"HTTP : 401" ,means you don;t have authorization to access it which explained by vtibin usage (not accessible from http).

Regards,

Gourav

Former Member
0 Kudos

User has roles and authorization to access that url

User can access same url with username and password when that URL is tested on browser.

Any other ideas please.

Thanks,

Sandesh

Former Member
0 Kudos

Check the roles assigned to the user you identified in your destination setup. You are probably missing something.