Comments (3)
Hi. I'm still looking into this. Apparently the behavior of WebTarget.queryParam (which is what is used by ECF proxy impl at runtime to handle the QueryParam annotations on client side) is implementation-dependent. In this case currently Jersey 2.30.1)...and it seems that the encoding might not be done correctly:
https://linuxtut.com/en/ee817c1e792adcd07e5d/
I'm still tracking down whether this is true specifically for Jersey 2.30.1. If the above is still true for this version of Jersey, then you might try doing as they suggest...i.e. manually encoding/decoding to handle the % (which should be url encoded as %25 I think).
Unfortunately, since Jersey is doing the real work here, I can't fix this problem. I might be able to impose a work-around (doing this encoding specifically for % only) if it does turn out to still be Jersey's behavior...but before doing that I want to understand better what Jersey is doing. Could you please try encoding the % chars as %25 manually before call and report what happens here? Thanks.
from jaxrsproviders.
Yes, I can confirm this is exactly what we are seeing, %cargo breaks as c and a are hex, %reis works as r is not hex.
I tried manually encoding % to %25 and it works so I understand this is not a bug, let alone in your implementation but works as "expected". We'll look into using a Filter (or similar) to do this on a default level. Thanks for your feedback!
from jaxrsproviders.
Ok, thanks for checking and reporting here. FWIW, the JaxRSProvider allows you to use OSGI services to setup a javax.ws.rs.client.ClientRequestFilter implementation. As an example, see this bundle:
This creates a ClientRequestFilter to pass basic auth data along with the request. Note from the src here:
this annotation:
@component(immediate=true,property = {"jaxrs-service-exported-config-target=ecf.jaxrs.jersey.client" })
defines this as an declarative services Component. The property = {"jaxrs-service-exported-config-target=ecf.jaxrs.jersey.client" } definition allows you to target a specific config name for your filter. Yours should be similar...i.e. "ecf.jaxrs.jersey.client". As long as this Component is registered before importing the remote service (e.g. on starup), the Component with the property will be registered to the client as a ClientRequestFilter and filter method will be called every time request/method call is made. I think that you can then used the ClientRequestContext.getParameterMap() to get the relevant parameter value, url encode any % and then put the new value in the parameter map.
from jaxrsproviders.
Related Issues (20)
- Replace service id in URL with a value of my choice? HOT 7
- new isssue HOT 3
- Could we make these features available on Eclipse update site? HOT 2
- Clean up metadata for features HOT 1
- Adding needed plug-ins to features HOT 1
- Remove example plugins from features HOT 1
- Update feature dependencies for Jersey JAX-RS Client feature HOT 3
- Custom ObjectMapper not used because of Jackson priority value HOT 6
- Cannot get asynchronous JAX-RS calls working as expected HOT 8
- Create simpler and more flexible endpoint descriptions HOT 21
- Provide JAX-RS and Jersey defaults so they don't have to be duplicated in EDEF files HOT 20
- Clean clone of repo will not build HOT 9
- cxf repository should be absolute HOT 1
- warning when com.mycorp.examples.student.client is executed in karaf HOT 1
- Consume Jersey and all dependencies using Maven repositories HOT 6
- Blank default uuid causes issues with multiple bundles providing services HOT 2
- Issues when starting RCP Client via Webstart HOT 16
- Possible racecondition on Service creation and injection? HOT 27
- Problem running the example com.mycorp.examples.student.remoteservice.host HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jaxrsproviders.