Contributions
Migrating a project from SoapUI 5.0.0 to PRO
Hello SoapUI Pro Support, While migrating a project from MockService from SoapUI 5.0.0 to the most recent version of SoapUI Pro we were no longer able to retrieve POST form submission input values using groovy script. Can you please email us a groovy script code example that will retrieve the country, language and xml-structure input parameters from the form below? Thank you- we are working on an urgent project for an important client and this will be most helpful. Best- Tony ==============code that worked in SoapUI 5.0.0 but no longer works in 5.1 Pro. A null value is now returned for all parameters================= //syntax for retrieving input parameters form/value pair from form POST submission def Country = mockRequest.getRequest().getParameter("country") log.info Country def Language = mockRequest.getRequest().getParameter("language") log.info Language def currentXMLPayload = mockRequest.getRequest().getParameter("xml-structure") log.info currentXMLPayload ====Form POST (can copy to .txt document, then change the file extension to .html to run against a test mock service) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Test Form</title> </head> <body> <h1>DMS RO Creation</h1> <form method="POST" action="http://localhost:8082/dro/dms_create_ro.do?process=create"> <p>XML:<br> Country: <input type="text" name="country" value="SE"><br> Language: <input type="text" name="language" value="SV"><br> <textarea name="xml-structure" cols="50" rows="10"> <VEHICLE> <VERSION>1.00</VERSION> <VEHICLE_INFORMATION> <VEHICLE_INFO> <ORDERING_MPC>1271</ORDERING_MPC> <SPARTE>00</SPARTE> <MODEL>117</MODEL> <BAUMUSTER>11735212-001</BAUMUSTER> <CONFIGURATION_DATE>2014-09-16</CONFIGURATION_DATE> <PRICING_DATE>2014-09-16</PRICING_DATE> </VEHICLE_INFO> </VEHICLE_INFORMATION> </VEHICLE> </textarea> </p> <input type="submit" value=" Submit "> </form> </body> </html> Thanks again! Tony Tony Slosar Motive Retail10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.7KViews0likes2CommentsGetting rid of brackets in response values taken from reques
For some reason brackets are appearing around the values I pull from the request and insert into the response. How to get rid of these? def starcode = mockRequest.getRequestHeaders().get("X-STAR-SenderNameCode") requestContext.starcode = starcode Source (request): X-STAR-SenderNameCode: XX Target (response): <DestinationNameCode>[XX]</DestinationNameCode> Thanks for any help, Tony794Views0likes1CommentModifying REST response HTTP headers
How do I modify the built-in HTTP headers for a mocked REST service? Also I noticed some differences between 5.0.0 and 5.1.1. (I only have the 14 day trial of 5.1.1 - and I can't successfully deploy my mocked REST service...) I found a link in a post from 2012 however it is dead... I need to activate the "Connection" header with value Keep-Alive. When I add it as a custom header (I have added 3 others) it is simply ignored. I need to activate the "content-length" header. I need to change the value of the "Content-Type" header. Default is what is sent in the request - however the service I am mocking always (always) returns "application/xml;charset=UTF-8". I notice in 5.1.1 "Transfer-Encoding" is missing however "Content-Length" is there... ?? Appreciate any help. Kind regards, Tony1.3KViews0likes2CommentsRe: Trying to locate issue - help with log config
Just noticed this line in catalina.out log4j:ERROR Could not create an Appender. Reported error follows. java.lang.ClassNotFoundException: com.eviware.soapui.support.log.SoapUIAppender Is there some library missing in /lib? Also found this: Exception in thread "main" java.lang.NoClassDefFoundError: /opt/lf523-motive/tomcat-6/0/18/webapps/logs/soapui Caused by: java.lang.ClassNotFoundException: .opt.lf523-motive.tomcat-6.0.18.webapps.logs.soapui the path above /opt... is what I am trying to set as my log root... Also found: 16:51:13,720 WARN [SoapUI] Missing folder [/opt/lf523-motive/tomcat-6.0.18/webapps/MR/ext] for external libraries However there are no external libraries needed - even when I select that option when creating war file no directory is created...1.9KViews0likes0CommentsTrying to locate issue - help with log config
Hello I am trying to debug an issue where soapUI mockservices seemi to hang tomcat however I am having trouble with logging. I have 3 mockservices deployed and working. When these get hit hard they eventually make tomcat hang. I have a /classes directory (in all 3 webapps directories) containing log4j.xml and log4j.properties and have tried specifying -Dsoapui.logroot however the logs seem to be all over the place. Log level is specified as "TRACE" however the logs, when I find them, don't have detail about executed mockservices. I have found logs in /soapui, /soapui/log, /classes and /classes/log - but in only one of the three webapps mockservice directories! Also, I have found logs from my other tomcat application in these directories when I specify -Dsoapui.logroot however no logs are in that specified directory! What i would like to do, if possible, is have control over the log level and have the logs for all 3 mockservices in their own directories, preferably like /opt/tomcat-6.0.18/webapps/MR/WEB-INF/logs. Also prevent any log entries going into catalina.out. Also for some reason when -Dsoapui.logroot is set in the tomcat startup script it reports "no such file or directory" even though it does exist. Using soapUI 4.6.2 on tomcat 6.0.18 on CentOS 5.9. Config files attached. Thank you kindly for your help.2.6KViews0likes4Comments