liugang created CAMEL-5833:
------------------------------
Summary: Can't save the message from a CXF request to a file
Key: CAMEL-5833
URL: https://issues.apache.org/jira/browse/CAMEL-5833
Project: Camel
Issue Type: Bug
Components: camel-cxf
Affects Versions: 2.10.2
Reporter: liugang
if I have following route:
{code}
from("cxf:http://localhost:8091/save2file?dataFormat=RAW&wsdlURL=file:wsdl/se.wsdl").process(new
Processor() {
public void process(Exchange exchange)
throws Exception {
//
System.out.println(exchange.getIn().getBody(String.class)); // the saved file
content is none
System.out.println(exchange.getIn().getBody()); // this works fine
}
}).to("file://output?fileName=message.txt");
{code}
as comment, if in Processor, I put:
{code}
System.out.println(exchange.getIn().getBody());
{code}
Then, it works fine, the file created, and the content is correct.
but if I changed *getBody()* to *getBody(String.class)*:
{code}
System.out.println(exchange.getIn().getBody(String.class));
{code}
then, the file created by with empty content.
Actually, the problem existed for a long time.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira