cancel
Showing results for 
Search instead for 
Did you mean: 

Getting HTTP/1.1 401 Unauthorized while Sending the SOAP Request

Former Member
0 Kudos

Hi Experts,

      We have a scenario SOAP-PI-RFC Synchronous scenario. We are getting HTTP/1.1 401 Unauthorized when we try to send the request using SOAP UI. but when I try and execute the interface using RWB and directly send the message to integation engine the interface is working fine.

The User ID that I am using contains all roles and profiles and has all the access.

I have PI 7.1 SP 10.

Looking forward to your help and suggestions on the same.

Thanks,

Rupendra Sharma

Accepted Solutions (0)

Answers (10)

Answers (10)

ridvan_polat
Participant
0 Kudos

Hi Rupendra,

Please check the following:

  • Navigate to the NWA
  • Select Configuration Management -> Security -> Authentication
  • From there select:

        "sap.com/com.sap.aii.adapter.soap.app*XISOAPAdapter"

  • See if has the login module "BasicPasswordLoginModule, SUFFICIENT"

        as well as "ClientCertLoginModule, SUFFICIENT"

Regarding the above you can refer to note #891877 - "Message-specific configuration of HTTP-Security".

In this context, XISOAPAdapter might be set to either

"ClientCertLoginModule" or "BasicPasswordLoginModule"; you might want to change this around in order to fix the HTTP 401 issue.

Regards,

Ridvan Polat

former_member184789
Active Contributor
0 Kudos

Hi,

Try resetting the password & then restart Java Engine...Also check if the XI engine in activated in SICF in path sap->xi->engine.

Former Member
0 Kudos

Rupendra,

The sender SOAP based application is using the user name/password seems to be locked with incorrect attempts of the wrong password on PI JAVA stack.

You need to unlock & reset the password with the help of SAP security team & provide the new password to the sender SOAP based application to configure at their end.

When you are posting the data in RWB with your user credntials its working fine since your crendtials are not locked & working fine & this is why you are allowed to post the data.

Hope this would help you in solving your issue.

Regards,

Ashish

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

We have a scenario SOAP-PI-RFC Synchronous scenario. We are getting HTTP/1.1 401 Unauthorized when we try to send the request using SOAP UI. but when I try and execute the interface using RWB and directly send the message to integation engine the interface is working fine.

The User ID that I am using contains all roles and profiles and has all the access.

I have PI 7.1 SP 10.

If you are sending directly to Integration Engine via RWB when testing, then you should use the Propose URL option when generating your WSDL and not the http(s)://host:port/XISOAPAdapter/MessageServlet?channel=p:s:c . See this blog by Stefan http://scn.sap.com/people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integra...

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

  I have generated using both the options (display wsdl and propose url) but it is giving me the same error.

I think this is something related to basis configuration or some settings in NWA.

Thanks,

Rupendra Sharma

smavachee
Active Contributor
0 Kudos

At this stage it seems that the problem is purely user authentication.

Regards

Sunil

Former Member
0 Kudos

Hi Rupendra Sharma,

If you type the url in web browser does it prompt for userid/password? If it prompts for that can you enter userid/password and check if it displays "Message Servlet OK" displayed in the browser?

Regards

Jeyakar

Former Member
0 Kudos

Exactly and this is what my point is there is some basis activities from which I can check where the problem is.

Former Member
0 Kudos

No, I am getting same 401 : Unauthorized error in that also.

Former Member
0 Kudos

Hi Rupendra Sharma,

In one of the soap FAQ it was mentioned to check this,

The user must be assigned one of the following roles
SAP_XI_IS_SERV_USER, SAP_XI_APPL_SERV_USER, SAP_XI_DEVELOPER_J2EE,
SAP_XI_ADMINISTRATOR_J2EE.

Can you check and assign.

Regards

Jeyakar

Former Member
0 Kudos

I had mentioned in my original post that it has all the roles and profiles in fact its admin user id.

Former Member
0 Kudos

Can you post the URL.

Is the user a service user?

Former Member
0 Kudos

When I generate WSDL using propose URL.

http://<;hostname>:<port>/sap/xi/engine?type=entry&version=3.0&Sender.Service=ECCCLNT200&Interface=urn:10509.com:PP:Test^SI_IB_LoginSync

When I generate from Display WSDL of sender agreement:

http://10.0.20.54:50000/sap/xi/engine?type=entry&version=3.0&Sender.Service=ECCCLNT200&Interface=urn...

I have tested using all kinds of user System and Dialog. It gives same error.

smavachee
Active Contributor
0 Kudos

Can you specify the URL format, you are using to create WSDL ?

It should be..

http://10.0.20.54:50000/XISOAPAdapter/MessageServlet?channel=<party>:<service>:<channel>

Regards,

Sunil

Former Member
0 Kudos

Making my problem a little more clear. Earlier this interface was working fine. Then we had SP10 upgrade and after that we started getting this error.

smavachee
Active Contributor
0 Kudos

You may need to re-create WSDL again as you mentioned that it was working before upgrade.

You can call to the sender SOAP adapter by two different UR Ls. SAP recommends to use

http://<host name>:<port name>/XISOAPAdapter/MessageServlet?senderParty=<name of the sender party>&senderService=<name of the sender service>&interface=<name of the interface>&receiverParty=<name of the receiver party>&receiverService=<name of the receiver service>&interfaceNamespace=<name of the interface namespace>

Refer below help doc once again and re-create WSDL once, it may help you, considering that there is no authorization issues.

Configuring the Sender SOAP Adapter

Regards,

Sunil

Former Member
0 Kudos

Hi Sunil,

  I had already done this. Infact I had deleted the ID objects recreated the interface once again and generated the wsdl and I am using newly generated wsdl only.


Thanks,

Rupendra Sharma

gagandeep_batra
Active Contributor
0 Kudos

Hi Rupendra,

did you try with soap navigator also?

check below blog  for more information.

http://scn.sap.com/people/rajasekhar.reddy14/blog/2011/03/03/testing-sender-web-service-interfaces-s...

Regards

Gagan

former_member303666
Active Participant
0 Kudos

Hi,

1.Check the generated wsdl link for the port and other details. those details should be correct.

2.Check your WSDL link with soap ui external tool. there you can get more information.

Generate the WSDL from Tools, not from Sender aggrement.

check the below WSDL format. Give the exat WSDL to webserver team.

 http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:channel  

Regards,

Kesava

Former Member
0 Kudos

Yes, I have entered basic credentials at the left side of SOAP UI. Also, I have cross checked credentials many times its fine.

Former Member
0 Kudos

Try changing the 'Authorisation Type' to 'Preemptive' in 'Aut' tab of soap request and see if it works.

Else use the latest version of the Soap UI.

Former Member
0 Kudos

Hi ,

While pushing from soupui you have given credentials in authentication(aut)(credentials to connect PI server) tab right.

Can you check the credentials once again by re entering.It is not about roles it is about credentials typo mistake or password expired.

Regards

Venkat

Former Member
0 Kudos

Hi Rupendra,

There is an option to set userid and password in soap UI while sending message from Soap UI. Did you check with this?

Regards

Jeyakar