Skip to Content
avatar image
Former Member

InvalidResponseCodeException: Invalid Response Code: (401)

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 07, 2009 at 02:34 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Aug 07, 2009 at 01:42 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 07, 2009 at 02:09 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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