Forum Discussion

Luxoft_Internat's avatar
Luxoft_Internat
Contributor
13 years ago

[RES] Security tag by context.expand('${requestName#RawReq..

Hi,
I have created a soap ui project in soap ui pro 4.5.0 with different OutgoingWss configurations.
I need to apply each OutgoingWSS configuration to request using groovy script and after execution get this row request to observe Security element in Header (see screenshot in attach).
In fact, request is executed with right apllied OutgoingWss:

but context.expand('${requestName#RawRequest}') returns Header without Security element in it:

Can you please resolve this issue?

Thanks in advance.

4 Replies

  • Hi,

    you should be able to access the complete request via the response object for the teststep, please try

    log.info context.testCase.testSteps["Subscribe"].testRequest.response.requestContent

    Does that work ok?

    regards,

    /Ole
    SmartBear Software
  • SmartBear Support wrote:
    please try

    log.info context.testCase.testSteps["Subscribe"].testRequest.response.requestContent

    Does that work ok?


    No, it doesn't work. Script result is absolutely same and there are no Security element in header...
    Let me explain the issue in more details:
    Script result returns expected correct raw request with Security element in the case when OutgoingWss is applied in SoapUI XML editor tab from context menu.
    In other case, if we need to apply different OutgoingWss’s in run time (for example in groovy script) - script result will not return Security element in Header at all.
  • Hi,

    ok - I understand - please try the following instead:

    log.info context.requestContent

    after running the TestStep - does that work?

    regards,

    /Ole
    SmartBear Software
  • SmartBear Support wrote:
    please try the following instead:

    log.info context.requestContent

    after running the TestStep - does that work?


    Now it seems works properly!

    Remove please this issue from "bugs" board.

    Lot of thanks!