FAQ Database Discussion Community


Importing WSDL to soapUI from HTTP server using Integrated Windows Authentication

soapui,ntlm,spnego,iwa
I am trying to import a WSDL (referencing a number of XSDs) to soapUI 5.0.0 (Build Date: 20140409-1012) from an intranet HTTP server requiring Integrated Windows Authentication (IWA, also referred to as NTLM and SPNEGO). Using web browsers and other windows applications (such as Altova XMLSpy) it works opening the...

Method name in soap message request

java,web-services,soap,wsdl,soapui
I have an interesting problem, I'm using SOAP UI to parse the WSDL. The WSDL from payPal https://developer.paypal.com/docs/classic/api/PayPalSOAPAPIArchitecture/ When I try to load it in SOAP UI, all the method names are getting created that's fine, but when I look into the Messages, The method name in tree view is...

Soapui property transfer to request header

web-services,xpath,soapui
I want to set the value of token in this soap ws header <soapenv:Enveloppe ... <soapenv:Header> <web:token>123456 </web:token> FROM step named test get idSession in response <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns1:authentification xmlns:ns1="http://ws.demowebservices.com/"> <bloc1> <bloc2> <idSession>e1c64cd9-b933-4f56-ae1f-0f7d7f23942b</idSession> </bloc2> I tried to put in-between web:token tag...

SoapUI integration with bamboo

continuous-integration,soapui,bamboo
can anyone share a link/info - how to integrate SoapUI test-suites with Bamboo? I'm interested both in local and "from SVN" integration. And I need to know - must I install SoapUI somewhere else for integration with CI, or not? (jobs on CI should work independently) Google gave me some...

SoapUi Assertions - Use a string as a json path with groovy

json,string,groovy,soapui,assertions
I am using groovy to automate some tests on SoapUI, and I wanted to also automate assertions in a way I would get a field's name and value from a *.txt file and check if the wanted field does exist with the wanted value in the SOapUI response. Suppose I...

soapUI getPropertyNames returns nothing

web-services,groovy,soapui
I have created properties at project, testsuite and test case level. At test case level, I created a groovy script with String[] props = context.getPropertyNames() for (prop in props) { log.info prop } It executes but output in log window is weird : INFO:RunCount INFO:log INFO:Thread Index Why I can't...

Eclipse Plugin for SoapUI for IDE Link is not working

eclipse,plugins,soapui
http://www.soapui.org/eclipse/update/site.xml This link is not working for adding soap plugin in eclipse. Error message comes like this -- The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. please help... Thanks in advance.....

SoapUI, is there a way to copy and paste test steps?

soapui
I am working on a test suite, which involves number of test cases having common test steps (Not in the same order, so data driven or running on a loop is not an option here). In writing these tests the only option I can see of is to clone the...

How to have a SoapUI test successfull if SOAFault has a particular message?

