You need to sign in to do that
Don't have an account?
Christian Monje Marcos 15
web service security integration
Hi.
I'm doing an integration with an external service (web service), I generated the apex classes through WSDL2Apex until here everything goes well, the problem is that the WS has a web service security header and I do not know how to add it. The header I have to add is the following:
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" wsse:mustUnderstand="1">
<wsse:UsernameToken>
<wsse:Username>XXXXX</wsse:Username>
<wsse:Password>XXXX</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
If someone has done something similar and can help me would be greatly appreciated.
Thanks in advance for any help.
I'm doing an integration with an external service (web service), I generated the apex classes through WSDL2Apex until here everything goes well, the problem is that the WS has a web service security header and I do not know how to add it. The header I have to add is the following:
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" wsse:mustUnderstand="1">
<wsse:UsernameToken>
<wsse:Username>XXXXX</wsse:Username>
<wsse:Password>XXXX</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
If someone has done something similar and can help me would be greatly appreciated.
Thanks in advance for any help.
Sorry for this issue you are facing.
Salesforce, unfortunately, does not support setting SOAP headers (like WS-Security) that are not explicitly included in the WSDL markup. You can set HTTP headers of course, but not SOAP headers.
There may be a workaround though - you should be able to manually insert the Web Service Security headers into the SOAP payload.
Thanks,
Nagendra
Can you tell me or help me to do it? I've been researching about it and the links I've seen and reviewed do not make it very clear how to manually make the header of the call to WS.
Thank you very much for answering my question.
https://salesforce.stackexchange.com/questions/178961/issue-with-soap-header-created-via-apex
Finally I have found a solution generating the XML to send to WS through DOM.Document and creating the headers I need to perform the integration.
Regards
Regards