Forum Discussion

gordonb's avatar
gordonb
Occasional Contributor
11 years ago

Duplicate username token with TestRunner

When the project is run through the GUI (Project View > TestSuites tab > Select Environment > Run), the username token is correctly sent.

When the project is run using TestRunner with -EDefault, the username token is correctly sent.

When the project is run using TestRunner with -EENV, the request has a duplicate <wsse:UsernameToken>


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.blahblah.com/">
<soapenv:Header>
<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:UsernameToken wsu:Id="UsernameToken-2">
<wsse:Username>blahblah</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">blahblah</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">blahblah</wsse:Nonce>
<wsu:Created>2013-11-25T16:09:41.267Z</wsu:Created>
</wsse:UsernameToken>
<wsse:UsernameToken wsu:Id="UsernameToken-1">
<wsse:Username>blahblah</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">blahblah</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>

9 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    I'm not able to reproduce this. Can you double check that you did not somehow create two ws-security configurations in the environment ENV?



    Regards,
    Marcus
    SmartBear Support
  • gordonb's avatar
    gordonb
    Occasional Contributor
    'Project view' > 'WS-Security Configurations' is completely empty

    Also the request has <soapenv:Header/> as I am using the 'Username', 'Password' and 'WSS-Password Type' properties.

    I could maybe try to right-click the request XML and 'Add WSS Username Token'. That might get it working.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Can you confirm on how you configured your environment:
    - Open SoapUI Pro project window
    - Go to Environments tab
    - Go into you ENV environment
    - In "SOAP Services" subtab double click on the Name and Endpoint
    - In the window that pops up, please confirm that your "Outgoing WSS" dropdown is set to your 'WS-Security Configurations'

    Thanks,
    Michael Giller
    SmartBear Software
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Did you configure the Outgoing WS security at the project level? If so it should appear in the Environment Endpoint Data dialog in the SOAP Services tab. Please see screen shots below for reference.



    Regards,
    Marcus
    SmartBear Support
  • gordonb's avatar
    gordonb
    Occasional Contributor
    A row was added to 'Outgoing WS-Security Configurations', but the request was still duplicated.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    I'm unable to reproduce this running through GUI and testrunner with different environment. Are you able to share your project, or give an example project that shows this behavior?



    Regards,
    Marcus
    SmartBear Support
  • gordonb's avatar
    gordonb
    Occasional Contributor
    Thanks for looking into it, but I'm most likely not allowed to share a username / password.
    I can work around this with a cloned project for each environment.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi again!

    Good to hear that you found a walk around.
    We would like to investigate this further though.
    I have a full understanding that you don't what to share your credentials, but could you perhaps change the credentials to something made up (such as "username"/"password") and send us the project?
    Or even create a new dummy project where you are able to reproduce this behavior?


    --
    Regards

    Erik
    SmartBear Sweden