soapui

What is the correct format of a SOAP response

爱⌒轻易说出口 提交于 2019-12-25 07:29:21
问题 I'm working with a Web Service that i didn't make and i'm getting two different responses from the same method, data is the same but format changes and that crashes my app Response 1: <SOAP-ENV:Envelope xmlns:SOAP-ENV=...> <SOAP-ENV:Body SOAP-ENV:encodingStyle="..." xmlns:NS1="..." xmlns:NS2="..."> <NS1:...> <return href="#1"/> </NS1:...> <NS2:..." xsi:type="NS2:..."> </NS2:...> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Response 2: <SOAP-ENV:Envelope xmlns:SOAP-ENV=...> <SOAP-ENV:Body SOAP-ENV

MS project server Error while updating team through SoapUI

和自甴很熟 提交于 2019-12-25 06:12:51
问题 I want to update project team of project using Soap UI, But i m getting GeneralUnhandledException while doing the operation through Soap UI. Following is my request body and response : URL of asmx service : http://vmw2k8sp136167:30/_vti_bin/PSI/Project.asmx Request : <proj:QueueUpdateProjectTeam> <proj:JobUid>e0b1816d-daf7-e411-97e7-005056ad0852</proj:JobUid> <proj:sessionUid>e0b1816d-daf7-e411-97e7-005056ad0753</proj:sessionUid> <proj:projectUid>e0b1816d-daf7-e411-97e7-005056ad0472</proj

How to use global property value in connection string using groovy

折月煮酒 提交于 2019-12-25 05:13:07
问题 I tried to use global property value in connection so that i can change it from one place and it will apply in all my script. This is my connection string and it works fine when i put the IP directly in the string def dbName = context.expand( '${DB_Name}' ) def dbUser = context.expand( '${DB_Username}' ) def dbPass = context.expand( '${DB_Password}' ) def con = Sql.newInstance("jdbc:sqlserver://192.168.111.111:1433;" + "databaseName=" + dbName, dbUser, dbPass, 'com.microsoft.sqlserver.jdbc

Groovy - How to periodically flush data into excel files

浪子不回头ぞ 提交于 2019-12-25 02:59:41
问题 I am writing a groovy code (inside SoapUI tool) to create excel file and periodically flush data into it. The idea is if due to some exception/interruption the code did not complete, i should get the data in excel till the time error/issue occurred. I am using outputStream.flush() as shown below. Below is my sample code. import jxl.* import jxl.write.* import java.io.IOException; import java.io.OutputStream; WritableWorkbook workbook; WritableSheet sheet; try{ log.info (" >> Start"); def

Groovy - how to Decode a base 64 string and save it to a pdf/doc in local directory

孤街浪徒 提交于 2019-12-25 01:54:11
问题 Question I need help with decoding a base 64 string and saving it to a pdf/doc in local directory using groovy This script should work in SOAP UI The base64 string is 52854 characters long I have tried the following File f = new File("c:\\document1.doc") FileOutputStream out = null byte[] b1 = Base64.decodeBase64(base64doccontent); out = new FileOutputStream(f) try { out.write(b1) } finally { out.close() } But - it gives me below error No signature of method: static org.apache.commons.codec

linux command line tool for generate xml request from wsdl

末鹿安然 提交于 2019-12-25 01:33:13
问题 I'm new on this field. I would like to know if anybody know a Linux command-line tool to generate a XML Request from a wsdl that I have. This wsdl uses XSD files for request and response. I know that SoapUI does this, so basically, I would like to do the same but on command line. Edit (for clarification): what I would like to know is if there is a way to generate the request xml structure that soapui automagically does but without using soapui, hopefully command-line. Then I know that I can

Save attachments automatically in SoapUI with Groovy

做~自己de王妃 提交于 2019-12-24 18:53:27
问题 I try to save all the attachments from a SOAP response. I use following Groovy script. def testStep = testRunner.testCase.getTestStepByName("SubmitFile") def response = testStep.testRequest.response assert null != response, "response is null" def outFile = new FileOutputStream(new File(System.getProperty('java.io.tmpdir')+'/test.zip')) for(i=0; i<3; i++){ def ins = response.responseAttachments[0].inputStream if (ins) { com.eviware.soapui.support.Tools.writeAll(outFile, ins) } } ins.close()

How do I get a Cookie from a SoapUI response using a Groovy test step?

≯℡__Kan透↙ 提交于 2019-12-24 17:14:49
问题 How do I get a Cookie from a SoapUI response using a Groovy test step? I tried this Groovy code, but it's returning zero cookies (or null). This code is part of a test step that runs immediately after a standard REST request returns a result with the following header: Set-Cookie: JSESSIONID=45C5E845A0C117E22D26DB04A64E5FD8; Path=/tcompany; HttpOnly And the Groovy script I am using that fails to retrieve the Cookie is this: import com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport def

Source code in SoapUI maven

情到浓时终转凉″ 提交于 2019-12-24 17:08:07
问题 How I can add my source code ( java code ) to project SoapUI running by maven? I wrote own assertion class and check response in this class. First i made dir ext and put there .jar file. Now I want do the same, but with source code. 回答1: By adding a jar in the \ext folder you made the compiled class available to SoapUI test runner. Instead of that you could include your code as a maven module in your project and add it as dependency. Your Java code should be a maven project for this to work.

How to get assertion value using groovy script

二次信任 提交于 2019-12-24 15:18:05
问题 I have one test step which contains two assertion. Not SOAP Fault Contains. The Condition is that response should contain "Message Sent Successfully" Now I have one groovy script, from where I am executing this test step. Using this groovy script I need to print assertion name, Value and Status. Below is the code I have written: testStepSrc = testCase.getTestStepByName(testName) Assertioncounter = testStepSrc.getAssertionList().size() for (AssertionCount in 0..Assertioncounter-1) { log.info(