+ Start a Discussion
sfdcsushilsfdcsushil 

Does Salesforce support WS Security in SOAP callouts?

SuperfellSuperfell

No, there's no support for WS-Sec. which features of ws-sec are you interested in ?

sfdcsushilsfdcsushil

Hello,

 

I need to use that for authentication. I do hvae othe option of using basic auth.


Let me know your thoughts.

 

Regards,

Sushil

SuperfellSuperfell

Basic auth is easy to do, add the authorization http header to the inputHeaders map on the generated stub class.

sfdcsushilsfdcsushil

So there is no way to implement Token based authentication as of now right?

SuperfellSuperfell

Depends where you want to specify the token, its its a http header (ala OAuth) then thats fine.

sfdcsushilsfdcsushil

For basic auth, I will be specifying the HTTTP autherization header. But token based auth for SOAP web service works if we change soap payload right? Through HTTP headers, we can just use basic auth.

SuperfellSuperfell

Depend on what you mean by token based auth, some of them are http based some of them are soap header based. If its a soap header then i beleive it has to be described in the WSDL for WSDL2Apex to generate code for it.

sfdcsushilsfdcsushil

Thanks for your responses.


I am looking for SOAP header based auth. If i change the WSDL  and generate Apex with that. Will it support that auth? I had a understanding this comes under WS Security and it will not work this way? Do you have any idea on this?