cancel
Showing results for 
Search instead for 
Did you mean: 

401 unauthorized error in webservice scenario

Former Member
0 Kudos

Hi Experts,

Working on SOAP -> PI -> RFC scenario on PI 7.1 and getting 401 unauthorized error.

When I try to test the webservice using SAPUI testing tool, getting the below error.

<?xml version='1.0'?>

<!-- see the documentation -->

<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>

<SOAP:Body>

<SOAP:Fault>

<faultcode>SOAP:Server</faultcode>

<faultstring>Server Error</faultstring>

<detail>

<s:SystemError xmlns:s='http://sap.com/xi/WebService/xi2.0'>

<context>XIAdapter</context>

<code>ADAPTER.JAVA_EXCEPTION</code>

<text><![CDATA[

com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 401 : Unauthorized

at com.sap.aii.adapter.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:955)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)

We have given full permission to PIAPPLUSER too.

Please provide the solution.

Regards

Sara

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please check if you are using the Authorized User ID and Password that will be able to send the request to XI integration Server.

Even if possible that the User ID is locked so it may give you authorization problem even if you have given full permission. Try to reset the password for the User ID and try once again.

Thanks

Swarup

Answers (5)

Answers (5)

former_member556603
Active Contributor
0 Kudos

Hello Sara,

Error: HTTP_RESP_STATUS_CODE_NOT_OK 401 Unauthorized

Description: The request requires user authentication

Possible Tips:

u2022 Check XIAPPLUSER is having this Role -SAP_XI_APPL_SERV_USER

u2022 If the error is in XI Adapter, then your port entry should J2EE port 5<System no>

u2022 If the error is in Adapter Engine

u2013then have a look into SAP note- 821026, Delete the Adapter Engine cache in transaction SXI_CACHE Goto --> Cache.

u2022 May be wrong password for user XIISUSER

u2022 May be wrong password for user XIAFUSER

u2013 for this Check the Exchange Profile and transaction SU01, try to reset the password -Restart the J2EE Engine to activate changes in the Exchange Profile After doing this, you can restart the message

Thanks,

Satya Kumar

Former Member
0 Kudos

hi

check whether the user with which the soap request is being sent has assigned role XI_ADAPTER_SOAP_MESSAGE

regards

kummari

Former Member
0 Kudos

Hi Kummari,

Couldn't find XI_ADAPTER_SOAP_MESSAGE role in PI 7.1. May I know the exact role name..

Regards

Sara

prateek
Active Contributor
0 Kudos

Use PIAPPLUSER or any user with similar roles.

Regards,

Prateek

Former Member
0 Kudos

Hi,

Try to check for the authorization for the user and also check whether you have rights to send the message to the IS. Also check whether you are able to login using the user credentials you have.

Regards,

Nithiyanandam

Former Member
0 Kudos

Hi

Try with user : PISUPER

rgds

srini