Forum Discussion
tjdurden
12 years agoFrequent Contributor
Hi deggial,
Yes, this should be possible. In short, once the WS-Security header is applied to an XML message, you can then use dynamic properties (using replacers) to replace the specific 'user'/'password' combinations as you need them. You could also use dynamic properties to generate any other values in WS-Security header (timestamps etc).
For example, you might choose to create a Properties step (called Properties in this example) that has 5 users in it... User1, Password1, User2, Password2, etc. In your SOAP request, you could then do something like:
You could also look at creating a Groovy step that dynamically creates user/pass Property combinations for you (either imported, or as part of a hard-coded array) and then iterate over the list that way. There's some useful bits for this here: http://www.loadui.org/forum/viewtopic.p ... 500#p37045
Kind regards,
Tim
Yes, this should be possible. In short, once the WS-Security header is applied to an XML message, you can then use dynamic properties (using replacers) to replace the specific 'user'/'password' combinations as you need them. You could also use dynamic properties to generate any other values in WS-Security header (timestamps etc).
For example, you might choose to create a Properties step (called Properties in this example) that has 5 users in it... User1, Password1, User2, Password2, etc. In your SOAP request, you could then do something like:
<soapenv:Envelope xmlns:qa="XXXXXXXXX" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security 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-1">
<wsse:Username>${Properties#User1}</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">${Properties#Password1}</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<qa:StartProcess>
<ScriptedResponses>?</ScriptedResponses>
</qa:StartProcess>
</soapenv:Body>
</soapenv:Envelope>
You could also look at creating a Groovy step that dynamically creates user/pass Property combinations for you (either imported, or as part of a hard-coded array) and then iterate over the list that way. There's some useful bits for this here: http://www.loadui.org/forum/viewtopic.p ... 500#p37045
Kind regards,
Tim
Related Content
- 6 years agorg2018
- 4 years agoryanterronez
Recent Discussions
- 3 days agoemoya
- 3 days agoMyBalanceNow