cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP_RESP_STATUS_CODE_NOT_OK : 401 :: Using JAVA Proxy

Former Member
0 Kudos

Hi

I am working on the following Synchronous scenario in XI 7.0 SP 08

<b>SAP R/3 ---> Sender RFC Adapter --> SAP XI --> Rec. XI Adapter --> Server JAVA Proxy ---> Java implementing class</b>

Now while executing the scenario I am getting following error -->

<i><SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>

<SAP:P1>401</SAP:P1>

<SAP:P2>Unauthorized</SAP:P2>

<SAP:Stack>HTTP response contains status code 401 with the description Unauthorized Error while sending by HTTP (error code: 401, error text: Unauthorized)</SAP:Stack></i>

Now I found some solution for this error on forum, one of them suggest this :

" Did you maintain Client, userid, password, and lang information in SICF transaction -> sap/xi/engine? Double click on service and check whether you have entered correct information. "

But in the SAP NW Config Guide I found this " <i>The logon data (user, password, client, and language) is dynamically transferred in the HTTP header fields during an HTTP call of the service. For more information, see the SAP NetWeaver Library documentation under Exchange Infrastructure &#8594; Design and Configuration Time &#8594; Configuration &#8594; Defining Collaboration Profiles &#8594; Communication Channel.</i> "

Under " Activating an HTTP Service on the Integration Engine (Receiver Side) " of SAP NW Config Guide.

Also I asked our BASIS team to update as I found no value in client, userid, password but they revert back that system is not allowing them to save anything on this page. Also which User ID we should mention on this page.

Also one of the forum suggested to check the RFC Destination " INTEGRATION_DIRECTORY_HMI ". I tested it & getting expected results as mentioned in Installation guide. " <i>The test has been executed successfully if the response status code is 500 and you find REQID not found in the HTTP body</i>. "

Some forum suggest to check the role of user PIISUSER, I did that & it is fine. Also check the exchange profile for PIAFUSER & PIISUSER & they are also fine.

Also checked the Note Number 821026 but this error is coming everytime not sporadically.

Now in my Receiver XI Adapter under Service Number I earlier mentioned HTTP port { as this was mentioned in " How to Work with JAVA Proxy " }.

" <i>The Service Number is the HTTP port of the Adapter Engine. ".</i>

But weblog <a href="/people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi* Errors in XI</a>under 401 error says your adapter should have J2EE port.

Can you confirm which PORT I should mention in XI Adpater. Though right now with both the port numbers I am getting the same<b> HTTP 401 unauthorized</b> error.

XI adapter Settings:

Message Protocol : XI 3.0

Adressing Type : URL address

Target :Host XI server host name

Service :Port Number (50100)

path : /MessagingSystem/receiver/JPR/XI

User :PIAPPLUSER

Can you suggest what can I do to resolve this issue.

Regards

- Lalit Chaudhary -

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> XI adapter Settings:

>

> Message Protocol : XI 3.0

> Adressing Type : URL address

> Target :Host XI server host name

> Service :Port Number (50100)

> path : /MessagingSystem/receiver/JPR/XI

> User :PIAPPLUSER

It must be:

path : /MessagingSystem/receive/JPR/XI (with 'r')

The authentication type should be: Non-SAP system

Type the URL in your web browser and log in with this user.

Regards

Stefan

Former Member
0 Kudos

Thanks Stefe.

Though in my XI Adapter I was using this path only

<b>/MessagingSystem/receive/JPR/XI</b>

The above path was typo mistake from my side. But yeah testing the URL gave me the solution.

Actually BASIS team provided me with the wrong pwd for PIAPPLUSER. After having the right credentials, scenario is working perfectly fine.

Thanks to all

- Lalit -

Answers (2)

Answers (2)

Former Member
0 Kudos

Problem is resolved after having the right credentials for XI Adapter.

- Lalit -

Former Member
0 Kudos

Example of valid URL & Output on the web page

++++++++++++++++++++++++++++++++++++++++

<b>Valid URL</b> -->

<i>http://xiserver01:50100//MessagingSystem/receive/JPR/XI</i>

<b>Output on Web Page</b> -->

<?xml version="1.0" encoding="UTF-8" ?>

