I try to save soap request (jaxb payload) to file as xml payload in apache
camel via below code, but it failed. anyone know how to do it? Any hints
will be more than welcome!

public class CamelRouteBuilder extends RouteBuilder {

    private static final String SOAP_ENDPOINT_URI =
"cxf://http://localhost:{{soapEndpointPort}}/soap"; +
        "?serviceClass=org.yw.springbootcamelesb.soap.CreateFileService";

    @Override
    public void configure() throws Exception {
        from(SOAP_ENDPOINT_URI).process(new
CreateFileProcessor()).to("file:target/reports");;
    }
}

exception I got is like below

pringbootcamelesb.soap.FileCreationStatus on:
Message[ID-YandeMBP-1536989276152-2-2]. Caused by: No type converter
available to convert from type:
org.yw.springbootcamelesb.soap.FileCreationStatus to the required type:
java.io.InputStream with value
org.yw.springbootcamelesb.soap.FileCreationStatus@75ec37c5.
Exchange[ID-YandeMBP-1536989276152-2-1]. Caused by:
[org.apache.camel.NoTypeConversionAvailableException - No type converter
available to convert from type:
org.yw.springbootcamelesb.soap.FileCreationStatus to the required type:
java.io.InputStream with value
org.yw.springbootcamelesb.soap.FileCreationStatus@75ec37c5] at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:117)
~[camel-core-2.22.0.jar:2.22.0] at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:333)
~[camel-core-2.22.0.jar:2.22.0] ... 40 common frames omitted

Reply via email to