Contributions
Parameter to indicate endpoint update behaviour on the updateDefinition method (WsdlInterface)
Refering to forum post for the background:http://community.smartbear.com/t5/SoapUI-NG/Suppress-questions-while-doing-quot-updateDefinition-quot-from/m-p/109240#M25409 It would be nice with an option to determine what should happen when you update the definition of a service using a new WSDL location using groovy (WsdlInterface.updateDefintion()). As it stands if the endpoint is changed the user is prompted with a yes/no question if he/she wants to update requests with the new endpoint, so a simple bool to the updateDefinition method would be awesome.4.1KViews2likes2CommentsRe: Suppress questions while doing "updateDefinition()" from groovy
Not really. The whole idea about having the base url as a property in the project is to let each developer and tester have his or her individual setting based on which version he or she is testing without having to influence the other testers and developers all that much.9 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.1KViews1like4CommentsSuppress questions while doing "updateDefinition()" from groovy
Is it possible to suppress "update requests with new endpoint" question when updating definition from groovy? More specifically it would be nice to choose a default action/handlingof changing the url. A bit of background: We have a large test suite with 20+ endpoint. To make everything easier for testers and developers alike, we have added a few project properties that we use as the base URL and then each definition URL is relative to that property, something like the following would be a valid definition URL: ${#Project#BaseUrl1}/Customer/Customer.svc?wsdl Now in the setup script of the project we want to update all definitions to their latest version by doing something like currentUrl = ((WsdlInterface)interfaceInstance).getDefinition(); ((WsdlInterface)interfaceInstance).updateDefinition(currentUrl, false); However, because "currentUrl" is a property expression, updateDefintion fails misserably. Expanding the currentUrl works fine, however for each endpoint we get a question asking if we want to update requests with the new URL (which we do not since they all point to the property expression). Sooo, the question is, can we somehow tell "updateDefinition" to NOT update with the new URL, or alternatively let it understand property expressions so we don't have to expand it.Solved9 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.2KViews0likes6CommentsMockService HTTP POST Parameters missing
Hi I am trying to write a test where I get a POST request from an external party, and the parameters of that POST request needs to be used in a test. So reading a bit around I figured I could write a MockService in SoapUi and parse the POST request from that. In order to do that i have to use the "OnRequest" script part of a mocking service. I got as far as to get the WsdlMockRequst context (mockRequest.requestContext) and from that i got the javax.servlet.http.HttpServletRequest (mockRequest.httpRequest). However the httprequest seems to be missing the post parameters somehow. I get the "querystring" if i do something like log.info(mockRequest.requestContent) and analyzing the actual http request shows me that it does indeed contain POST parameters. However something like log.info(mockRequest.httpRequest.getParameters() gives me a null value. Any ideas, or other ways to get the parameters short of manually parsing the request context? Or is this an error in soapui (im using 4.5.1 on x64 btw) The complete code block is something like this: import com.eviware.soapui.impl.wsdl.mock.WsdlMockResult; import com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest; import com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner; import javax.servlet.http.HttpServletRequest; def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) def mockcontext = mockRequest.requestContext; def httpRequest = mockRequest.httpRequest; if(httpRequest.method == "POST") { log.info(httpRequest.getParameters()); // Logs null log.info(mockRequest.requestContent); // Logs the request in string form log.info(httpRequest.getParameter("status")); //Logs null even though i know it is there mockRunner.returnFile( mockRequest.httpResponse, new File ( "C:\\temp\\something.html" )) WsdlMockResult mockResult = new WsdlMockResult( mockRequest ); return mockResult; }2.4KViews0likes0Comments