HI, i found my problem.
sorry for the disturb.
The answer is in:
the servername.org already format the response in JSON format, so don't
have to transform the BODY receive.
it's Wrong, rest servlet try to generat automatically Json, thats the
probleme.
i only add
after http://dummyhost>
and now it Works.
Thank's
Daniel
>>> "Daniel Langevin" 2018-02-22 14:20
>>>
Hi,
i try to implement a Rest service In OSGI Karaf 4.0.9 with Camel
2.17.7
this service redirect with camel‑http to another URL.
like
http://serverA.org:8181/rest/XXX/geocode/30%20rue%20larue,%20quebec/adress/geom
redirect to
http://www.servername.org/search/geocode?q=300%20rue%20larue,%20quebec&type=adress&geometries=geom
the servername.org already format the response in JSON format, so don't
have to transform the BODY receive.
When i try with a standard Browser like, Firefox, Safari, Google
Chrome, etc. it works very well .
When i try with application Browser like utl_http from Oracle or wget
or Curl i receive and HTTP error 500 from Jetty
Nothing in the karaf LOG
The request send to my remote server, it respond 200 OK and return de
DATA as well
but after all data was receive
jetty return an error to my application
witch TCPDUMP i saw:
HTTP/1.1 500 Server Error
Date: Thu, 22 Feb 2018 18:54:23 GMT
Server: Jetty(9.2.19.v20160908)
Content‑Type: text/plain; charset=ISO‑8859‑1
Connection: close
com.fasterxml.jackson.databind.JsonMappingException: No serializer
found for class
org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream
and no properties discovered to create BeanSerializer (to avoid
exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) )
I DON'T find what happend ?? Any idea
Thank's in Advance
Daniel
Here my code:
http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema‑instance";
xmlns:wsse="http://docs.oasis‑open.org/wss/2004/01/oasis‑200401‑wss‑wssecurity‑secext‑1.0.xsd";
xmlns:cxf="http://camel.apache.org/schema/cxf";
xmlns:camel="http://camel.apache.org/schema/spring";
xmlns:osgi="http://www.springframework.org/schema/osgi";
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring‑beans‑2.5.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel‑cxf.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel‑spring‑2.17.7.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring‑osgi.xsd";>
http://camel.apache.org/schema/spring"; trace="false" >
...
...
some validation
...
...
http://www.servername.org/search
geocode
q=${header.geoRequete}${header.geoType}${header.geoGeometries}${headergeoFiltre}
http://dummyhost>
org.apache.camel.http.common.HttpOperationFailedException
true
"Le présent courriel peut contenir des renseignements confidentiels et
ne s'adresse qu'au destinataire dont le nom apparaît ci‑dessus. Si ce
courriel vous est parvenu par mégarde, veuillez le supprimer et nous en
aviser aussitôt."
"Le présent courriel peut contenir des renseignements confidentiels et ne
s'adresse qu'au destinataire dont le nom apparaît ci-dessus. Si ce courriel
vous est parvenu par mégarde, veuillez le supprimer et nous en aviser aussitôt."