Ooops!

Sorry, disregard this message. I also have an XSL transformation in there which is probably what messes things up. Please disregard for the time being.


Alexandros Karypidis wrote:
Hi,

I use conversion from an XML "Source" object to a "String" at some point in my route. The default conversion seems adds a new-line character after each element. This breaks my integration because in my case, the message is a SOAP envelope with WS-Security headers regarding a signed element.

Is there a way to get around this? All I need is for the XML to become a "String" in an "as-is" manner (with no formatting). My current (Spring) configuration is:

   ...
   xmlns:camel-cfg="http://camel.apache.org/schema/spring";
   xmlns:camel-cxf="http://camel.apache.org/schema/cxf";
   ...
   <camel-cfg:camelContext id="camelContext" trace="true" >
       <camel-cfg:route>
           <camel-cfg:from uri="cxf:bean:myWebServiceProvider" />
           <camel-cfg:convertBodyTo type="java.lang.String" />
           <camel-cfg:to uri="jms:queue:weblogic/my-Queue-0" />
           <camel-cfg:to uri="file:///fileEavesdropMSG-IN/" />
       </camel-cfg:route>
   </camel-cfg:camelContext>

If I don't convert to String, the message doesn't get into the JMS queue. If I do, the message's signature breaks...

Thanks in advance,
Alex

P.S. If it matters, the provider class (which uses Provider<Source>) looks like this:

@WebServiceProvider(targetNamespace = "...", serviceName = "...", portName = "...", wsdlLocation = "...")
@ServiceMode(Mode.MESSAGE)
@BindingType(value = HTTPBinding.HTTP_BINDING)
public class MyMessagingServiceProvider implements Provider<Source> {
...

Reply via email to