cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP service code 401 :Unauthorized

Former Member
0 Kudos
743

Hi,

I am trying to connect to a 3rd using HTTP plain adapter but I get an error message "HTTP service code 401 :Unauthorized", where could I have gone wrong?? Any ideas.....

-Teresa

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Teresa,

I see from your various posts that you seem to have quite a few issues in different areas

Anyway, on this point, are you sure the HTTP post is calling the Integration Server correctly ?

Can you let me know your HTTP call and I have one I can compare it to from the course I attended where we used the HTTP adapter ?

On another note, what customer are you based at ? I'm trying to gauge if XI is gaining momentum in the UK......

Cheers

Colin.

Former Member
0 Kudos

Hi,

I know I am the subject of all weird errors..:( ..My customer site is in US..I guess its gaining moementum in UK...

My config for the HTTP adapter is

Transport protocol : HTTP 1.0

Message protocol : XI payload in HTTP body

Adapter engine :Integration server

URL : <http://URL NAME(complete path)>

Authentication data: username:<username>

password :<no pass as system canaccept w/o password>

Header fields : Sender id (B2B settings)

Bo type id (B2B settings)

Sometimes I get a HTTP 401:Unauthorized error or sometimes I get ICM_HTTP_CONNECTION_FAILED.

The trace tells me "Error exception return from pipeline processing". I think I have done my settings properly or may be I missed some??

Will there be a difference if I apply the IP address to the HTTP destination instead of an URL??

Please help out!!!

-Teresa

Former Member
0 Kudos

Go to SXMB_ADM and review the config for the Integration Engine Configuration. If you put http://host:port/sap/xi/engine/entry?type=entry user information is passed in the HTTP header. If you put dest://INTEGRATION_SERVER check the user information is valid for the http INTEGRATION_SERVER entry in sm59.

Mike

p.s. I moved from your problem to a different one so others may correct my logic.

Former Member
0 Kudos

Hi,

My integration server is http://host:port/sap/xi/engine/entry?type=entry user and my target host is the external URL.I have also tried creating an RFC for the external HTTP connection and it has a status 200 in test connection.

The sxmb_moni log changed from status 400 to status 404..I think I am drifting away from a simple fix..Any suggestions please..

-Teresa

Former Member
0 Kudos

Hi all,

Adding to the earlier message in the ID setting for HTTP adapter for URL ADDRESS,whenever http:// is added to the URL addres I get a HTTP 400:ICM_http...error and when the http:// is removed and just URL is given eg: abc.yahho.com..., there is an HTTP 401 Unauthorised error..Hmm..I am confused with the issue would be..

-Teresa

Former Member
0 Kudos

I was trying to avoid leading you into the same problem I am having but here is part 2.

In transaction SICF you need to activate default_host/sap/xi/engine in addition I set the user identity after choosing display service. I'm not sure this is a good thing but it does reflect some of the settings described in the online help.

I also rerun RSXMB_ACTIVATE_ICF_SERVICES but I think this only makes me feel like I am doing something rather than actually fixing anything.

Mike

Former Member
0 Kudos

Hi there,

Is it possible that there is a firewall between your XI server and your target destination?

Have you tried to connect to the 3rd party application using another method (not XI) like IE or Wfetch from the XI server?

At what point/stage is the error message generated in the pipeline?

Christiaan

Former Member
0 Kudos

hi,

I tried the URL in IE and it works. The 3rd party is on our side of firewall. So I guess firewall is not an issue..Correct me if I wrong.. Here is the trace where it exactly fails..

<Trace level="1" type="T">----


</Trace>

<Trace level="1" type="T">---- Plain HTTP Adapter Outbound----</Trace>

<Trace level="1" type="T">----


</Trace>

- <Trace level="1" type="B" name="CL_HTTP_PLAIN_OUTBOUND-ENTER_PLSRV">

<Trace level="1" type="T">Get XML-Dokument from the Message-Objekt</Trace>

</Trace>

</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />

<Trace level="1" type="System_Error">Error exception return from pipeline processing!</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />

- <!-- ************************************

-->

</SAP:Trace>

-Teresa

Former Member
0 Kudos

Teresa,

Whether there is a firewall between the XI server and the 3rd party app depends on your network set-up. IF they are both in the local LAN, then there is probably no firewall between the 2 boxes.

Unfortunately the trace you provided does not tell us too much. Increase the trace level in the XI system to 3 or more and re-run. You may find that this provides some more info.

Does the application you are communicating with require a username and password? If so, are these correct or are they being passed correctly to the application?

Regards

Christiaan

Former Member
0 Kudos

Hi,

thanks for the info...How do I increase the trace level ? Can you help me with that?

I do have a username but no password as the 3rd party has been set to receive messages without password authentication..And they are in the local lan ..So there is no proxy issue I guess..

Thanks,

teresa

Former Member
0 Kudos

Hi,

Is there a possiblity if the sender interface is in a particular namespace and the receiver interface is in another namespace and is that why there is a possiblity of an "external pipeline unidentified error occurrence"....I am trying to narrow down all my errors...:)...Can somebody help me with increasing the trace level in moni?

