• kevin garcia 10
  • 5 Points
  • Member since 2020

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2

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:

 <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" wsse:mustUnderstand="1">

If someone has done something similar and can help me would be greatly appreciated.
Thanks in advance for any help.
My webservice expect a ws security header to be added in the request SOAP XML send to external system. I am able to make a call through SOAP UI but not able to figure out how to write a class to perform same functionality. Below is my sample xml

<soapenv:Envelope xmlns:onv="https://www.xyz.com/services/ONVInterface.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Password</wsse:Password>

Kindly help me out. Thanks!