[Res] SoapUI pro 4.5 does not allow | in template parameters

soapUI pro announcements and discussions

SoapUI pro 4.5 does not allow | in template parameters

Postby NAVTEQ » 30 Mar 2012 07:40

Hi,

Pipes ('|') in resource paths are still throwing an URISyntaxException. Same problem as in Beta 2.
Please see http://www.eviware.com/forum/viewtopic.php?f=20&t=12877 for details. It worked fine in soapUI pro 4.0.1.

For now, we will continue to use 4.0.1 as 4.5.0 simple does not work for us.
NAVTEQ
User
 
Posts: 12
Joined: 09 Mar 2012 09:07

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby SmartBear Support » 30 Mar 2012 16:27

Hi,

This is in our backlog [SOAPUI-3736] and is being worked on.

On a unrelated note, pipes in URLs are considered unsafe. Pipes are known to be incompatible with several applications, including Firefox and Ruby on Rails.

Have a nice weekend!

Henrik
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby Ton636 » 10 Apr 2012 15:52

Hi, just wanted to let you know that we are also affected by this issue. 4.0.1 works fine, in 4.5 several test cases broke, we had to change the global http parameter "Preencoded Endpoints" and then encode the | char in our template usage.

We are aware that pipes are considered unsafe, unfortunately this is a legacy application that we need to support. A fix for this issue would be most appreciated as we are contemplating rolling back to soapUI 4.0.1 as an alternative.

Ton Vlaming
Ton636
User
 
Posts: 15
Joined: 03 Feb 2012 16:01

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby SmartBear Support » 11 Apr 2012 14:51

I just wanted to let you know that the issue is in progress. It will probably be in a nightly build soon. We'll get back to you then.

Regards

Henrik
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby NAVTEQ » 06 Jul 2012 20:27

Hi,

was this issue fixed in SoapUI 4.5.1?

Thanks,
Josef
NAVTEQ
User
 
Posts: 12
Joined: 09 Mar 2012 09:07

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby SmartBear Support » 06 Jul 2012 21:55

Hi Josef,

it should have been - can you confirm?

regards!

/Ole
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby NAVTEQ » 16 Jul 2012 13:16

Hi Ole,

sorry, still getting the same error.

Mon Jul 16 14:05:54 CEST 2012:ERROR:java.net.URISyntaxException: Illegal character in path at index 36: http://server:6080/service/layer/usr|jwegne|test
java.net.URISyntaxException: Illegal character in path at index 36: http://server:6080/service/layer/usr|jwegne|test
at java.net.URI$Parser.fail(URI.java:2810)
at java.net.URI$Parser.checkChars(URI.java:2983)
at java.net.URI$Parser.parseHierarchical(URI.java:3067)
at java.net.URI$Parser.parse(URI.java:3015)
at java.net.URI.<init>(URI.java:577)
at org.apache.http.client.utils.URIUtils.createURI(URIUtils.java:106)
at com.eviware.soapui.impl.wsdl.submit.filters.HttpRequestFilter.filterHttpRequest(HttpRequestFilter.java:226)
at com.eviware.soapui.impl.wsdl.submit.filters.RestRequestFilter.filterRestRequest(RestRequestFilter.java:39)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterAbstractHttpRequest(AbstractRequestFilter.java:39)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterRequest(AbstractRequestFilter.java:31)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:184)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)


Thanks,
Josef
NAVTEQ
User
 
Posts: 12
Joined: 09 Mar 2012 09:07

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby SmartBear Support » 20 Jul 2012 16:14

Hi Josef,

for soapUI 4.5 we switched to an updated HTTP stack (httpclient 4.x) - this is unfortunately more strict in its URL handling and thus does not accept | as part of a URL - just as defined in the specification for URLs (RFC 1738, Dec. '94):

"...Only alphanumerics [0-9a-zA-Z], the special characters "$-_.+!*'()," [not including the quotes - ed], and reserved characters used for their reserved purposes may be used unencoded within a URL."

On the other hand - soapUI should URLEncode these pipes unless you have the "preencoded endpoints" option selected in the global HTTP options - do you!?

regards,

/Ole
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby NAVTEQ » 20 Jul 2012 19:14

Hi,

I double checked, but "preencoded endpoints" is not checked. And the problem seems to be java.net.URI; it does not seem to like pipes (tested with groovy 2.0 and JDK 1.7):

Code: Select all
groovy:000> new URI('http://server:6080/service/layer/usr|jwegne|test');
ERROR java.net.URISyntaxException:
Illegal character in path at index 36: http://server:6080/service/layer/usr|jwegne|test
        at groovysh_evaluate.run (groovysh_evaluate:2)
        ...
groovy:000> new URI('http://server:6080/service/layer/usr%7Cjwegne%7Ctest');
===> http://server:6080/service/layer/usr%7Cjwegne%7Ctest
groovy:000>


Thanks and best regards,
-Josef
NAVTEQ
User
 
Posts: 12
Joined: 09 Mar 2012 09:07

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby SmartBear Support » 07 Aug 2012 09:56

Hi!

Try encoding your URL before passing it to URI as suggested here: http://stackoverflow.com/questions/1828 ... is-in-java
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby NAVTEQ » 09 Aug 2012 12:41

Hi,

thanks for the suggestion. We can handle pipes in our code just fine. But we cannot use SoapUI Pro 4.5 for development/testing; only SoapUI Pro 4.0 works.

The problem persists since 4.5 Beta 1 (5 months for now). Can you please finally fix it/work around this issue by encoding the URL in SoapUI?

Thank you very much,
-Josef
NAVTEQ
User
 
Posts: 12
Joined: 09 Mar 2012 09:07

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby SmartBear Support » 10 Aug 2012 10:42

Hi Josef,

with the latest 4.5.1 nightly I can create and submit an HTTP Test Step with the URL set to http://localhost:8080/service/layer/usr|jwegne|test just fine provided that the global "Preencoded endpoints" option is NOT checked. How does this differ from your usage scenario? Are you using 4.5.0?

regards,

/Ole
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby NAVTEQ » 10 Aug 2012 14:06

Hi,

it seems that the problem only happens if you use "usr|jwegne|test" as a template parameter.

Steps to reproduce:
1. Create new project
2. Create New Rest Service
3. Create New Resource with resource path "/service/layer/{layerId}" and click on "Extract Params"
4. Create New Get Method
5. Create New Request and enter "usr|jwegne|test" for layerId
6. Send request

Result:
ERROR:java.net.URISyntaxException: Illegal character in path at index 34: http://localhost/service/layer/usr|jwegne|test

Please also see attached SoapUI project.

Thanks,
-Josef
Attachments
TestWithPipes-soapui-project.xml
Test Case with pipes
(1.91 KiB) Downloaded 524 times
NAVTEQ
User
 
Posts: 12
Joined: 09 Mar 2012 09:07

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby SmartBear Support » 13 Aug 2012 07:29

Hi,

thanks - we're onto this now - I'll let you know when there is a nightly build for you use.

regards,

/Ole
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: SoapUI pro 4.5 does not allow | in template parameters

Postby RCanavesi » 22 Aug 2012 17:05

Is this fixed?
I have an issue sending: %3F%26.
Ver 4.5.0
In the URL appears as: %253F%2526?&

For 4.5.1
In the URL appeats as: ?&

but doesn´t work .
RCanavesi
User
 
Posts: 1
Joined: 31 May 2012 09:59

Next

Return to soapUI Pro Support