Thanks,

Teresa

Former Member
0 Kudos

Hey teresa,

Undr SCMB_ADMIN-> integration engine confgiuration-> specific configuration, you enter the logging parameters for the trace level. this information is in the document server administration. I can send it to you if you don't have it. Mainly the entry looks like this

Catagory- RUNTIME

PARAMTERS- LOGGING

CURRENT Value- 1(active

Catagory- RUNTIME

PARAMTERS-TRACE_LEVEL

VALUE- 3

You may not have any values in this screen when you first get there

regards,

Chris

Former Member
0 Kudos

Thanks Chris,

I think I narrowed down my issue...The basic authentication I give in the "Header Fields" settings in the HTTP adapter settings are not being pulled.. I have a basic authorization value to be set in the header field that needs to be read by the adapter to connect to the HTTP Url...I cant uunderstand why these header fields values are not being read...Communicating with my 3rd party, I figure this could be the main reason for HTTP 401 error as an unauthorised user.

Any hints guys, why my HTTP adapter is not able to read the header fields in its settings??

Thanks,

Teresa

Former Member
0 Kudos

Hello,

This was the error message after enhanced trace level. I am breaking my head where I could have missed any detail.

<Trace level="1" type="T">----


</Trace>

<Trace level="1" type="T">---- Plain HTTP Adapter Outbound----</Trace>

<Trace level="1" type="T">----


</Trace>

- <Trace level="1" type="B" name="CL_HTTP_PLAIN_OUTBOUND-ENTER_PLSRV">

<Trace level="3" type="T">Quality of Service EO</Trace>

<Trace level="1" type="T">Get XML-Dokument from the Message-Objekt</Trace>

<Trace level="3" type="T">URL http://erpdev.sft.com:/info/header/Web/XMLChannel</Trace>;

<Trace level="3" type="T">Proxy Host: 10.14.56.33</Trace>

<Trace level="3" type="T">Proxy Service: 80</Trace>

<Trace level="3" type="T">~request_method POST</Trace>

<Trace level="3" type="T">~server_protocol HTTP/1.0</Trace>

<Trace level="3" type="T">accept: */*</Trace>

<Trace level="3" type="T">content-type: text/xml</Trace>

<Trace level="3" type="T">msgguid: 41B0C74736330099020000000A402250</Trace>

<Trace level="3" type="T">service:</Trace>

<Trace level="3" type="T">interface namespace: urn:sft.com/erp/devmain</Trace>

<Trace level="3" type="T">interface name: SalesOrderToCust</Trace>

<Trace level="3" type="T">quality of service: EO</Trace>

<Trace level="3" type="T">Header-Fields</Trace>

<Trace level="3" type="T">Conversion Payload to String Codepage: utf-8 to System</Trace>

<Trace level="3" type="T">URL-Encoding String</Trace>

<Trace level="3" type="T">Conversion String to Payload Codepage: System to UTF-8</Trace>

<Trace level="3" type="T">Prolog conversion Codepage: UTF-8</Trace>

<Trace level="3" type="T">Epilog conversion Codepage: UTF-8</Trace>

<Trace level="3" type="T">content-length 5113</Trace>

<Trace level="2" type="T">HTTP-Response :</Trace>

<Trace level="2" type="T">Code : 401</Trace>

<Trace level="2" type="T">Reason: Unauthorized</Trace>

<Trace level="2" type="T">Code : 401</Trace>

<Trace level="2" type="T">Reason: Unauthorized</Trace>

</Trace>

</Trace>

- <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST">

<Trace level="3" type="T">Persisting message after plsrv call</Trace>

<Trace level="3" type="T">Message-Version = 007</Trace>

<Trace level="3" type="T">Message version 007</Trace>

<Trace level="3" type="T">Pipeline CENTRAL</Trace>

</Trace>

<Trace level="3" type="System_Error">Error exception return from pipeline processing!</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />

- <!-- ************************************

-->

<Trace level="3" type="T">Persisting message Status = 014</Trace>

<Trace level="3" type="T">Message version 008</Trace>

<Trace level="3" type="T">Pipeline CENTRAL</Trace>

</SAP:Trace>

Any ideas please,

Teresa

Former Member
0 Kudos

My similar problem turned out to be the service port number. In your trace you are communicating on port 80 which is the default. If you need a different port you set it in the Communication Channel in the Integration Builder:Configuration.

Mike

P.s. I am just trying to return the favour as the trace options helped me.

Former Member
0 Kudos

Yes, Mike .The port number is fine but if you look at the header fields tag there is no values though I am giving some values in the Header fields config. of HTTP adapter ..Cant understand why those values are not showing up..?

-Teresa

Answers (0)