Contributions
Re: Inline xsi:schemaLocation supported?
The referenced schema is valid, I use it after explicitly including the referred XSD files into the "outer" document schema (prefix omsSvc in my example above). But I'm not sure about the xsi:schemaLocation file-path syntax, so the problem may be here. However, I used ProcessMonitor and WireShark to see whether SoapUI looks for the schema file somewhere, but didn't come across any SoapUI network nor disk communication concerning a file with the schema name. So I think that SoapUI simply ignores this attribute, but I'm not sure.2.2KViews0likes0CommentsRe: Inline xsi:schemaLocation supported?
Our client has such SOAP messages for practical reasons. They are formed as a common wrapper for tens of business body types, and therefore it would be impractical to import XSD schema for every of these XSD schemas into the WSDL schema. They validate the messages with Altova XmlSpy. But SoapUI doesn't seem to be able to recognize the inline use of the xsi:schemaLocation attribute.2.2KViews0likes0CommentsInline xsi:schemaLocation supported?
Is inline xsi:schemaLocation supported by the validator of SOAP requests? I have a SOAP request like this: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> ..... <omsSvc:businessData xmlns:omsSvc="http://service.xxx.cz/oms/service/v01"> <omsSvc:documentData xsi:type="tns:M600Type" xsi:schemaLocation="http://service.xxx.cz/oms/document/M600/v01 http://www.xxx.cz/xxx/M600.xsd" xmlns:tns="http://service.xxx.cz/oms/document/M600/v01" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> ..... </omsSvc:documentData> </omsSvc:businessData> ..... </soapenv:Body> </soapenv:Envelope> When I validate it (Alt-V), I get the following error: Invalid xsi:type qname: 'tns:M600Type' in element businessData@http://service.xxx.cz/oms/service/v01 Does SoapUI SOAP message validator support this xsi:schemaLocation attribute?3KViews0likes7CommentsRe: tc.run() does not function in load tests
I've just try that, the same problem is also in LoadUI. I used the SoapUI Runner with the SoapUI project I had sent you before, and under a sufficiently high load (say 1000 runs/sec) there are the same errors as above in the LoadUI System Log. In my point of view, this is a critical bug that causes the LoadUI with the SoapUI Runner unreliable, and therefore unusable (it's a "show-stopper").11 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.2KViews0likes0CommentsRe: Returning values from TestCase
I've resoved passing of non-string parameters forth and back when calling another TestCase by passing in a map aimed for setting of return values: The caller: //call another TC def tc = testRunner.testCase.testSuite.testCases["TestCase Proc"] assert tc != null, "Referred TC not found" def tcContext = new com.eviware.soapui.support.types.StringToObjectMap() def returns = [:] tcContext.put("input", 345) tcContext.put("returns", returns) def runner = tc.run( tcContext, false ) assert runner.status != com.eviware.soapui.model.testsuite.TestRunner.Status.FAILED : runner.reason context.setProperty("output", returns.get("output",null)) com.eviware.soapui.support.UISupport.showInfoMessage(context.getProperty("output").toString()) The callee: def input = context.getProperty("input"); def returns = context.getProperty("returns"); returns.put("output",input + 1); Unfortunately, this didn't help me with reuse of the TestCases in load tests, as the method tc.run() itself has fundamental thread-safety flaws, see the bug viewtopic.php?f=13&t=21961.2.1KViews0likes0Commentstc.run() does not function in load tests
SoapUI v.4.6.1 x64 (the newest, but the same was in 4.6.0) on Windows 7 x64. I have a simple sample (see attachments) demonstrating that running another TestCase from groovy script via tc.run() behaves strangely in load tests. Strange groovy errors occur even in the simplest situation, and moreover the execution environment becomes unstable (in a sense). I have a TestCase containing this groovy script: def tc = testRunner.testCase.testSuite.testCases["TestCase - Proc"] def runner = tc.run(null, false ) The other TestCase "TestCase - Proc" contains this groovy script: def c = context That's all. 1. When executed from a load test in at least two threads, the following errors occur in the error log in about 3% of Total Runs: Sat Nov 02 18:40:37 CET 2013:ERROR:groovy.lang.MissingPropertyException: No such property: context for class: Script1 groovy.lang.MissingPropertyException: No such property: context for class: Script1 at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231) at Script1.run(Script1.groovy:1) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:149) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:43) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:77) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:640) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:73) at com.eviware.soapui.model.testsuite.TestCase$run.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at com.eviware.soapui.model.testsuite.TestCase$run.call(Unknown Source) at Script1.run(Script1.groovy:4) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:149) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:43) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135) at com.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTestRunner$InternalTestCaseRunner.run(WsdlLoadTestRunner.java:544) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 2. When executing the load test for several times (and making some editations in between, maybe), the error log contains this error instead: Sat Nov 02 18:38:53 CET 2013:ERROR:java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at com.eviware.soapui.impl.wsdl.panels.support.TestRunComponentEnabler.enable(TestRunComponentEnabler.java:80) at com.eviware.soapui.impl.wsdl.panels.support.TestRunComponentEnabler.testCaseFinished(TestRunComponentEnabler.java:107) at com.eviware.soapui.monitor.TestMonitor.notifyTestCaseFinished(TestMonitor.java:154) at com.eviware.soapui.monitor.TestMonitor$InternalTestRunListener.afterRun(TestMonitor.java:294) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyAfterRun(AbstractTestCaseRunner.java:301) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:191) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:43) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:163) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:77) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:640) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:73) at com.eviware.soapui.model.testsuite.TestCase$run.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at com.eviware.soapui.model.testsuite.TestCase$run.call(Unknown Source) at Script1.run(Script1.groovy:4) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:149) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:43) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135) at com.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTestRunner$InternalTestCaseRunner.run(WsdlLoadTestRunner.java:544) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) When running the "TestCase - Proc" from the ordinary Run TestCase step, the errors do not occur. 3. Moreover, after several executions of the load test, I cannot edit the script code of "TestCase - Proc", the groovy script editor is in read-only mode. I have to exit and restart SoapUI after that. The explanation is shown in the SoapUI exit dialog: The TestCase is still considered running ("Exit SoapUI? Projects with running tests will not be saved.") All in all, tc.run() is currently unusable from load tests.11 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.1KViews0likes4CommentsReturning values from TestCase
I'm trying to modularize my test cases, so I'm running a shared test case (as a procedure) that does something useful and returns a result value. As I need to pass-in non-string input properties, I have to run the test case from groovy: def findLoopEndTC = testRunner.testCase.testSuite.testCases["TestCase - Find Loop End"] assert findLoopEndTC != null, "Referred TC not found" def runContext = new com.eviware.soapui.support.types.StringToObjectMap() runContext.put("TestStepContext", context) def runner = findLoopEndTC.run( runContext, false ) assert runner.status != com.eviware.soapui.model.testsuite.TestRunner.Status.FAILED : runner.reason I've learned that the test case is run using the SINGLETON_AND_WAIT mode which ensures that the TestCase itself is run in a thread-safe way. My question is how to return a value from the run test case in a thread-safe way? I tried runner.getRunContext().getProperty("Result") , but it seems that the context properties are no longer there. So there seems to be only the "classical" way, findLoopEndTC.getPropertyValue("Result") , but this seems to be not thread-safe. Are there other possibilities?2.6KViews0likes2CommentsRe: Generated requests & responses miss namespace prefix
I'm sorry, it was my fault, SoapUI works correctly. The XSD didn't contain the attribute @elementFormDefault, that's why the generated request & response elements didn't contain the namespace prefix. After adding this attribute: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema version="1.0" targetNamespace="http://www.example.com/" elementFormDefault="qualified" xmlns:tns="http://www.example.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="getGreeting" type="tns:TgetGreeting"/> <xs:element name="getGreetingResponse" type="tns:TgetGreetingResponse"/> <xs:complexType name="TgetGreeting"> <xs:sequence> <xs:element name="name" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:complexType name="TgetGreetingResponse"> <xs:sequence> <xs:element name="return" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:schema> SoapUI generates correct requests with namespace prefixes.13 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.3KViews0likes0CommentsInvalid requests & responses with rpc-binding
Hello, I have a very basic WSDL that contains both a document-style and a rpc-style binding. The presence of a rpc-style binding causes corruption of the generated request and the generated response from the mock service for the document-style binding! When I comment out the rpc-style binding, the generated request and response for the document-style binding get fixed. The (almost, see viewtopic.php?f=13&t=12000) correct request for document-style binding without any rpc-style binding present: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:exam="http://www.example.com/"> <soapenv:Header/> <soapenv:Body> <exam:EgetGreeting> <!--Optional:--> <name>?</name> </exam:EgetGreeting> </soapenv:Body> </soapenv:Envelope> The incorrectly generated request for the same document-style binding with a rpc-style binding present: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hel="http://www.example.com/HelloWorld.wsdl" xmlns:exam="http://www.example.com/"> <soapenv:Header/> <soapenv:Body> <hel:getGreeting> <exam:EgetGreeting> <!--Optional:--> <name>?</name> </exam:EgetGreeting> </hel:getGreeting> </soapenv:Body> </soapenv:Envelope> (The <hel:getGreeting> element is superfluous.) The sample request and response for the rpc-style binding are generated correctly, though. The XSD looks like this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema version="1.0" targetNamespace="http://www.example.com/" xmlns:tns="http://www.example.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="xgetGreeting" type="tns:TgetGreeting"/> <xs:element name="getGreetingResponse" type="tns:getGreetingResponse"/> <xs:complexType name="TgetGreeting"> <xs:sequence> <xs:element name="name" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:complexType name="getGreetingResponse"> <xs:sequence> <xs:element name="return" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:schema> and the WSDL is like this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.5. --> <definitions targetNamespace="http://www.example.com/HelloWorld.wsdl" name="HelloWorldService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.example.com/HelloWorld.wsdl" xmlns:dns="http://www.example.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <types> <xsd:schema> <xsd:import namespace="http://www.example.com/" schemaLocation="HelloWorldService_schema1.xsd"/> </xsd:schema> </types> <message name="getGreeting"> <part name="parameters" element="dns:xgetGreeting"/> </message> <message name="getGreetingResponse"> <part name="parameters" element="dns:getGreetingResponse"/> </message> <message name="getGreetingRPC"> <part name="parameters" type="dns:TgetGreeting"/> </message> <message name="getGreetingRPCResponse"> <part name="parameters" type="dns:getGreetingResponse"/> </message> <portType name="HelloWorldPortType"> <operation name="getGreeting"> <input message="tns:getGreeting"/> <output message="tns:getGreetingResponse"/> </operation> </portType> <portType name="HelloWorldRPCPortType"> <operation name="getGreeting"> <input message="tns:getGreetingRPC"/> <output message="tns:getGreetingRPCResponse"/> </operation> </portType> <binding name="HelloWorldSoapPortBinding" type="tns:HelloWorldPortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <operation name="getGreeting"> <soap:operation soapAction="http://www.example.com/HelloWorld.wsdl#getGreeting"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <binding name="HelloWorldSoapRPCPortBinding" type="tns:HelloWorldRPCPortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <operation name="getGreeting"> <soap:operation soapAction="http://www.example.com/HelloWorld.wsdl#getGreetingRPC"/> <input> <soap:body use="literal" namespace="http://www.example.com/"/> </input> <output> <soap:body use="literal" namespace="http://www.example.com/"/> </output> </operation> </binding> <service name="HelloWorldService"> <port name="HelloWorldBottomUpSoapPort" binding="tns:HelloWorldSoapPortBinding"> <soap:address location="http://localhost:7001/business/hello/HelloWorldService"/> </port> <port name="HelloWorldTopDownSoapPort" binding="tns:HelloWorldSoapRPCPortBinding"> <soap:address location="http://localhost:7001/business/hello/HelloWorldRPCService"/> </port> </service> </definitions> I use SoapUI 4.0.1, Build dist-134-2011-09-14, Build Date 2011/09/14 13:06.13 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.2KViews0likes0Comments