Body request parameters not being created after Swagger definition import
Hi, I'm trying to import a Swagger 2.0 definition to SoapUI, but after doing so the request parameters aren't automatically generating, defeating the purpose of the import. I've also tried to import the example petstore swagger file and even there the body in the post calls is empty even though I can see that there is content when I check the swagger file in the swagger editor. Am I missing something? I have installed the plugins (I believe the latest ones) and I believe the version of the swagger file is correct since it doesn't allow me to import the 3.0. Also I tried importing collections from Postman and in case I have an attribute defined like this: "Expected_Product_Duration": "<hh:mm:ss>" It doesn't import the body request parameters unless we delete the <>. This is not that such of an issue I just thought it would be nice to mention it in case other people encounter the same. Thanks, Bojana PS I found this topic but I don't see how it was resolved, if it was resolved at all:https://community.smartbear.com/t5/SoapUI-Pro/Body-request-parameters-not-being-created-after-Swagger/td-p/152271Solved1.9KViews0likes3CommentsCalling java class from mock script
Hi, I have a mock soap service and want to do some magic with basic auth headers. When I try to import the java.utils.Base64 I get class not found errrors. Are the std java classes not on the classpath? Searching for this problem only gives examples of custom classes. The documentation and API suggest only a limited set of XML/SOAP/JSON/REST classes. Thnx, Wim-Jan Adding relevant piece of groovy: note that it is to help clarify the issue and imcomplete since I cut out or substituted sensitive info import java.utils.Base64 def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) def alert = com.eviware.soapui.support.UISupport; log.info("------------- begin call -----------------------------"); def soapRequest = mockRequest.requestContent; def headers = mockRequest.requestHeaders; def incommingBasicAuth = headers.get("Authorization", "defaultAuth"); if (incommingBasicAuth == "defaultAuth") { log.info("no basicAuth header found!"); } else { String decodedAuth = Base64.getDecoder().decode; def uNamePw = decodedAuth.split(":"); log.info("basicAuth header for " + uNamePw + " found!"); } log.info("--- request will be forwarded to actual service ----") String basicAuth = ""; if (incommingBasicAuth == "defaultAuth") { log.info("Set hardcoded username,password"); String userCredentials = "someuser:somepw"; basicAuth = "Basic " + new String(Base64.getEncoder().encode(userCredentials.getBytes())); } else { log.info("use username password form incomming request"); basicAuth = incommingBasicAuth; } def soapUrl = new URL("https://somewebservice.nl/") def connection = soapUrl.openConnection() // insert the basic auth header connection.setRequestProperty("Authorization", basicAuth); connection.setRequestMethod("POST") connection.setRequestProperty("Content-Type", "text/html") connection.setRequestProperty("SOAPAction", "") connection.doOutput = true Writer writer = new OutputStreamWriter(connection.outputStream); writer.write(soapRequest) writer.flush() writer.close() connection.connect() def soapResponse = connection.content.text // work as proxy, i.e. just return response recieved from https://somewebservice.nl/ requestContext.responseMessage = soapResponseSolved2KViews0likes4Comments