web-services,wsdl,soapui
I have a SoapUI test that performs a WSDL call. This WSDL call is considered a success if either response is a valid SOAPResponse response is a SOAPFault with a specific faultstring How can I write a SoapUI test that will be successfull in both cases (and obviously only those...

Parsing Soap response - XML/XPATH (In soapUI)

xml,soap,xpath,soapui
If I've a Soap response like below <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns0:SomeResponse xmlns:ns0="urn:ABC:EFG:HIJ:Some_WS"> <ns0:ID>6384</ns0: ID> <ns0:Some_ID>10530</ns0: Some_ID > <ns0:Status>SomeStatus</ns0:Status> <ns0:Number>INT1037;INT1027;</ns0: Number> </ns0:SomeResponse >...

Soap UI - where are the preferences/settings stored in Windows

soap,soapui,soap-client
I have Soap UI v5 which the trial has run out and I need to export the preferences, does anyone know where these are stored in Windows? Is it the registry or in a particular folder so I can easily import the same settings on another machine. I'll also need...

How to fail a script assertion in SoapUI?

soapui,assertions
I'm trying to let a script assertion fail, when a variable has another value than defined. My goal: Mark the TestStep as red, if the TestStep will fail. Please note that I am using a script assertion for a TestStep - not a separate Groovy-Script TestStep. My script looks like...

how send multiple request in soap ui using groovy

xml,groovy,soapui
I have to run xml request in soap ui with variable.as I understand it is possible with using groovy script. My variable ($variable) should be like: for (i = 0; i < 5; i++) { createResult(34620000+i) } Request looks like: SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="urn:xmethods-delayed-quotes"> <SOAP-ENV:Body> <wq:test> <Date...

Include jar to SoapUI maven

maven,jar,maven-plugin,soapui
I wrote my own library to maven. I include the jar file like this: http://www.soapui.org/extension-plugins/old-style-extensions/developing-old-style-extensions.html and everything is OK. But, i wanna run my SoapUI projekt in maven. How i can include this library?...

Subtract days or years from new java.text.SimpleDateFormat

groovy,soapui
Application: SoapUI XML Resquest I could swear this worked at one time where I use the below: ${=(new java.text.SimpleDateFormat("yyyy-MM-dd")).format( new Date() )} To Subtract or Add I would add enclose the -# or +# like so: ${=${=(new java.text.SimpleDateFormat("yyyy-MM-dd")).format( new Date() )}-1 The result of the -1 is showing up as...

XMLHolder in groovy unable to Retrieve value

groovy,soapui
I have the following xml: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <Login_v1Response> <result xsi:nil="true"/> <opSessionID>FjqkjEjipbhkdiin</opSessionID> </Login_v1Response> </SOAP-ENV:Body> </SOAP-ENV:Envelope> I have the following code in groovy which returns me null: def groovyUtils=new...

How to set Project property value using Groovy?

groovy,soapui
I want to set property in Project level, with my groovy code I can set a property in TestCase level. How can do the same to set property in Project level Here is my code: import groovy.json.JsonSlurper responseContent = testRunner.testCase.getTestStepByName("TestStepName").getPropertyValue("response") slurperresponse = new JsonSlurper().parseText(responseContent) slurperresponse.id.toString() log.info (slurperresponse.id.toString()) property_name = 'a'...

How can I POST JSON values without property expansion in soapUI?

json,post,properties,parameters,soapui
In soapUI, I am trying to perform an HTTP POST with the following JSON: { "myNode":{ "myOtherNode":"${MY_VALUE}" } } The POST operation is successful, but in the response the value for myOtherNode is blank. I'm guessing this is because soapUI is treating it as parameter and trying to replace it....

Testing WCFService1 with Postmen or SoapUI gives 400 Bad Request

.net,wcf,visual-studio-2013,soapui,postman
When I make a brand new WCF Service Application named "WcfService1" in Visual Studio 2013 and immediatelly run it, the requests done by WCF Test Client are working flawless. Not a surprise. When I try to test this same initial application in REST/SOAP clients like Postman or SoapUI, I get...

What property does soapui property window refer to? Is it the http request properties?

xml,web-services,soap,web,soapui
I'm trying to do a web service testing using SOAPUI. When I try to add the username and properties in the SOAPUI property window, I am getting the response. However, when i try to add the same username and password in the SOAP header in my request xml using tag,...

SOAP-request No 'Access-Control-Allow-Origin' header soapUI header

javascript,ajax,soap,soapui
Im trying to accomplish SOAP-post to get back XML data. Problem is that "No 'Access-Control-Allow-Origin' header" and I suppose that the server needs to add the header. So I created a MockService in SOAPui and copied the server response. But I still get the same problem. In soapUI in the...

How to get testStep responseAsXml in groovyScript

groovy,soapui
Concerning soapUI and groovy, I'm trying to get assertion (working) and response both in XML into a variable. I get the error groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.getResponseAsXml() is applicable for argument types: () values: [] error at line: 6 I have tried adding import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep but still cant figure...

Can I use grape on soapUI?

groovy,soapui
I really don't know If I can or not since I've been researching on the internet and I haven't seen anything about this topic. If I try to use the following on soapui (groovy script) @Grapes([ @Grab(group='net.sf.json-lib', module='json-lib', version='2.3', classifier='jdk15'), @Grab('xom:xom:1.2.5') ]) import net.sf.json.JSONObject import net.sf.json.xml.XMLSerializer I'm getting an error...

How to extract data from SOAP-request in SOAP UI

groovy,soapui,xmlslurper
I'm creating mock SOAP-response which should return data contained in SOAP-request. Please, find a request sample: SOAP-Request: <v01:GetAncillaryOffersRQ version="1.0"> ... <v01:PNRLocator itineraryRef="itinerary_1">AAAAAA</v01:PNRLocator> ... </v01:GetAncillaryOffersRQ> Please, find mock-response which should be returned: Mock Response: <soapenv:Header></soapenv:Header> <soapenv:Body> <v01:GetAncillaryOffersRS version="?"> <v021:ApplicationResults status="?"> <v021:Error...

Running parallel projects in SoapUI

soapui
I wrote a groovy script for running parallel projects in SoapUI and placed it in a test step in a project named 'Project1'. I am able to run the projects parallely but when i use a batch file for the purpose of scheduling the execution, it fails. It says "Cannot...

comparing operands xpath assertion expression with expected result in soapUI

xpath,soapui
I'm using soapUI 5 (non pro) and all i need is to validate(assert) a number is greater than zero in the expected result section. So this means 1) in XPath expression(Xpath match) I am declaring the below (I need to remove all text and only have numbers then check that...

How to get xquery assertion value using groovy script

groovy,soapui
I have created a teststep in SOAPUI tool with two assertions namely Valid HTTP Status codes Assertion and XQuery Match Assertion Now I need to print the values contained in these assertions using groovyscript. For XQuery Assertion, I need to print the xquery expression . I tried using getToken() method....

How to Test for None Existing Data Elements in SoapUI's Response Against JDBC Request's

xml,xpath,jdbc,soapui
If a user wants to do data validation against a result set returned by JDBC step in SoapUI, but the Soap Response does not contain a corresponding data element, SoapUI provides no default way of creating an assertion for such element in Soap Response, i.e. assuming the JDBC step returns...

SoapUI Property Transfer: How to extract items from XML using xpath?

xml,rest,xpath,soapui
I'm running SoapUI on my machine to check some RESTful webservices. The server gives me the following structure <Response xmlns="http://localhost/filter"> <data> <e> <ticket> <reason>Bla bla bla</reason> <number>98765</number> </ticket> <number>1234</number> <content>Some stuff here</content> </e> <e> <number>23455</number> <content>Some stuff here 2</content> </e> </data> </Response> I want to run some...

redefine xsd element throws “not well formed” error

soap,xsd,wsdl,soapui,w3c
I am trying to use the element redefine in my xsd. I have tried different combinations but still don't seem to get this error resolved. The error shows up when i try to load the WSDL including the redefined schema into SOAP UI. Also, it doesnt show up in the...

SoapUI correlation (property transfer)

properties,soapui,correlation
I have a REST request that respond with the following: { "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlQwWE8xNnAtMmZzMWxremV5", "expires_in": 2592000, "token_type": "Bearer" } I want to take the value of access_token, store it in a property and reuse it for two subsequent requests. Following some tutorial here, when running the request that obtains the access_token...

Is it possible to reduce the groovy code for enabling and disabling testcase?

groovy,soapui
can someone hlep me to reduce the following code where i'm disabling and then enabling TestCases in soapui. def totalTestCases2 = testSuite2.getTestCaseCount(); for(n in (0..totalTestCases2-1)) { if (testSuite2.getTestCaseAt(n).getTestStepByName("Report1")) { testSuite2.getTestCaseAt(n).getTestStepByName("Report1").setDisabled(false) } if (testSuite2.getTestCaseAt(n).getTestStepByName("Groovy_Check")) { testSuite2.getTestCaseAt(n).getTestStepByName("Groovy_Check").setDisabled(false) } } Thank you...

list of test step results in groovy script

groovy,automated-tests,soapui
I'm trying to figure out a way to get a list of (names) of just the failed test steps, currently the below code is giving me all the names def TestCase = testRunner.getTestCase() def StepList = TestCase.getTestStepList() StepList.each { log.info (it.name) } Now I'm not sure how to move on...

null object error when calling code from script assertion - soapui

groovy,soapui
In a soapui groovy script test step I've this. context.setProperty("searchChange", new searchChange()); class searchChange{ def testRunner def searchChange(testRunner){ this.testRunner=testRunner } def search(a,b){ def search_TestCase = testRunner.testCase.testSuite.getTestCaseByName("Search") search_TestCase.setPropertyValue("Search_cID", a) search_TestCase.setPropertyValue("Search_sID", b) search_TestCase.run(new com.eviware.soapui.support.types.StringToObjectMap(), false) } } and in an assertion script in a different test suite I am...

How to specify data type in Soapui request

soapui
I have the following section in my SOAPUI request that I'm trying to pass to a web service for testing: <DataList> <!--Zero or more repetitions:--> <Element/> </DataList> The list of elements can be of 2 different types specified in the WSDL definition, my question is how do I specify the...

soapui jdbc: java.sql.SQLException: Data type mismatch. (2015-02-04)

sql,jdbc,groovy,soapui
I need to use sql query to DB from soap every day automatically. Query to DB has current date. So, I do following: 1) I set current date to properties with groovy: def dateTime= new Date() setProperty.setPropertyValue('currDate', String.format("%tF", dateTime, new Date())) 2) in jdbc request I make corresponding property, and...

