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 (1)

Accepted Solutions (1)

former_member192434
Active Contributor
0 Kudos

Hi

it might be due to Webservice deastinations are not propertly configured in visual administrator.

Login to visual administator check whether destinations are ok or not?

in VA,Go to Services->Destinations->Select the destination and test it once.

Thanks

Former Member
0 Kudos

Hello Anup,

I tested both of my destinations. One of destination is giving error:

"Error during operation. Received HTTP response 401 "

But I have put correct login credentials, why is it still giving that error. Is there any other setting to be done.

I have already awarded you points for helpful answer.

Any help from anyone would be highly appreciated.

Thanks,

Sandesh

former_member192434
Active Contributor
0 Kudos

Hi

Probably need to restart the server, if the problem still exists then need to configure wsdl destionation properly.

Check this to configure wsdl destionation

https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7&overrid...

Thanks

Former Member
0 Kudos

I restarted the server. But No Luck.

Also I have configured destinations properly. Since there is no proxy server in my case, I need not do proxy related settings.

Sandesh

former_member192434
Active Contributor
0 Kudos

Hi

Probably you need to configure second destination(As you suggested above)

check this hlep might help you.[Creating Web Service Physical Destinations|http://help.sap.com/saphelp_nwce711/helpdata/en/47/fb728265553c88e10000000a42189c/content.htm]

[ Configuring Web Services and Web Service Clients in the SAP NetWeaver Administrator |http://help.sap.com/saphelp_nwce10/helpdata/en/44/4d2bb1c6b00597e10000000a155369/content.htm]

Thanks

Former Member
0 Kudos

@Siva

I tried adding that code, But did not work

@Anup

I am going to try it once again and lets see ...

thanks,

Sandesh

Former Member
0 Kudos

Hi Sandesh,

Can you please tell me how did you rectified this issue? I am facing a similar issue.

Appreciate your quick help on this.

Regards

Sahil

Answers (1)

Answers (1)

former_member197348
Active Contributor
0 Kudos

Hi Sandesh,

I think the authorization is missing for the model object.

Check this [wiki|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=74383659].

set user id and password in WS execute method.

Feel free to revert back if this could not resolve your issue.

Regards,

Siva