cancel
Showing results for 
Search instead for 
Did you mean: 

java.io.IOException: Server returned HTTP response code: 401 for URL

Former Member
0 Kudos

Hi,

Third part is getting the below error when invoking the webservice in XI

at java.lang.Thread.run(Thread.java:662)

Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL <URL LINK>

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)

at java.net.URL.openStream(URL.java:1010)

at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:804)

at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:262)

at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:129)

This is not because of the invalid credentials. It was working before one month. Please suggest.

Thanks and Regards

Suma S

Accepted Solutions (0)

Answers (4)

Answers (4)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>Third part is getting the below error when invoking the webservice in XI

401 error is unauthorized. This is purely authorization issue. Check with third party and see what is the user credentials they are using.. I mean username/password to access xi's webservice.

Tips:

You can test the webservice that you host in xi via soapui or xmlspy using username and password. If you are able to access the service then pass those credentials to third party to use it.

Shabarish_Nair
Active Contributor
0 Kudos
Server returned HTTP response code: 401 for URL

This in any case points to a authorization issue.

if you are connecting to PI, check the user in PI. Is it locked or has the password expired?

If you are connecting to a 3rd party system, contact them

Former Member
0 Kudos

Yes, I agree with Shabarish.

Http 401 error, refer to Unauthorized.

The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in "HTTP Authentication: Basic and Digest Access Authentication"

Check for User/Pass parameters in your call, and check if user is not locked.

former_member472138
Active Contributor
0 Kudos

Hi

Check the solution.

Calling the AF may result in HTTP 401 during high load; this is caused by too few connections to the ABAP user management or a timeout waiting for a new connection.

The connection pool for user verification calls to the ABAP side is controlled with Java destination UMEBackendConnection. The settings u201EMax. Connections‟ and u201EMax. Wait Time‟ can be used to control the timeout.

The u201EMax. Connections‟ setting controls the maximum number of connections that can be used in parallel. If all connections are in use and a new one is needed, the u201EMax Wait Time‟ setting specifies the time to wait for a free connection (in milliseconds). After this time the attempt is treated as an error.

Default for Max. Connections: 20

Default for Max. Wait Time: 10.000 ms

Increase parameters until problem disappears: for example, Max. Connections=50, Max. Wait Time=60000

For more information, see SAP Note 816022 - FAQ: XI 3.0 J2EE Adapter Engine / Messaging System.

Regards

Pothana

Former Member
0 Kudos

The webservice call is made to Integration engine.

Thanks

Suma

rajasekhar_reddy14
Active Contributor
0 Kudos

i think there was some change in web service system, web service system not able to understand your request data.

better to web service team about any changes in request structure .

Regards,

Raj