You need to sign in to do that
Don't have an account?
prafpraf
OAuth - Alternative to username-password flow
Hi Team,
I am calling external SAP web service from saleforce using wsdl2apex callouts. I have not recevied any securty esdl file from SAP team.
Now I want to pass Username and Password as a parameter in a header to SAP while invoking thier method from a class generated by wsdl.
I am not getting any way how to set this in a apex class in salesforce.
Could anyone please help me on this and share any example which will solve my issue.
Thanks in Advance !!!
Regards,
Prafulla
It is too easy.
Just use HttpRequest class in Salesforce. Use send username and pwd to the header and make a http request.
Thanks for your reply.
But I have tried that solution as well still it is not working. It is flashing error as --
The requested URL could not be retrieve
Access Control is Denied.
Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'
Kindly help on this and let me know if nay more details needed.
Thanks and Regards,
Prafulla Bhangale
Hi Prafulla, I was getting same reponse when I was not able to login. If you will be able to successfully hit the web service you will not get this error.