I have a route where i execute a curl command using Camel exec, which returns a JSON as response. I try convert the JSON to XML using
<unmarshal> <xmljson forceTopLevelObject="true" trimSpaces="true" rootName="response" skipNamespaces="true" removeNamespacePrefixes="true" expandableProperties="d e"/> </unmarshal> But i get an error about type conversion. This is my route XML, <route id="callAPI"> <from uri="direct:inter1" /> <to uri="exec:curl?args=--silent --cacert {{cacertFile}} --key {{keyFile}} --cert {{certFile}} -X GET {{host}}/ -u {{user}} --sslv3"/> <log message="Message Body ${body}" loggingLevel="INFO" /> <to uri="direct:inter2" /> </route> <route id="createToken"> <from uri="direct:inter2" /> <unmarshal> <xmljson forceTopLevelObject="true" trimSpaces="true" rootName="response" skipNamespaces="true" removeNamespacePrefixes="true" expandableProperties="d e"/> </unmarshal> <to uri="direct:inter3" /> This is the error i get Error during type conversion from type: org.apache.camel.component.exec.ExecResult to the required type: java.lang.String with value org.apache.camel.component.exec.ExecResult@62a65066 due java.lang.NullPointerException: org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.component.exec.ExecResult to the required type: java.lang.String with value org.apache.camel.component.exec.ExecResult@62a65066 due java.lang.NullPointerException Can anyone please let me know how to convert the output of exec command to String? -- View this message in context: http://camel.465427.n5.nabble.com/Converting-output-of-Camel-Exec-to-String-tp5771687.html Sent from the Camel - Users mailing list archive at Nabble.com.