Hi guys,
I have a JAXRS service with an interface which is shared by client and
server code. For example:
@Path("/myservice/{a}/{b}/")
public interface MyService {
@POST
@Path("doSomething")
ObjectY doSomething(ObjectX x);
}
On the server-side we use Jersey and the implementations look like this:
@Path("/myservice/{a}/{b}/")
public class MyServiceImpl implements MyService {
@PathParam("a")
private String a;
@PathParam("b")
private String b;
public ObjectY doSomething(ObjectX x) {
return new ObjectY(a, b, x);
}
}
I’d like to use CXF. I created a proxy-based CXF client from the interface.
But how can I set the path-params “a” and “b”?
I could change the interface signature to:
@POST
@Path("doSomething")
public ObjectY doSomething(@PathParam(“a”) String a, @PathParam(“b”) String
b, ObjectX x);
But unfortunately this is not an option. I’m not allowed to change this
interface.
Do you have any ideas how I can solve this issue?
Your help is highly appreciated!
Many greetings from Munich.
Best regards,
Eduard Hildebrandt