2 Replies Latest reply on Jan 27, 2011 10:10 AM by Claus Ibsen

    soapjaxb not valid data format for marshal/unmarshal ?

    Richard Tomlinson Newbie

      soapjaxb seems to be a valid data format yet its not listed in the schema for unmarshal/marshal or UnmarshalDefinition as a valid element.   And yet, java examples show it being used (But no spring examples)?   Any reason for this?

       

      With this code which is along the lines of the examples:

       

               SoapJaxbDataFormat soap = new SoapJaxbDataFormat("co.uk.sysgen.poc.epic.services.clearance", new ServiceInterfaceStrategy(EpicServicePortType.class, false));

       

               from("direct:clearance").

               unmarshal(soap).

               log("Desoaped").

               process(new Processor() {

                     @Override

                     public void process(Exchange exchange) throws Exception {

                          // do something here to get into the right format

                     }

                }).

               to("cxfrs://bean://rsClient");

       

       

      I get:

       

      Caused by: java.lang.IllegalArgumentException: dataFormat must be specified

              at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:269)

              at org.apache.camel.model.DataFormatDefinition.getDataFormat(DataFormatDefinition.java:86)

              at org.apache.camel.model.DataFormatDefinition.getDataFormat(DataFormatDefinition.java:79)

              at org.apache.camel.model.UnmarshalDefinition.createProcessor(UnmarshalDefinition.java:123)

              at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:389)

              at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:169)

       

       

       

       

       

      And as an aside point very frequently I get the following thrown when deploying the same SU:

       

      Caused by: java.util.ConcurrentModificationException

              at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)

              at java.util.HashMap$KeyIterator.next(HashMap.java:828)

              at org.apache.camel.core.osgi.OsgiPackageScanClassResolver.find(OsgiPackageScanClassResolver.java:62)

              at org.apache.camel.impl.DefaultPackageScanClassResolver.findImplementations(DefaultPackageScanClassResolver.java:157)

              at org.apache.camel.spring.PackageScanRouteBuilderFinder.appendBuilders(PackageScanRouteBuilderFinder.java:59)

              at org.apache.camel.spring.CamelContextFactoryBean.findRouteBuildersByPackageScan(CamelContextFactoryBean.java:185)

              at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.findRouteBuilders(AbstractCamelContextFactoryBean.java:790)

              at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.afterPropertiesSet(AbstractCamelContextFactoryBean.java:315)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)

       

      Edited by: sysgen on Jan 27, 2011 2:22 PM