Win a copy of The Career Toolkit this week in the Jobs Discussion forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Parsing XML in Groovy

 
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..
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • 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
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic