Geonovum / etf-test-projects-inspire

ETF test projects for use in SoapUI to test services to INSPIRE Technical Guidance requirements
6 stars 4 forks source link

workaround for #67: decode curly brackets again #68

Open thijsbrentjens opened 8 years ago

jonherrmann commented 8 years ago

Looks good, that should work for both encodings.

thijsbrentjens commented 8 years ago

Not sure if this is a workaround suitable for the webapp. I get this error on our test instance:

java.net.URISyntaxException: Illegal character in query at index 53: https://...../csw?getxml={33F9A1CB-6520-4953-8794-88BCB8D637B5}error at line: 21

referring to the curly bracket that has been decoded..

thijsbrentjens commented 8 years ago

Sorry, my previous comment is not correct. But there is still an issue. Will come back to it.

jonherrmann commented 8 years ago

Then we could give the RestUtils function a try:

// put this into a groovy test step, change HTTP "TestStepName", call after properties are set and before HTTP test step is called.
import com.eviware.soapui.impl.rest.support.RestUtils;
import de.interactive_instruments.xtf.*;
SOAPUI_I.init(log,context,testRunner);

ProjectHelper ph = new ProjectHelper()
def targetTestStep = ph.getTestStep("TestStepName")
RestUtils.extractParams(targetTestStep.getHttpRequest().getEndpoint(),
                targetTestStep.getHttpRequest().getParams(), true)
thijsbrentjens commented 8 years ago

Hmm, I can't get it working now. See https://github.com/Geonovum/etf-test-projects-inspire/issues/67 for more comments. It seems that SoapUI is quite aggressive in encoding the request parameters again. Even if they are already encoded properly in the URL to test.

( @jonherrmann: maybe you already were aware of this, but maybe it helps in finding a solution)

jonherrmann commented 7 years ago

To give a short update here: i made tests with some new SoapUI 5.2.1 plugin features and it looks like this will solve the problem.