François Courtault created TOMEE-3804:
-----------------------------------------

             Summary: javax.ws.rs.client.Client usage and behavior change 
between 8.0.6 and 8.0.8
                 Key: TOMEE-3804
                 URL: https://issues.apache.org/jira/browse/TOMEE-3804
             Project: TomEE
          Issue Type: Bug
          Components: TomEE Core Server
    Affects Versions: 8.0.8
            Reporter: François Courtault


Hello,

Our code has not changed between 8.0.6 and 8.0.8.

Nevertheless we have seen a behavior difference between these 2 versions.

We are using javax.ws.rs.client.Client rsClient to perform a call from ours µS 
to another one.

This one is initialized like this:

{color:#9876aa}rsClient {color}= 
ClientBuilder.newClient().register(MyJacksonJaxbJsonProvider.{color:#cc7832}class{color}){color:#cc7832};{color}

{color:#cc7832}final {color}URI uri = 
{color:#9876aa}clientTarget{color}.getUri({color:#9876aa}clientUrl{color}{color:#cc7832},
 {color}{color:#9876aa}templateValues{color}){color:#cc7832};{color}

{color:#cc7832}final {color}HttpRequest httpRequest = {color:#cc7832}new 
{color}HttpRequest({color:#9876aa}clientTarget{color}.getHttpMethod(){color:#cc7832},
 {color}uri.toASCIIString(){color:#cc7832}, 
{color}Instant.now()){color:#cc7832};{color}

Response response = {color:#cc7832}null;
{color}

{color:#cc7832}final {color}Invocation.Builder invocation = 
{color:#9876aa}rsClient{color}.target(uri).request(acceptMediatype).headers({color:#cc7832}new
 {color}MultivaluedHashMap<String{color:#cc7832}, 
{color}Object>({color:#9876aa}headers{color})){color:#cc7832};{color}

 

response = 
invocation.build({color:#9876aa}clientTarget{color}.getHttpMethod(){color:#cc7832},
 {color}Entity.entity(entityObject{color:#cc7832}, 
{color}entityMediatype)).invoke(){color:#cc7832};{color}

 

{color:#cc7832}First call{color}

response.readEntity(String.{color:#cc7832}class{color})

OK

{color:#cc7832}Secong call{color}

response.readEntity(String.{color:#cc7832}class{color})

KO: Exception raised :( in 8.0.8 but works fine in 8.0.6.

Is it a bug ?

 

Best Regards.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to