groovy utils - modify response
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2007
01:25 AM
07-03-2007
01:25 AM
groovy utils - modify response
hello!!
i have a method 'void' with this fault response:
?
the next step is modify the values with the groovy utils ( script ) because i want to use "mappers" from values to property file ( propertyTransfer ).
the script is:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
log.info( groovyUtils.projectPath );
// create holder for last response
def holder = groovyUtils.getXmlHolder( "write - Request#Response" )
holder.setNodeValue( "soap:Envelope/soap:Body/soap:Fault/soap:Code/soap:Value", "1" );
// update request with updated xml
groovyUtils.setPropertyValue( "write - Request", "Response", holder.prettyXml );
this is ok...but the values of the property has this values: "?"
how I could resolve it?
thanx alot!!
i have a method 'void' with this fault response:
?
the next step is modify the values with the groovy utils ( script ) because i want to use "mappers" from values to property file ( propertyTransfer ).
the script is:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
log.info( groovyUtils.projectPath );
// create holder for last response
def holder = groovyUtils.getXmlHolder( "write - Request#Response" )
holder.setNodeValue( "soap:Envelope/soap:Body/soap:Fault/soap:Code/soap:Value", "1" );
// update request with updated xml
groovyUtils.setPropertyValue( "write - Request", "Response", holder.prettyXml );
this is ok...but the values of the property has this values: "?"

how I could resolve it?
thanx alot!!
8 REPLIES 8
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2007
01:34 AM
07-03-2007
01:34 AM
Hi,
thanks for reposting 🙂
The Response property is read-only, so you won't be able to set the updated response.. but you can check that the update went ok with
log.info( holder.prettyXml )
What exactly do you want to do? Maybe there is some other way I can help you with!?
regards,
/Ole
eviware.com
thanks for reposting 🙂
The Response property is read-only, so you won't be able to set the updated response.. but you can check that the update went ok with
log.info( holder.prettyXml )
What exactly do you want to do? Maybe there is some other way I can help you with!?
regards,
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2007
03:15 AM
07-03-2007
03:15 AM
My "problem" is the void method: write ... i can't edit the response .. adding groovy script
one idea .... use 'PropertyTransfer' .. transfer the data from response to porperty ... edit the values "?" by another ones using groovy utils...but it doesn't work.
do you have another idea??
again...thanx alot!!!
one idea .... use 'PropertyTransfer' .. transfer the data from response to porperty ... edit the values "?" by another ones using groovy utils...but it doesn't work.
do you have another idea??
again...thanx alot!!!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2007
04:59 AM
07-03-2007
04:59 AM
Hi again,
I'm not really sure of your use-case here.. as far as I understand you
1) have a request to a webservice that
2) returns an empty soap 1.2 fault message..
3) You then want to modify the fault message
4) before using a property-transfer to transfer values from it to a
5) properties-step, which you then save to a file..
is this correctly understood?
regards!
/Ole
eviware.com
I'm not really sure of your use-case here.. as far as I understand you
1) have a request to a webservice that
2) returns an empty soap 1.2 fault message..
3) You then want to modify the fault message
4) before using a property-transfer to transfer values from it to a
5) properties-step, which you then save to a file..
is this correctly understood?
regards!
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2007
05:32 AM
07-03-2007
05:32 AM
yes...perfect!
i try to do a testsuite with several testcase like a sequence...i am passing the values from one test to other test...it is like a simulation...
thanx!!
i try to do a testsuite with several testcase like a sequence...i am passing the values from one test to other test...it is like a simulation...
thanx!!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2007
06:16 AM
07-03-2007
06:16 AM
Hi,
Try writing the modified response to a temporary property in your properties-step and then use this property as the source of your property-transfer!?
regards,
/Ole
eviware.com
Try writing the modified response to a temporary property in your properties-step and then use this property as the source of your property-transfer!?
regards,
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2007
01:13 AM
07-06-2007
01:13 AM
good!
another question about this Testcase. Now, if i do a submit the request and works OK, there is not a Response. Then, the testcase fail: "--> Invalid/empty response"....i don't have any assertion...
and i am not sure if it is a problem with the wsdl or the tool...
another question about this Testcase. Now, if i do a submit the request and works OK, there is not a Response. Then, the testcase fail: "--> Invalid/empty response"....i don't have any assertion...
and i am not sure if it is a problem with the wsdl or the tool...

- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2007
01:32 AM
07-06-2007
01:32 AM
Hi,
you can uncheck the "abort on error" option in the TestCase options dialog, then the TestCase will continue even after a failed teststep
regards,
/Ole
eviware.com
you can uncheck the "abort on error" option in the TestCase options dialog, then the TestCase will continue even after a failed teststep
regards,
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2007
01:48 AM
07-06-2007
01:48 AM
ahh good!!