SOAP-UI: How to get CDATA XPath for an assertion?

xml,xpath,groovy,soapui,assertions
I have a SOAP UI project that has the following web service response: <env:Envelope env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <env:Header/> <env:Body> <m:invokeResponse xmlns:m="some namespace"> <result xsi:type="xsd:string"><![CDATA[<?xml version="1.0" encoding="US-ASCII"...

Save SOAP UI mock requests to a file

web-services,soap,request,soapui
I m using Soap UI basic version for some mocking. I need to persist my requests to some file. I just have generated mock services with some predefined input to output rules, and i searched on net and found this: def logArea = com.eviware.soapui.SoapUI.logMonitor.getLogArea( "http log" ); def groovyUtils =...

Fault: X509Token: An incorrect X.509 Token Type is detected

soap,cxf,soapui,x509,ws-security
I am trying to apply a WS Security Policy on my web services. The requirement is to sign the body and timestamp element (no encryption) with X.509 certificate. I am using SoapUI to sign and send soap messages. I implemented web services using cxf wsdl first approach. I am getting...

PHP curl Soap Request Error

php,curl,soap,soapui
I have encountered interesting event. I send soap request by using curl , but I get error in response as following. But When I try same request on SoapUI , I get successful response , so I can't understand why I get error on php curl. The error: soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">...

SoapUI with Groovy Script reading values

groovy,soapui
SoapUI with Groovy I am using SoapUI pro and groovy script. I am reading the customers record from request into the following, def CustRec = context.expand('${GetProductPriceOffer#Request#/tem:request[1]/quot:Customers[1]}' ) the value in CustRec is, <quot:Customers> <quot:Person> <quot:CustomerType>PRIMARY</quot:CustomerType> <quot:Sequence>0</quot:Sequence> </quot:Person> <quot:Person> <quot:CustomerType>ADULT</quot:CustomerType>...

Is there a way to convert Json file to XML by using groovy script on soapUI?

xml,json,groovy,soapui
I need to convert Json file format into XML format, I've seen a lot of webpages that use this even in java I can see there are a lot of people who are capable of doing it but I can't find a way on groovy. I have a file like...

Xquery Assertion for SoapUI multiple modes

xml,automation,xquery,soapui
I'm trying to create an assertion for a Response that needs to looks like this: <Names> <NameList PropertyName="Record"> <Names> <SimpleValue Value="Date :xx"/> <SimpleValue Value="Name :xx"/> </Names> </NameList> <NameList PropertyName="Record"> <Names> <SimpleValue Value="Date :xx"/> <SimpleValue Value="Name :xx"/> </Names> </NameList> </Names> The assertion should be an exact match. I have come up...

Wilcards not working for XQuery assertions in SoapUI

xpath,groovy,xquery,soapui,assertions
This is the response for one of my test steps: <Names> <NameList PropertyName="Record"> <Names> <SimpleValue Value=" Date: MM/DD/Year "/> <SimpleValue Value="Name: John "/> <SimpleValue Value="Amount: 1234"/> <SimpleValue Value="Change: 2.0 "/> <SimpleValue Value="Total: 0.0 "/> </Names> </NameList> </Names> I'm expecting the exact match in my Xquery assertion except the value where...

Context missing from called test case

groovy,soapui
In SoapUI I’m running a test case from a groovy script with this code: def contextMap = new StringToObjectMap(context) def myTestCase_1 = myTestSuite.getTestCaseByName("TestcaseName") myTestCase_1.run(contextMap, false) In the called test case I set some context properties in a groovy script in this way: context.setProperty(“ProperyName”,”Value”) After the called test case has finished...

How to get the value of property expansion in groovy

web-services,groovy,soapui
Let's say I have this formula in a soap request ${test#Response#//ns1:authentification/bloc1/bloc2/idSession} If next step I want to save this value in test case property using groovy, how can I get the runtime value ? Or is it possible to do it without even using groovy ?...

How to rename a Testcase or Teststep using Groovy in SoapUi

groovy,soapui
I am re factoring large sets of tests in SoapUi. Is there a way to automate creation and renaming of test cases/test steps through Groovy? Thanks....

Subtract number from ResponseAsXml SoapUI

xml,soapui
I have a JDBC test step that I'm calling the value of "46680.06" ${FPL_RANGES#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/FPL_400_001[1]} The above I would like to subtract 3000 from it. I just don't know how to apply the subtraction part. Thank you, Rob...