function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sidharth12Sidharth12 

Outbound integration to SAP-401 unauthorized issue

Hi There,

 

We are trying to integrate salesforce-SAP systems. SAP using SAP PI system and we imported the WSDL from SAP but the generated class dosnt contain any user id and password parameter. But the WSDL working fine when used in SOAP UI because SOAP UI asks for user id and password parameters in runtime but in salesforce we can not provide it in runtime. Even the XML file which we got from SAP doesnt contain any user id and password param neither in header nor in body.

 

we tried a http call by putting the user id and password in the header section but we are getting 401 unauthorized  error.

Is there any way to resolve the issue? how can we get the exact request which hits to SAP server in XML format from SAP? please suggest.

 

Thanks,

Sid

Andy BoettcherAndy Boettcher

Odds are that you're being prompted for Basic Authentication - try reading through this post.

 

http://blogs.developerforce.com/developer-relations/2009/01/using-basic-authentication-with-web-services.html

 

-Andy

Sidharth12Sidharth12

I am able to make a HTTP callout but we are encoding the user id and password and sending it which is basically not a secure callout. Is there anything through which we can put it in more secure way?

 

Thanks,

Sid

Andy BoettcherAndy Boettcher

You can use a signed certificate - that would be far more secure.  =)

 

-Andy