Contributions
Re: Setting the value of XML attributes using Groovy Step
I managed to get it working this way: def request = testRunner.testCase.getTestStepByName("XML Store"); def prop = request.getProperty("property"); def rootNode = new groovy.util.XmlParser(false,false).parseText(prop.value); rootNode.element[0].@id = "700"4.9KViews0likes0CommentsSetting the value of XML attributes using Groovy Step
Hello, I have a Groovy test step in my test case where I need to set the attribute value of an XML node, this is what I am doing but it is not working: INPUT XML: Script: ... holder.setNodeValue( "/Envelope/element@id", "700") Expected XML: The XML is coming from a property that is populated from the result of a previous service call. Any help and or tips are greatly appreciated! thanks, Jan5.7KViews0likes1CommentSchema Compliance and WADL - Nullpointer
I created a test case for my rest service using a WADL descriptor file. I also added a 'schema compliance' step to validate the response. This compliance check is giving me a nullpointer: java.lang.NullPointerException at com.eviware.soapui.impl.wadl.WadlDefinitionContext.createDefinitionLoader(WadlDefinitionContext.java:52) at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.getDefinitionLoader(AbstractDefinitionContext.java:198) at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:218) at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46) at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:140) at java.lang.Thread.run(Unknown Source) What could be the cause of this error? I am using SoapUI 3.5.1 (same error is also occuring on older versions). I reference a schema using local path notation (ex: c:\schemas\abc.xsd) thanks, Jan4KViews0likes5CommentsRe: An error occured [com.eviware.soapui.impl.wsdl.support.xsd.SchemaException]
I was able to find a workaround/solution. This error was caused by using a wrong wadl name space. I was using: xmlns:wadl="http://wadl.dev.java.net/2009/02" => which did not work and generated the errors But if I use: xmlns:wadl="http://research.sun.com/wadl/2006/10" => it works I was using the newer reference to be in sync with the latest WADL specifications. Is this my mistake or is SoapUI just not compatible with the latest specs? Thanks.4.1KViews0likes0Comments