cancel
Showing results for 
Search instead for 
Did you mean: 

HTTPPost call Unauthorized statusCode:401

former_member202208
Active Participant
0 Kudos

Hi all,

For a HttpPost call from MII to ME system we are getting an Unauthorized statusCode:401 response back.

UserName and password combination for the secured webservice call is correct. We tested from browser, SOAPUI tool and it works but not from MII.

In the catch block i am printing the username, password, url and soap request data, everything looks correct. Any idea why it could be failing.

Logs:

[DEBUG] [HTTP_Post_0]: Link Stats: HTTP_Post_0.URL, Type [Assign], Time [ <1 ms], Expression: "http://<HOST>:<PORT>/sap/bc/srt/rfc/sap/ZWSPPSF_PRD_ORD_CONF_2155"

[DEBUG] [HTTP_Post_0]: Link Stats: HTTP_Post_0.UserName, Type [Assign], Time [ <1 ms], Expression: "ME_User1"

[DEBUG] [HTTP_Post_0]: Link Stats: HTTP_Post_0.UserPassword, Type [Assign], Time [ <1 ms], Expression: "SAP_ME_Pass1a"

[DEBUG] [HTTP_Post_0]: Link Stats: HTTP_Post_0.PostData, Type [Assign], Time [ <1 ms], Expression: Transaction.CancelPO

[DEBUG] Action parameter creating time [ <1 ms]

[DEBUG] Post Action: executed initial post.

[DEBUG] HTTP Post:false statusText:Unauthorized statusCode:401

[WARN] [HTTP_Post_0] Skipping execution of output links due to action failure.

[DEBUG] [HTTP_Post_0]: Finished[45 ms] Succeeded: false

Response Message:

-----------------------------------------

Login failed

What has happened?

The call to the URL was http://<HOST>:<PORT>/Service  canceled due to incorrect credentials.

Note

The application was running in the system CEQ. The application was made for the client 400 and the language.

What can you do?

check the validity of your SSO tickets for this system. If you still have a user ID, please contact your system administrator.

Error Code: ICF-LE-http-c :400-l: T :21-C :6-U :5-P: 5 L-6

HTTP 401 - Unauthorized

Your

SAP Internet Communication Framework Team

-----------------------------------------

Any help would be highly appreciated.

Thanks in advance.

Thanks,


Accepted Solutions (0)

Answers (1)

Answers (1)

former_member202208
Active Participant
0 Kudos

I am still waiting for a reply, any help would be highly appreciated

agentry_src
Active Contributor
0 Kudos

Hi Shridhar,

What version and build of MII  and NW are you using?

I also noticed that your url is "http://...".  Does the redirect to https work in the browser?

Regards, Mike

former_member202208
Active Participant
0 Kudos

Hi Michael,

We have;

MII : 12.2.2.235

Net weaver : 7.30.3710.100205.20100730065942

I tried  with https:// to fetch the wsdl and it does not respond. I think its http.

I have one more question on the same;

In the SOAPUI tool logs i see that it makes 2 httppost calls to get the response back.

Call 1: Fails with the same message what i get from MII HttpPost. --  HTTP 401 Unauthorized.

Call 2: It makes same call again with some more Header Information, It sets the Authorization also.

From MII, do we need to make a call to get the Logon ticket and make the next call with the ticket to execute the Web service call?


Please find the SOAP UI http log below;

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "POST /sap/bc/srt/rfc/sap/ZWSPPSF_PRD_ORD_CONF_2155?sap-client=400 HTTP/1.0[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "SOAPAction: ""[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Content-Length: 531[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Host: <HOST>.com:8010[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Connection: Keep-Alive[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Cookie: sap-usercontext=sap-client=400[\r][\n]"

.............

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "</soapenv:Envelope>"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "HTTP/1.0 401 Unauthorized[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "content-type: text/html; charset=utf-8[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "content-length: 1991[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "sap-system: CEQ[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "www-authenticate: Basic realm="SAP Web Application Server [CEQ]"[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "sap-client: 400[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "server: SAP NetWeaver Application Server / ABAP 701[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "POST /sap/bc/srt/rfc/sap/ZWSPPSF_PRD_ORD_CONF_2155?sap-client=400 HTTP/1.0[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "SOAPAction: ""[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Content-Length: 531[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Host: <HOST>:8010[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Connection: Keep-Alive[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Cookie: sap-usercontext=sap-client=400[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Cookie2: $Version=1[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "Authorization: Basic TUVfTWFjaDE6U0FQX01FX01JSTFh[\r][\n]"

......

Mon May 14 17:31:41 EDT 2012:DEBUG:>> "</soapenv:Envelope>"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "HTTP/1.0 200 OK[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "content-type: text/xml; charset=utf-8[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "content-length: 706[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "accept: text/xml[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "sap-srt_id: 20120514/163021/v1.00_final_6.40/ED90B14F3C265423E1000000AC1673AC[\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "sap-srt_server_info: CEQ_400,209 ,urn:sap-com:document:sap:soap:functions:mc-style,ZppsfPrdOrdConfCancel2155,ZppsfPrdOrdConfCancel2155,20 [\r][\n]"

Mon May 14 17:31:41 EDT 2012:DEBUG:<< "server: SAP NetWeaver Application Server / ABAP 701[\r][\n]"


Thanks,

Shridhar..

agentry_src
Active Contributor
0 Kudos

Hi Shridhar,

That sounds a bit odd, but the flip side is that it would not take much effort to test.  Can you give it a try?

Regards, Mike

Also, what version of ME are you calling?

Message was edited by: Michael Appleby

former_member202208
Active Participant
0 Kudos

Hi Micheal,

How can do that? are there any action block in MII for Authentication?

How can we pass the ticket information from 1st Http to 2nd Http call.?

Thanks,

Shridhar..

agentry_src
Active Contributor
0 Kudos

Hi Shridhar,

I thought I understood that the first call was returning the ticket information, but MII was not using that information to create a second call.  If correct, you should be able to use the response from your http call to populate a second http action block with the correct authentication info.  Or have I misunderstood completely (wouldn't be the first time).

Thanks, Mike

former_member202208
Active Participant
0 Kudos

Hello Mike,

No it doesn't return ticket information, It just returns the following error message.

Login failed

What has happened?

The call to the URL was http://<HOST>:<PORT>/Service  canceled due to incorrect credentials.

Note

The application was running in the system CEQ. The application was made for the client 400 and the language.

What can you do?

check the validity of your SSO tickets for this system. If you still have a user ID, please contact your system administrator.

Error Code: ICF-LE-http-c :400-l: T :21-C :6-U :5-P: 5 L-6

HTTP 401 - Unauthorized

Your

SAP Internet Communication Framework Team

that's why i asked if there is any action block for Authentication [which returns ticket info] and we can use that.

Thanks,

Shridhar..

agentry_src
Active Contributor
0 Kudos

Hi Shridhar,

No action block exists for that purpose.  Please open a ticket for this issue.

Thanks, Mike

former_member202208
Active Participant
0 Kudos

Thanks Mike.