Contributions
- 1.4KViews0likes0Comments
Re: How to parse XML contains escaped xml?
Maybe I do something wrong in total. Here is my response: HTTP/1.1 200 OK Cache-Control: no-cache="set-cookie" Date: Thu, 05 Mar 2009 14:04:20 GMT Transfer-Encoding: chunked Content-Type: text/xml Set-Cookie: JSESSIONID=yTQJJvDXRByBQHhHfZm4FykKY0N9h34j5hSJ85G7sN2NnVz26spg!-342531176; path=/ X-Powered-By: Servlet/2.5 JSP/2.1 <?xml version="1.0"?><MessageResponse><Entity name="ORG_STRATEGY"><Property name="strategy_num" value="1050" type="INTEGER"/></Entity></MessageResponse> My Groovy Script def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def holder = groovyUtils.getXmlHolder( "GetNextNum#Response" ) def answer = holder.getNodeValue( "//return" ) log.info( answer) answer=answer.replace("<","<") answer=answer.replace(">",">") log.info (answer) def holder2 = groovyUtils.getXmlHolder(answer) def answer2 = holder2.getNodeValue( "//MessageResponse"); log.info(answer2) def node = new groovy.util.XmlParser(false,false).parseText(answer); def textNodes = node["//MessageResponse"] log.info(textNodes) My Loginfo Thu Mar 05 15:05:07 CET 2009:INFO: Thu Mar 05 15:05:07 CET 2009:INFO: Thu Mar 05 15:05:07 CET 2009:INFO:null Thu Mar 05 15:05:07 CET 2009:INFO:[] Why Null???? What is wrong in my thinking?1.4KViews0likes0CommentsHow to parse XML contains escaped xml?
Hi, I have a little problem. I receive a Soap Response not like the standard is. It looks like: SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"> <?xml version="1.0"?><MessageResponse><Entity name="ORG_STRATEGY"><Property name="strategy_num" value="1048" type="INTEGER"/></Entity></MessageResponse> As u see, there is one field called "return" and this includes escaped xml. How can I access this? If I do: def answer = holder.getNodeValue( "//return" ) I get the return string including this escaped String. I cannot access the elements in this string, because of the "<" ">" Any Idea how to parse those responses? An idea could be to do a search replace on the answer and give this back to the parser. But how would this work? Thanks in advance Sascha3KViews0likes5CommentsRe: Saving Preferences make Soapui not working
Hi Ole, the Build is: Build dist-104-2009-02-01, Build Date 2009/02/01 21:22 Java: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17-b04) It will workagain after deleting the preference file from my home dir: soapiu-settings.xml If I just click on save preferences, nothing happen If I chaneg auto save and save preference, everything is okay until I restart. Then I will have to delete the file and restart again. omatzura wrote: Hi Sascha, strange indeed! Does it work again after restarting soapUI ? Are you saving in a composite project or normal? Is this the latest release? regards! /Ole eviware.com1.9KViews0likes0CommentsSaving Preferences make Soapui not working
Hello, I have a very strange behaviour with SoapUI and its preferences. It took me a while to find out the reason. When I run a test suite sending SoapMessages everything went fine. Now I go to the Preferences/UI and wish the porject to be saved every 1 Minute. I save preferences. If I start the test suite again, it fail. I always get an answer "bad request" from the server. Any Idea? Any thing needed from me? Sascha4.1KViews0likes7Comments- 990Views0likes0Comments
Compare full SoapResponse
Hello everybody, I start to like SoapUI day by day more. But I have a question left: I need to test one webservice where I sent a predefined soap message to. I want to compare the response with a saved soap message. So I want to compare the whole XML response. Is there a way to do this? I should retrieve everytime the same answer and do not want to comapre by attribute. Using: SoapUI 2.5.1 non-pro Thank you2.1KViews0likes4Comments