Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parsing XML in Groovy

 
Susanta kumar Sahani
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am doing an automation on SOAP UI. I am biginer to groovy, Can you please help me how to read the xml tags in groovy. I want to read the response of my webservices, if the status is "Failure" then I need to print the error description passed in the string.
Please help me on this..
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Susanta kumar Sahani wrote:
I am doing an automation on SOAP UI. I am biginer to groovy, Can you please help me how to read the xml tags in groovy. I want to read the response of my webservices, if the status is "Failure" then I need to print the error description passed in the string.
Please help me on this..


Did you have a look at the XmlSlurper API of Groovy which can be used to read the XML data.
 
Susanta kumar Sahani
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohamed Sanaulla wrote:
Susanta kumar Sahani wrote:
I am doing an automation on SOAP UI. I am biginer to groovy, Can you please help me how to read the xml tags in groovy. I want to read the response of my webservices, if the status is "Failure" then I need to print the error description passed in the string.
Please help me on this..


Did you have a look at the XmlSlurper API of Groovy which can be used to read the XML data.


Hi, I checked with that..but can not come to the solution..Can you please provide a pice of code for the same...
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Susanta kumar Sahani wrote:
Mohamed Sanaulla wrote:
Susanta kumar Sahani wrote:
I am doing an automation on SOAP UI. I am biginer to groovy, Can you please help me how to read the xml tags in groovy. I want to read the response of my webservices, if the status is "Failure" then I need to print the error description passed in the string.
Please help me on this..


Did you have a look at the XmlSlurper API of Groovy which can be used to read the XML data.


Hi, I checked with that..but can not come to the solution..Can you please provide a pice of code for the same...

The API provides a sample code. At JavaRanch we promote learning and not just feeding with readymade solutions. Please put in some effort to learn the same.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic