In soapUI, you need to specify the Outgoing WSS, which specifies which project-level outgoing WS-Security configuration to apply to outgoing requests. The following links should provide sufficient background information: http://www.soapui.org/SOAP-and-WSDL/applying-ws-security.html http://www.soapui.org/SOAP-and-WSDL/authenticating-soap-requests.html ...

In these two lines: testRunner.runTestStepByName("ContractModelOptionStep") def innerResponse = context.expand('${Get ContractModelOptionStep#Response}') the name of the test step does not match! Try: def innerResponse = context.expand('${ContractModelOptionStep#Response}') ...

I try what you do and it works for me if I put single quotes around the property: declare namespace ns1='http://my.namespace.com'; //ns1:Ions[ns1:Ion[text()='${DataSourceInput#ION}']]/ns1:IonType/text() Did you check that testStep name is exactly DataSourceInput? If there are spaces in the TestStep name (i.e your testStep name is Data Source Input you have to...

It may not a direct answer to your question. Let me try to explain what I do when I am in a situation like this. Instead using proxies and redirections, I simply download all the Wsdl and xsd files to the same directory. After that I update all the import...

SoapUI takes some liberties with your XPath. First, note that for reading you can greatly simplify your XPath by dropping the namespaces: ${myRequest#Response#//*:MyOutputWrapper[1]/*:MyVerifyResponse[1]/*:IdMatchIndicators[1]/*:FrstNmMatchInd[1]} Next, for multiple matches SoapUI will always grab the first: ${myRequest#Response#//*:MyOutputWrapper/*:MyVerifyResponse/*:IdMatchIndicators/*:FrstNmMatchInd} Lastly, and this is the important one for your case, if the matched node has a...

If you're only interested in making sure Value="Total" is present and you don't care what value it might have, you could use SimpleValue[contains(@Value, "Total:")], which just checks the attribute name. For example: (: Replace these variables with values extracted from the soapUI response:) declare variable $date := "MM/DD/Year"; declare variable...

If you want to save in a file all request that your Mock service recieve, simply do the follow. In your mock service open the onRequest script tab as in the follow image (this script executes each time that your service receives a request): And add the follow groovy script...

To retrieve just that one specific value, you can use a simple: def val1 = context.expand('${TestStepName#Response#//*:Some_ID}') For more complex parsing, you would have use to either XmlHolder or XmlParser or XmlSlurper. You can get an idea about these do in the official documentation. In your script, try using tstep.getPropertyValue("Response"), with...

According to http://www.regular-expressions.info/xml.html those lookarounds and backreferences are not allowed: "Particularly noteworthy is the complete absence of anchors like the caret and dollar, word boundaries, and lookaround." This means also that I can remove the anchors ^ and $ as well. My solution now consists of multiple restriction patterns with...

You have the brackets misplaced! Let me break it down for you: def yesterday = new Date() - 1 def sdf = new java.text.SimpleDateFormat("yyyy-MM-dd") def yesterdayFormatted = sdf.format(yesterday) If you want it in a SoapUI property one liner: ${=new java.text.SimpleDateFormat("yyyy-MM-dd").format(new Date() - 1)} Note that you can achieve the exact...

You can use simply Xpath subtract operator which is -, so add -3000 to your XPath as follows: ${FPL_RANGES#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/FPL_400_001[1]-3000} Additionally normally in JDBC TestStep the xml result has only one <Results> and one ResultSet node, so you can use (it's equivalent to yours): ${FPL_RANGES#ResponseAsXml#//Results/ResultSet/Row[1]/FPL_400_001[1]-3000} Hope this helps,...

Remember that internally SoapUI keeps everything in XML, and so all properties are just strings. Further, every Groovy Script step get instantiated as a new class, so it cannot "remember" any previous state. You will have to do something like: // read the property as a string def uniqueUserPortion =...

HTTP GET request shouldn't contain payload. While you can do that, insofar as it isn't explicitly precluded by the HTTP specification, I would suggest avoiding it simply because people don't expect things to work that way.

You are incorrectly mixing Groovy and SoapUI syntax! :workerNo is the SoapUI syntax that you could use in a JDBC step. What you have here is a Groovy step, so you need to use Groovy syntax: A.NO = ${workerNo}....

First: I do not understand the round brackets - what is that suppose to be? You would do it the same way: <city cityNumber="${Properties#PropertyName}"> <Request requestType="${Properties#PropertyText}" versionNumber="${Properties#PropertyVersion}"> SoapUI, when it internally goes the through the property expansion phase, it treats everything as String. Only after the message gets transmitted to...

//*:number[1] or //*[local-name() = 'number'][1] selects all number elements in your input document that are are the first child of their parent element: <number>98765</number> ----------------------- <number>1234</number> ----------------------- <number>23455</number> I suspect that your XPath environment only returns the first result node if there are several. To select the other numbers, you...

SoapUI is a great tool which has helped me through out and will keep helping me in future in great ways. I think this is one of the feature which apparently a lot of users don't use and seems to be a bug in SoapUI 5.0.0. I tried the same...

If you take a look on float datatype definition: float is patterned after the IEEE single-precision 32-bit floating point type [IEEE 754-1985]. The basic ·value space· of float consists of the values m × 2^e, where m is an integer whose absolute value is less than 2^24, and e is...

The problem is not the duplicated namespace declaration. The problem is in this bit: <SOAP-ENV:faultcode>SOAP-ENV:Server</SOAP-ENV:faultcode> <SOAP-ENV:faultstring>Invalid action parameters</SOAP-ENV:faultstring> On the SOAP Specification, the faultcode and faultstring elements are in the empty, default namespace, not in the "http://schemas.xmlsoap.org/soap/envelope/" namespace. So it really should've looked something like this: <SOAP-ENV:Fault> <faultcode>SOAP-ENV:MustUnderstand</faultcode>...

To prevent the property expansion from replacing ${MY_VALUE} you can add an extra $ like this: { "myNode":{ "myOtherNode":"$${MY_VALUE}" } } Doing that your original json will be sent like this: { "myNode":{ "myOtherNode":"${MY_VALUE}" } } ...

We were able to address this for our app by doing the following in the soap request. In our case, the 'value' element has more than one type: <value xsi:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">foo</value> This may require the server code to be able to handle this. In our case, our app is a...

You can try with XQuery. In the property transfer step select Use XQuery checkbox as you see in the image below. And use this code: declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/'; declare namespace ns1='http://ws.example.com/roma/201907'; <ns1:offer> { for $id in //*[local-name()='hpKeycode'] return string($id) } </ns1:offer> EDIT: If you want to avoid the use of...

If you've problems using transfer properties step to get the JSON value from your response, you can use a groovy test step to achieve your goal. So create a groovy test step to parse your response, get your value and set it as a property (for example at testCase level)...

SoapUI will not be able to do what you want out of the box. All assertions you specify have (equivalent of) boolean AND: they all have to pass, to pass the step. I can see two options to solve your dilemma. Restructure your test case(s), so that you can check...

You could also use an XQuery assertion on the test step like this: for $customer in //*:customer where ($customer/id = '222') return ($customer/name, $customer/phone) This produces output like: <name>customer2</name> <phone>555-5555</phone> Then, in the assertion expected results panel you could substitute the expected values: <name>${customerName}</name> <phone>${custmerPhone}</phone> ...

After a little search with the OP seems that we found the answer. This checks adds a specific <wsse:BinarySecurityToken> in the <wsse:Security> headers, specifying a certificate (in SOAPUI specific case specifying the certificate used to perform the signature). From the oasis spec we can see the definition of this element:...

I'm not sure if this is what you're trying to achieve, however If you have a SOAP Test step called Test Request and you want to use the value of the <soapenv:Header><web:token></soapenv:Header> of this request in another SOAP Test step you can refer this value in the second SOAP Test...

After a lot of code crunching I finally found the solution to my problem. The trick is to understand that WsdlTestRequestStep.addAssertion requires the label of the Assertion as an argument which is compared with the label that was set in the corresponding Assertion factory. So in my example the easiest...

To print all assertions from all the testSteps inside a testCase you can use the follow groovy script in a tearDown script of your testCase, it use the getAssertionList() which returns a TestAssertion list, and then iterates over it using label and status property: testRunner.testCase.testSteps.each{ name,props -> log.info "Test step...

You need to create an ext folder inside you maven project's root, i.e. where your pom.xml is. The put your compiled jar in this folder (as you've already done in your <SoapUI_installation_dir>\bin\ext directory) in order this jar to be available to the SoapUI runner when it is run via maven.

To count all the occurrences of <Person> inside <Customers> you can use count xpath function as follows: def numPersons = context.expand('${GetProductPriceOffer#Request#count(//*:Customers/*:Person)}') Another possibility is to use XmlSlurper instead of using xpath, with it you can count the occurrences of <Person>, but if you need to do more operations you can...

This problem was due to Server Name Indication. We had multiple SSL certs for different FQDN-s running on same IP:port, so server is forced to use SNI, which is apparently supported from java 7. One more thing I didn't know is that SOAP UI has jre packed with it in...

I don't think you can have multiple body parameters (or if you can, it's certainly not a good practice!). Check to see if the ContextName parameter is a different type of parameter such as a query or path parameter (called template parameter in SoapUI). Here is some info about different...

The ^ character is not allowed in URL, probably SOAPUI is encoding the URL for you. I think the case representation is importat for URL escape characters try with uppercase %5E instead of lowercase %5e. EDIT: I just make a try configuring a TCP monitor on my localhost and making...

If you want to manipulate the JSON response to use in other TestStep it's easier to use groovy TestStep instead of Transfer testStep. So create a groovy TestStep and manipulate the response using the following code: import groovy.json.JsonSlurper import groovy.json.JsonOutput // get the response using the name of your test...

You have to change your class definition in the last groovy script, instead of main define a method to send the email which has statusCode as parameter in your sendMailTLS class. Then in the same groovy script where you define your class use def statusCode = context.expand('${#TestCase#httpStatusCode}'); to get your...

As you marked, since you are using SoapUI 5.0 you could perfectly use the steps detailed on the site you provided, it applies to WSDL imports. If you want to try a workaround used in the times when SoapUI doesn't supportes NLTM, check this question....

SoapUI currently has a known issue ("defect"?) in that it will not allow you to supply same named parameter multiple times, such as ids=111&ids=222 in your example. In their jira tracking system, it is SOAPUI-4646. The workaround is ... not pretty. In your endpoint, where the methods is defined, select...

What you are doing is extremely awkward! You should consider using String.format() to format your date straight up: def propertiesStep = testRunner.testCase.getTestStepByName("Properties") propertiesStep.setPropertyValue('DateTime', String.format("%tFT%tT", new Date(), new Date())) ...

If you run SOAPUI projects using testrunner.bat you've to note that you run the projects individually so you can't access to testRunner.testCase.testSuite.project.workspace property. Looking at testrunner.bat properties on documentation doesn't seems that there is no parameter that fits your requirements. Maybe I'm wrong and there is something for this case...

Instead of using context if you want to share properties through different testCases in the same testSuite try to set the properties on the testSuite level which will be shared for all testCases in this testSuite. For example if you have a testSuite with two testCases: testCase 1 and testCase...

Since version 3 soapUI allows us to use Javascript instead of Groovy. In the Project properties section there is a script language option, check if that option has javascript as the selected value of groovy. Also see http://www.soapui.org/scripting---properties/scripting-and-the-script-library.html for details specifically section 4. *Image source is the soapUI link mentioned...

Need to assert so that test fails or passes automatically based on the condition. def httpResponseHeader = messageExchange.responseHeaders def contentType = httpResponseHeader["Content-Type"] log.info("Content-Type: " + contentType) assert contentType.get(0) == "image/jpeg","Content Type is not an image" EDIT: Earlier paid attention to how to throw error, assuming you have the rest in...

I am not seeing null object error now. The issue was that testRunner is not available in script assertion so we need to create it like this in script assertion and then pass it in the caller method. import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner import com.eviware.soapui.support.types.StringToObjectMap import com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext testCase = messageExchange.modelItem.testStep.testCase tcRunner = new...

To get this value in the groovy script and then save it in a TestCase property you can use the follow code: def idSession = context.expand('${test#Response#//ns1:authentification/bloc1/bloc2/idSession}') testRunner.testCase.setPropertyValue("propName",idSession) Hope this helps,...

By default, browsers cannot make POST requests via AJAX to URLs which are not in the same origin as the current page. For example, if you have open a page that sits in the URL http://foo.com, and that page tries to post some data (via AJAX) to http://bar.com, you will...

At the bottom of your SoapUI window, you should find an "http log". This will allow you to view EXACTLY what SoapUI is sending the your Web Service. Typically you will not include your username or password within the XML itself, but in the http headers that come before your...

So first your problem: Remember that internally to SoapUI almost everything is a string. Doing something like: <postCode>${SpreadsheetInput#PostCode}</postCode> in your SOAP request, assuming PostCode is either blank or does not exist outright, will expand to: <postCode></postCode> and SoapUI will even optimize it to: </postCode> Then your validation kicks in, which...

I'd look to load the data list into memory once to avoid repeated IO, and then pick the random item from the list within the test step that requires it using a Groovy expression. You can use a context variable to hold the data in memory. The following Groovy script...

Case 1 : You are posting form-data instead you should be posting SOAP/XML. Case 2: You are missing SOAP Action header. Case 3 : Request seems ok but you might not have configured WebHttp endpoint. Case 4 : Service URL dont need GetData in it. In order to make...

Your question is not clear for me, the only thing that I see wrong in your code is that you are missing testCase to access testSuite properties from testRunner, to do so you must use testRunner.testCase.testSuite.name instead of testRunner.testSuite.name. If you are looking for a way to save all testSuite...

In windows 7 by default preferences are stored in $USER_HOME/default-soapui-workspace.xml and $USER_HOME/soapui-settings.xml. default-soapui-workspace.xml is for the workspace (project names, where are stored, if they are closed...), looking here you can see also the xml path where your project data is stored (testCases,testSteps,request contents, assertions and so on). <con:soapui-workspace name="Projects" soapui-version="5.0.0"...

You have two options. One (if I make this numeric, SO screws up the formatting?): Run your TestCase3 first, and set the property at Project level. testRunner.testCase.testSuite.project.setPropertyValue("TransID", '(int)Math.random()*1000000000'.toString()) If this is the only thing that this test case does, then you can even put the above code in the test...

Thanks again for your help @albciff, I had to add this into a multidimensional array (I renamed field to column and result is a large return from the Xquery above) def resXml = new XmlSlurper().parseText(result) //get the columns and points ranges def Column = resXml.DBRange.db*.text() def Points = resXml.DBRange.points*.text() //sorting...

Hello select_the_choice, I really don't see the question but since I've struggled enough time to integrate a magento platform into a rails app, I will try to help you. First of all I suggest you to use REST if you can. Is going to be much faster and even if...

You are using namespaces in your script, without defining what those namespaces are. For just reading values it is generally easier to use wildcards and not worry about them. def groovyUtils=new com.eviware.soapui.support.GroovyUtils(context) def holder = groovyUtils.getXmlHolder("Step1-Login#Response") log.info holder.getNodeValue("//*:opSessionID") Or even something simpler like: log.info context.expand('${Step1-Login#Response#//*:opSessionID}') ...

You can use an XmlHolder and then apply XPath to get the node value, see the code below: //create folder and file createFolder = new File("C:/SOAPUI") createFolder.mkdir() file = new File("C:/SOAPUI/test.txt") file.createNewFile() a = testRunner.testCase.getTestStepByName("Property Transfer") responsedata = a.getProperty('transfer') // create an XmlHolder def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )...

I modify your code to zip all the files in your pdfSubFolderPath: import groovy.xml.NamespaceBuilder import org.apache.tools.antBuilder.* import java.util.zip.ZipOutputStream import java.util.zip.ZipEntry import java.nio.channels.FileChannel //This script deletes the pdf sub folder created by 'CreateFolderForPDFs' if no pdfs are generated as part of test // i.e test does not produce valid shipments. def...

Looks like it is not possible to do this using XPath alone. As XPath to the tag inside CDATA explain that the CDATA section is not parsed and it not possible to use an XPath expression to test if an element exists within the CDATA section...

Since the actual expression node does not exist (//.../Product[1]/ProductCategory[1]/text()), but the expected expression (${JDBC Request Product#ResponseAsXML#//Results[1]/Row[1]/ProdCat[1]}) returns an empty string (since we have <ProdCat/>, we have to make sure that both expressions calculate to the same value: concat(//.../Product[1]/ProductCategory[1]/text(), '') ${JDBC Request Product#ResponseAsXML#concat(//Results[1]/Row[1]/ProdCat[1], '')} By doing this, whether the data element...

I did more or less the same few years ago. My experience is as follows (your mileage might vary): you need to understand XSD well when you look at few WSDL examples you will figure out that WSDL is XSD + little overhead, which is almost always the same it...

I think researching property expansion will help you. http://www.soapui.org/Scripting-Properties/property-expansion.html To get you going... You can easily reference property values using these dynamic references: Put a reference like ${#TestSuite#colour_red} as the property value of "info". Now the info property value is dynamicaly set to whatever the TestSuite's colour_red property value is....

Use getPath() method to get the XQuery Expression on your assertion. Take into account that this method is specific for assertions of XQueryContainsAssertion class, so if you invoke in other assertion object you'll get a groovy.lang.MissingMethodException. Also think about that with your code you're casting each testStep in your testCase...

If you want to get the response from com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep, a possible way is first get the testStep from this class using getTestStep() method. This method returns a object of class com.eviware.soapui.model.testsuite.TestStep, from this object you can get the testSteps properties like request, response, endpoint... using getPropertyValue(java.lang.string) method. So in your...

I think the better approach you can use is get the assertion status of the testSteps, and then check if the status is FAILED, UNKNOWN or VALID. You can use the follow groovy code to do so: import com.eviware.soapui.model.testsuite.Assertable.AssertionStatus def TestCase = testRunner.getTestCase() def StepList = TestCase.getTestStepList() StepList.each{ // check...

Your code is working as expected! In, what you are calling, the "formatted case" the value of the node GetCustomerInfo is a newline character and some whitespace, and so it is not null. In your "unformatted case", the value of the node GetCustomerInfo is nothing, and so it is null....

The expression ${=!0} is not working as you expect. In SOAPUI this kind of expressions ${=expression} are executed as groovy script so really SOAPUI is executing !0 which is result is true and this is the expected result. This is why SOAPUI throws replace..., expecting [true]. I think that it's...

The proble is that JMS jar isn't present on maven central repo : http://mvnrepository.com/artifact/javax.jms/jms/1.1 try to download it you will get a 404. Thanks to this answer : java.net maven repo - JMS artifact missing I found it here : https://repository.jboss.org/nexus/content/groups/public/javax/jms/jms/1.1/ thanks JBoss....

As was mentioned, your XML sample is broken. But there is enough there that you should be able to use something like the following XPath: //*:status[text()='INPROGRESS']/preceding-sibling::*:executionId/text() This uses "axis" to first find the status node with your text, and then its sibling executionId node. Alternatively, something like this should work...

You can run Groovy code within SoapUI using SoapUI Groovy Console plugin. This way, you can change any property you want programmatically (within API constraints of course). As for technical details on how to solve your actual problem, I can only refer you to this blog post and SoapUI's javadoc....

You're almost there :), try this way (use HttpRequestStepFactory.createNewTestStep instead of HttpRequestStepFactory.createConfig): import com.eviware.soapui.impl.wsdl.teststeps.registry.WsdlTestRequestStepFactory import com.eviware.soapui.impl.wsdl.teststeps.registry.HttpRequestStepFactory import groovy.io.FileType // get the current testCase to add testSteps later def tc = testRunner.testCase // get the testStep as template to create the other requests def tsTemplate = tc.getTestStepByName("Template") // create the factory...