hi

tomee 1 is jaxrs 1.0, clientBuilder API is jaxrs 2. You can use tomee 7


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-12-07 17:18 GMT+01:00 José Luis Cetina <maxtorz...@gmail.com>:

> Hi. Currently im using TomEE 1.7.4 JAXRS.
>
> In my project we currently use our own services for receiving request to
> our server. We use @Path, @Post .... etc. This works great.
>
> No i want create an HTTP Request in my java class to an external API. I see
> an example like this:
>
>  Client client = ClientBuilder.newClient();
>                     String target = "....";
>                     Response responseTwilio = client.target(target)
>                             .request(MediaType.APPLICATION_JSON_TYPE)
>                             .get();
>
> When i try to use it i always get an ClassNotFoundException for
> ClientBiulder... why this happen?
>
> Why i can get request but why i cannot create a request for send to another
> server? I know TomEE use CXF, do i have to add any CXF dependency?
>
> extract of my pom:
>
>  <dependency>
>             <groupId>javax</groupId>
>             <artifactId>javaee-api</artifactId>
>             <version>${javaee.version}</version>
>             <scope>provided</scope>
>          </dependency>
>
>
>  <dependency>
>             <groupId>com.fasterxml.jackson.jaxrs</groupId>
>             <artifactId>jackson-jaxrs-json-provider</artifactId>
>             <version>${jackson.provider.version}</version>
>             <scope>compile</scope>
>         </dependency>
>
> .....
>
>
> Thanks.
>
>
>
> --
> -------------------------------------------------------------------
> *José Luis Cetina*
> -------------------------------------------------------------------
>

Reply via email to