- <scenario>

<scenname>MSG_SCEN</scenname>

<scentype>SERV</scentype>

<sceninst>MSG_001</sceninst>

<scenversion>001</scenversion>

- <component>

<compname>SERVLET</compname>

<compdesc>Messaging System</compdesc>

<comphost>localhost</comphost>

<compinst>MSG_001</compinst>

- <message>

<messalert>OKAY</messalert>

<messseverity>100</messseverity>

<messarea>QR</messarea>

<messnumber>801</messnumber>

<messparameter>na</messparameter>

<messtext>MessagingServlet is active.</messtext>

</message>

</component>

</scenario>

Former Member
0 Kudos

Lines from TRACE file -->

++++++++++++++++++++++++++++++++++++++++++++++++

<Trace level="2" type="T">Addressing mode: url</Trace>

<Trace level="3" type="T">Host = xiserver01</Trace>

<Trace level="3" type="T">Port = 50100</Trace>

<Trace level="3" type="T">Transport protocol = HTTP 1.0</Trace>

<Trace level="3" type="T">Message protocol =</Trace>

<Trace level="3" type="T">Path = /MessagingSystem/receive/JPR/XI</Trace>

<Trace level="2" type="T">Auth mode: basicNonSAP</Trace>

<Trace level="3" type="T">Conversion of language from char2 to char1</Trace>

<Trace level="3" type="T">User = piappluser</Trace>

<Trace level="3" type="T">Client =</Trace>

<Trace level="3" type="T">Language =</Trace>

<Trace level="3" type="T">Creating HTTP-client</Trace>

<Trace level="3" type="T">HTTP-client: creation finished</Trace>

<Trace level="3" type="T">Security: Basic authentication</Trace>

<Trace level="3" type="T">Serializing message object...</Trace>

<Trace level="3" type="T">HTTP-client: sending http-request...</Trace>

<Trace level="3" type="T">HTTP-client: request sent</Trace>

<Trace level="3" type="T">HTTP-client: Receiving http-response...</Trace>

<Trace level="3" type="T">HTTP-client: response received</Trace>

<Trace level="3" type="T">HTTP-client: checking status code...</Trace>

<Trace level="3" type="T">HTTP-client: status code = 401</Trace>

<Trace level="3" type="System_Error">HTTP-client: error response= <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Error Report</title> <style> td {font-family : Arial, Tahoma, Helvetica, sans-serif; font-size : 14px;} A:link A:visited A:active </style> </head> <body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0"> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75"> <tr bgcolor="#FFFFFF"> <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="4" color="#666666"><b>&nbsp;&nbsp;401 &nbsp Unauthorized</b></font></td> </tr> <tr bgcolor="#3F73A3"> <td height="23" width="84"><img width=1 height=1 border=0 alt=""></td> <td height="23"><img width=1 height=1 border=0 alt=""></td> <td align="right" height="23"><font face="Arial, Verdana, Helvetica" size="2" color="#FFFFFF"><b>SAP J2EE Engine/7.00&nbsp;</b></font></td> </tr> <tr bgcolor="#9DCDFD"> <td height="4" colspan="3"><img width=1 height=1 border=0 alt=""></td> </tr> </table> <br><br><br><br><br><br> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75"> <tr bgcolor="#FFFFFF"> <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><b>&nbsp;&nbsp;<b>Authentication did not succeed.</b></b></font></td> </tr> <tr bgcolor="#FFFFFF"> <td align="left" valign="top" height="48"><font face="Arial, Verdana, Helvetica" size="2" color="#000000"><b>&nbsp;&nbsp;Details:</b></font></td> <td align="left" valign="top" height="48"><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><pre>&nbsp;&nbsp;No details available</pre></font></td> </tr> </body> </html></Trace>

<Trace level="3" type="T">HTTP-client: closing...</Trace>

+++++++++++++++++++++++++++++++++++++++

- Lalit -

Former Member
0 Kudos

Hi,

Try changing the password of the user to all caps and then try.

This might work i think, coz PI7.0 is case sensitive.

Go thro the thread for further details on this:

Wild Guess, hope will be helpful for u.

Regards,

P.Venkat

Message was edited by:

Venkataramanan