Forum Discussion

CaryB's avatar
CaryB
Contributor
12 years ago

[Resolved] Capturing request xml with property names

I'm stumped with a custom action I wrote to save the SOAP requests/responses. It works fine with one exception. I make use of a number of global properties and the values are being saved instead of the property names. The problem this poses is that the tests are to be shared (hence the logic behind the properties in the first place). The idea is that as long as everyone has the same properties defined they can run the tests w/o having to change things like system credentials.

So what I need to figure out is how to save ${my_password} to the file instead of secret_password.

Currently, I'm using

XmlHolder xml = new XmlHolder(wsdlTestStepResult.getRequestContentAsXml());


I've tried the getRawRequestData() method but that isn't what I need either.

Any ideas?

6 Replies

  • Hi,

    Are you trying to get the property names that are for a test step? The code snippet below shows you are trying to get the request.



    Regards,
    Marcus
    SmartBear Support
  • Hi,

    How can this possible in Soapui free version. As here SubmitListener.beforeSubmit event handler is used for Pro, but would like to check how we can get the requestContent in free version.
  • Hi,

    This the SoapUI Pro boards. If you are able post here then you must have had the pro version at one time. Support is for pro users, and yes the event handler is a feature of the pro version. If you are not a SoapUI Pro customer then please post in the SoapUI boards.


    Regards,
    Marcus
    SmartBear Support
  • I Apologize.

    We use both free and Pro version. Initially we used free version and developed all our automation. Now we got Pro version and we are migrating all our scripts into Pro and currently we are pro(version) users. We will make sure posting questions on respective boards.
  • Marcus,

    That does exactly what I want. Now to tweak it.

    The trick is how do I do this "behind the scenes"? The issue is that I need this to work for non-developers (ie analysts, QA, etc). While I can certainly document and explain what to do and how to disable the event when they don't need to save tests I'm concerned I'll be answering a lot of support calls. That's the beauty of using a custom test step. Aside from setting one global property to define the file save location all the end user has to do now is add my custom step to the end of their test case and hit the run button.

    I'll play with this a little more to see what I can come up with. divman does bring up a good point. The developers have the Pro version but I don't know if our other groups have made the investment or if they're on the free version. So whatever solution I come up with will need to be usable with both products.

    Thanks for the info.