need help with setNodeValue
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2008
06:38 PM
01-25-2008
06:38 PM
need help with setNodeValue
Hi,
I am new to soapui. I am trying to write a groovy script to read the data from a file and pass them as parameters to the request in the next step.
my xml in the second step is as follows
bbb
aa2
2
10.20.30.40
my groovy script in the first step is as follows
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
//create holder for last response an log requistID
def holder = groovyUtils.getXmlHolder( "ses:company#request" )
log.info holder.getNodeValue
holder.setNodeValue( "//ses:company", "ccc" )
holder.updateProperty()
This however is throwing an error
Fri Jan 25 18:37:00 PST 2008:ERROR:org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
Can you pl. help me. I do not think I am doing it right.
I am new to soapui. I am trying to write a groovy script to read the data from a file and pass them as parameters to the request in the next step.
my xml in the second step is as follows
my groovy script in the first step is as follows
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
//create holder for last response an log requistID
def holder = groovyUtils.getXmlHolder( "ses:company#request" )
log.info holder.getNodeValue
holder.setNodeValue( "//ses:company", "ccc" )
holder.updateProperty()
This however is throwing an error
Fri Jan 25 18:37:00 PST 2008:ERROR:org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
Can you pl. help me. I do not think I am doing it right.
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2008
02:52 AM
01-27-2008
02:52 AM
Hi!
is "sec:company" really the name of your Request Test Step? ie as specified in the expression for getXmlHolder in
def holder = groovyUtils.getXmlHolder( "ses:company#request" )
which maybe should be something like
def holder = groovyUtils.getXmlHolder( "Test Request 1#request" )
?
regards!
/Ole
eviware.com
is "sec:company" really the name of your Request Test Step? ie as specified in the expression for getXmlHolder in
def holder = groovyUtils.getXmlHolder( "ses:company#request" )
which maybe should be something like
def holder = groovyUtils.getXmlHolder( "Test Request 1#request" )
?
regards!
/Ole
eviware.com
