camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: JAXB-Unmarshalling of soap xml including schema validation
Date Wed, 21 May 2014 08:07:25 GMT
You can create the SoapJaxbDataFormat directly inside your RouteBuilder if you like.

I’m going to add setSchema method to the org.apache.camel.model.dataformat.SoapJaxbDataFormat
which could be used as DataFormatDefinition in DSL.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On May 21, 2014 at 3:49:40 PM, james555 (luke333@gmx.net) wrote:
>  
> Hi Willem,
>  
> a little bit confusing, but now I got it. In my code I used "import
> org.apache.camel.model.dataformat.SoapJaxbDataFormat;" where setSchema is an  
> invalid method. Compared with your testcase "import
> org.apache.camel.dataformat.soap.SoapJaxbDataFormat;" with setSchema method  
> is used, thanks !
>  
> Sideeffect of the two existing SoapJaxbDataFormat classes:
> I define my SoapJaxbDataFormat in a servlet scenario with a
> CamelContextLifecycle. Since
> "org.apache.camel.dataformat.soap.SoapJaxbDataFormat" is not a
> "DataFormatDefinition" I can't use
>  
> e.g.
> camelContext.getDataFormats().put("soapJaxbDataFormat", soapJaxbDataFormat);  
>  
> to access the SoapJaxbDataFormat in a RouteBuilder comfortably (Compiler
> says: "The method put(String, DataFormatDefinition) in the type
> Map is not applicable for the arguments
> (String, SoapJaxbDataFormat)". Is that meant to be ? As a workaround I now
> have to use the Registry with bean binding:
>  
> e.g.
> registry.bind("soapJaxbDataFormat", soapJaxbDataFormat);
>  
> Is there a better way to access SoapJaxbDataFormat ?
>  
> big thanks !
>  
> james
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/JAXB-Unmarshalling-of-soap-xml-including-schema-validation-tp5751290p5751406.html
 
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  


Mime
View raw message