Soap with WS-Security

I am in need of help when using consumer soap wsdl execution.
I am trying to develop a POC where we execute a couple of soap API calls to an external system.
This system is supposed configured to utilize the Web Services Security UsernameToken Profile 1.1 and this is NOT included within the wsdl. First problem occurs when trying to import the wsdl, if done from HTTPS url I was given then webMethods (9.7) fails to import anything and I get a security error. If I save the wsdl to a local xml file it will successfully import but I don’t know how to change the webMethods components to utilize the security profile needed.

I read that a policy needs to be setup and imported into webservices descriptor component but wasn’t sure if this was correct or not.

If this is needed how does this then get into the connectors component that allows me to set the appropriate xml fields.

This is the soap header I am supposed to be creating:
<wsse:Security soapenv:mustUnderstand=“1”
<wsse:UsernameToken wsu:Id=“UsernameToken-xxxxxxxxxxxxxxxxxxx”>
<wsse:Password Type=“”>XxXxXxXxXx=</wsse:Password>
<wsse:Nonce EncodingType=“”>xxxxxxxxx==</wsse:Nonce>

  <wfswse:Impersonate xmlns:wfswse="">


I don’t understand how to get these segments into connector code unless they have already been included within the WSDL.

Thanks for your help.

This blog post should explain most of your questions :slight_smile:

Thanks for the information but I still don’t understand how I get the other fields such as PasswordDigest, Created, and Impersonate Userid created and populated within the soap header. Even if I import another policy into the wsdl and rebuild the consumer connector it doesn’t seem to change anything on connector service, I see the authority/message/user and password but where are the other fields within the imported policy?

Hi Bruce, You need not pass in those fields. SOAP header will be composed as required at runtime based on policy we have chosen. In this case it will be “Username_Token” policy. So all SOAP header fields that are required for this will be injected. We only need to pass in username and password under “auth/message/user” and “auth/message/password”

If I need to include
<wfswse:Impersonate xmlns:wfswse=“”>
within the soap header would this go in the security policy and how would I get it populated?

since the wfswse:Impersonate section is not a standard section from WSS, you have to customize your policy to include it.
not sure how the UserId will be injected, it’s non-standard.