You need to sign in to do that
Don't have an account?

Need help with SOAP request
Currently I am able to send the Header in the Soap request in 2 ways as shown below:
1st way
<env:Header>
<Security xmlns ="http://schemas.xmlsoap.org/ws/2003/06/secext">
<UsernameToken>
<Username>abcde</Username>
<Password>abc123</Password> (Password here is simple xsd:string type)
</UsernameToken>
</ Security>
</env:Header>
And like this:
2nd way
<env:Header>
<Security xmlns ="http://schemas.xmlsoap.org/ws/2003/06/secext">
<UsernameToken>
<Username>abcde</Username>
<Password Type=”PasswordText” />
</UsernameToken>
</ Security>
</env:Header>
But this is the header that I require (marked in Red):
<env:Header>
<Security xmlns ="http://schemas.xmlsoap.org/ws/2003/06/secext" soapenv:mustUnderstand="1">
<UsernameToken>
<Username>abcde</Username>
<Password Type= “PasswordText”>abc123</Password>
</UsernameToken>
</ Security>
</env:Header>
What I am unable to create 2 things as shown above:
- I can send either password type or password value, but not both together.
- I cannot add soapenv:mustUnderstand="1" in Security tag.
Is there way to achieve it by making modification in the Apex class or any other way?
Thank you.
what does the class definition look like? did you use the generated wsdl to build your client?
Sam
Hi Sam,
The class is generated by WSDL2Apex.
Thank you..
Hi Vinit,
Were you able to resolve the issue. If yes, please share what you have done to achieve this.