On Mon, Jan 21, 2019 at 9:47 PM Paul F Fraser via osgi-dev <
[email protected]> wrote:
> On 21/01/2019 7:57 pm, Tim Ward wrote:
>
> As a separate question - is there a reason that you are trying to use the
> Apache HttpClient? OSGi enRoute makes use of the JAX-RS Whiteboard which
> includes a simple way to access the JAX-RS specification client
> implementation. If it’s possible for you to use the existing JAX-RS Client
> instead then you could avoid adding the duplicate function.
>
> R7 spec sample code
>
> Client client = clientBuilder.build(); Promise<String> p =
> client.target(REST_SERVICE_URL) .path("/foo") .path("/{name}")
> .resolveTemplate("name", buzz) .request() .rx(PromiseRxInvoker.class)
> .get(String.class);
>
> Using
>
> Client client = ClientBuilder.newClient(); // as the first line
>
_clientBuilder_ is a reference to the `javax.ws.rs.client.ClientBuilder`
*service* provided by JAXRS Whiteboard, which you can get to satisfy the
above code example with:
@Reference
private ClientBuilder clientBuilder;
I cannot find dependecies which satisfy the rx(Promise...) line.
>
https://osgi.org/specification/osgi.cmpn/7.0.0/service.jaxrs.html#org.osgi.service.jaxrs.client.PromiseRxInvoker
So:
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.jaxrs</artifactId>
<version>1.0.0</version>
</dependency>
import org.osgi.service.jaxrs.client.PromiseRxInvoker;
HTH
- Ray
I have tried most of the glassfish jersey bundles and quite a few others.
>
> Is there any working code examples available or can anyone suggest the
> required dependencies?
>
> Paul
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
--
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
(@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
(@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev