-
1. Re: Body empty?
allanon76 Mar 29, 2011 6:55 AM (in response to allanon76)just to help to understand, the response froom server monitored by the tcp viewer is:
284: Server to Client (2920 bytes, Incomplete last line)
HTTP/1.1 200 OK
X-Powered-By: Servlet/2.5
Server: Sun Java System Application Server 9.1_02
Content-Type: text/xml;charset="utf-8"
Transfer-Encoding: chunked
Date: Tue, 29 Mar 2011 10:53:33 GMT
2000
<competences><competence id="239"><title>SWOT analysis</title><description>Being able to apply SWOT analysis</description><resources><resource id="15"><competenceID>239</competenceID><userID>michele</userID><name>Google</name><uri>http://www.google.it</uri><minEQF>0</minEQF><maxEQF>0</maxEQF></resource><resource id="16"><competenceID>239</competenceID><userID>michele</userID><name>Google</name><uri>http://www.google.it</uri><minEQF>0</minEQF><maxEQF>0</maxEQF></resource></resources></competence><competence id="238"><title>Sales Techniques</title><description>Being able to apply different sales techniques</description></competence><competence id="237"><title>Marketing channels</title><description>Being able to manage different marketing channels</description></competence><competence id="236"><title>Customer Relationship Management</title><description>Being able to setup and manage customer-relationship management</description></competence><competence id="234"><title>Distribution network</title><description>Being able to optimize the distribution network</description></competence><competence id="235"><title>Product placement</title><description>Being able to position a product on the market</description></competence><competence id="232"><title>Market research</title><description>Being able to conduct market research</description></competence><competence id="233"><title>Price policy</title><description>Being able to evaluate and adapt the price policy</description></competence><competence id="231"><title>To be able to apply interpersonal skills interculturally; the sending and receiving of messages that are accurate and appropriate</title><description>To be able to apply interpersonal skills interculturally; the sending and receiving of messages that are accurate and appropriate</description></competence><competence id="230"><title>To be able to achieve
284: Server to Client (2920 bytes)
0000 67 6F 61 6C 73 20 74 6F 73 6F 6D 65 20 64 65 67 goals tosome deg
0010 72 65 65 20 74 68 72 6F 75 67 68 20 63 6F 6E 73 ree through cons
0020 74 72 75 63 74 69 76 65 69 6E 74 65 72 61 63 74 tructiveinteract
0030 69 6F 6E 20 69 6E 20 61 6E 20 69 6E 74 65 72 63 ion in an interc
-
2. Re: Body empty?
allanon76 Mar 30, 2011 3:32 PM (in response to allanon76)Hi,
any idea on how try to solve this issue?
best,
Michele
-
3. Re: Body empty?
njiang Mar 30, 2011 9:59 PM (in response to allanon76)What kind of browser are you using?
Safari cannot display the xml rightly.
According to your description, I can't tell how you put the TCP monitor tool to monitor the request/response. Did you monitor the request/response of the REST service or the SOAP service?
Willem
-
4. Re: Body empty?
allanon76 Mar 31, 2011 8:22 AM (in response to njiang)I'm pretty sure that is not a browser problem.
I tried anyway with firefox,IE and Chrome.
But I can see the problem in camel also trying to add a processor after the .to(rest) call.
from("direct:competences")
.process(new prepareRequestForCompetences())
.setHeader("CamelHttpMethod", constant("POST"))
.to(Constant.COMPETENCE_SERVICE+"?bridgeEndpoint=true&throwExceptionOnFailure=false") <--- here the body is empty
if I add a processort after the last .to() I don't see anything in the exchange object.
The TCP monitor is placed to intercept the request to SOAP service and monitor the the response. Basically in the last .to call I send the request to the monitor and monitor fwd it to the real service after displaying the stream.
Both the request and response are fine. But after that ,the response is lost ( even removing the monitor )
Edited by: allanon76 on Mar 31, 2011 12:22 PM
-
5. Re: Body empty?
njiang Mar 31, 2011 9:17 PM (in response to allanon76)Can you enable the trace[1] and check the log for it?
From the camel route that you show me , I can't tell any thing wrong.
http://camel.apache.org/tracer.html
Willem
-
6. Re: Body empty?
allanon76 Apr 5, 2011 9:54 AM (in response to njiang)Hi, this is what I've, but it does not help a lot... at least for me...
15:43:32,720 | INFO | Thread-50 | Tracer | rg.apache.camel.processor.Logger 88 | 72 - org.apache.camel.camel-core - 2.4.0.fuse-02-00 | 9be62531-a396-414a-8d61-2422d8c40a23 >>> (route1) from(http://0.0.0.0:8080/rest) --> choice <<< Pattern:InOut, Headers:{org.restlet.startTime=1302011012673, CamelHttpMethod=GET, service=competences, org.restlet.http.version=HTTP/1.1, CamelHttpUri=http://localhost:8080/rest/competences, org.restlet.http.headers=[Host: localhost:8080, User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8, Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3, Accept-Encoding: gzip, deflate, Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7, Keep-Alive: 115, Connection: keep-alive]}, BodyType:null, Body:null
15:43:32,720 | INFO | Thread-50 | Tracer | rg.apache.camel.processor.Logger 88 | 72 - org.apache.camel.camel-core - 2.4.0.fuse-02-00 | 9be62531-a396-414a-8d61-2422d8c40a23 >>> (route1) choice --> direct://competences <<< Pattern:InOut, Headers:{org.restlet.startTime=1302011012673, CamelHttpMethod=GET, service=competences, org.restlet.http.version=HTTP/1.1, CamelHttpUri=http://localhost:8080/rest/competences, org.restlet.http.headers=[Host: localhost:8080, User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8, Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3, Accept-Encoding: gzip, deflate, Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7, Keep-Alive: 115, Connection: keep-alive]}, BodyType:null, Body:null
15:43:32,736 | INFO | Thread-50 | Tracer | rg.apache.camel.processor.Logger 88 | 72 - org.apache.camel.camel-core - 2.4.0.fuse-02-00 | 9be62531-a396-414a-8d61-2422d8c40a23 >>> (route6) direct://competences --> com.els.os.camel.processor.prepareRequestForCompetences@8f5352 <<< Pattern:InOut, Properties:{CamelToEndpoint=direct://competences}, Headers:{org.restlet.startTime=1302011012673, CamelHttpMethod=GET, service=competences, org.restlet.http.version=HTTP/1.1, CamelHttpUri=http://localhost:8080/rest/competences, org.restlet.http.headers=[Host: localhost:8080, User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8, Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3, Accept-Encoding: gzip, deflate, Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7, Keep-Alive: 115, Connection: keep-alive]}, BodyType:null, Body:null
15:43:32,736 | INFO | Thread-50 | prepareRequestForCompetences | sor.prepareRequestForCompetences 17 | 248 - camel - 0.0.1.SNAPSHOT | prepareRequestForCompetences
15:43:32,751 | INFO | Thread-50 | Tracer | rg.apache.camel.processor.Logger 88 | 72 - org.apache.camel.camel-core - 2.4.0.fuse-02-00 | 9be62531-a396-414a-8d61-2422d8c40a23 >>> (route6) direct://competences --> com.els.os.camel.processor.prepareRequestForCompetences@8f5352 <<< Pattern:InOut, Properties:{CamelToEndpoint=direct://competences}, Headers:{CamelHttpUri=http://localhost:8080/rest/competences, org.restlet.http.headers=[Host: localhost:8080, User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8, Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3, Accept-Encoding: gzip, deflate, Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7, Keep-Alive: 115, Connection: keep-alive], SOAPAction=, CamelHttpMethod=POST, Content-Type=text/xml;charset=UTF-8, org.restlet.startTime=1302011012673, service=competences, org.restlet.http.version=HTTP/1.1}, BodyType:String, Body: http://openscout.ou.nl:8080/OpenScout_Competence_Webservices/CompetenceServicesService?throwExceptionOnFailure=false&bridgeEndpoint=true <<< Pattern:InOut, Properties:{CamelToEndpoint=direct://competences}, Headers:{org.restlet.http.headers=[Host: localhost:8080, User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8, Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3, Accept-Encoding: gzip, deflate, Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7, Keep-Alive: 115, Connection: keep-alive], service=competences, org.restlet.startTime=1302011012673, CamelHttpUri=http://localhost:8080/rest/competences, CamelHttpMethod=POST, org.restlet.http.version=HTTP/1.1, SOAPAction=, Content-Type=text/xml;charset=UTF-8}, BodyType:String, Body: http://openscout.ou.nl:8080/OpenScout_Competence_Webservices/CompetenceServicesService?throwExceptionOnFailure=false&bridgeEndpoint=true <<< (OUT), Pattern:InOut, Properties:{CamelToEndpoint=http://openscout.ou.nl:8080/OpenScout_Competence_Webservices/CompetenceServicesService?throwExceptionOnFailure=false&bridgeEndpoint=true, CamelCharsetName="utf-8", CamelSkipGzipEncoding=true}, Headers:{SOAPAction=, X-Powered-By=Servlet/2.5, CamelHttpMethod=POST, Server=Sun Java System Application Server 9.1_02, Content-Type=text/xml;charset="utf-8", CamelHttpUri=http://localhost:8080/rest/competences, Date=Tue, 05 Apr 2011 13:42:52 GMT, org.restlet.http.version=HTTP/1.1, org.restlet.startTime=1302011012673, CamelHttpResponseCode=200, service=competences, Transfer-Encoding=chunked, org.restlet.http.headers=[Host: localhost:8080, User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8, Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3, Accept-Encoding: gzip, deflate, Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7, Keep-Alive: 115, Connection: keep-alive]}, BodyType:String, Body: http://openscout.ou.nl:8080/OpenScout_Competence_Webservices/CompetenceServicesService?throwExceptionOnFailure=false&bridgeEndpoint=true <<< (OUT), Pattern:InOut, Properties:{CamelToEndpoint=http://openscout.ou.nl:8080/OpenScout_Competence_Webservices/CompetenceServicesService?throwExceptionOnFailure=false&bridgeEndpoint=true, CamelSkipGzipEncoding=true, CamelCharsetName="utf-8"}, Headers:{CamelHttpUri=http://localhost:8080/rest/competences, org.restlet.http.headers=[Host: localhost:8080, User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8, Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3, Accept-Encoding: gzip, deflate, Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7, Keep-Alive: 115, Connection: keep-alive], SOAPAction=, CamelHttpMethod=POST, Content-Type=text/xml;charset=UTF-8, org.restlet.startTime=1302011012673, service=competences, org.restlet.http.version=HTTP/1.1}, BodyType:String, Body: http://openscout.ou.nl:8080/OpenScout_Competence_Webservices/CompetenceServicesService?throwExceptionOnFailure=false&bridgeEndpoint=true <<< (OUT), Pattern:InOut, Properties:{CamelToEndpoint=http://openscout.ou.nl:8080/OpenScout_Competence_Webservices/CompetenceServicesService?throwExceptionOnFailure=false&bridgeEndpoint=true, CamelSkipGzipEncoding=true, CamelCharsetName="utf-8"}, Headers:{CamelHttpUri=http://localhost:8080/rest/competences, org.restlet.http.headers=[Host: localhost:8080, User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8, Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3, Accept-Encoding: gzip, deflate, Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7, Keep-Alive: 115, Connection: keep-alive], SOAPAction=, CamelHttpMethod=POST, Content-Type=text/xml;charset=UTF-8, org.restlet.startTime=1302011012673, service=competences, org.restlet.http.version=HTTP/1.1}, BodyType:String, Body:, OutBodyType:org.apache.camel.converter.stream.InputStreamCache, OutBody:org.apache.camel.converter.stream.InputStreamCache@1df6877
-
7. Re: Body empty?
njiang Apr 11, 2011 10:40 AM (in response to allanon76)Hi
There is an input stream in the out message body.
How did you get the body ? I can't tell from your camel route.
OutBodyType:org.apache.camel.converter.stream.InputStreamCache, OutBody:org.apache.camel.converter.stream.InputStreamCache@1df6877
Willem