I think you hit a bug that CxfEndpointBean's bean property map not
getting merged.  I'll look into it.

On Wed, Mar 4, 2009 at 10:57 AM, cmoulliard <[email protected]> wrote:
>
> In fact, I think that I don't use the correct syntax. Here is the good one :
>
>    <!-- webservice endpoint -->
>    <cxf:cxfEndpoint id="reportIncident"
>                     address="http://localhost:8080/camel-example/incident";
>                     wsdlURL="wsdl/report_incident.wsdl"
>                     serviceClass="#reportIncidentEndpoint"
>                     endpointName="s:ReportIncidentPort"
>                     serviceName="s:ReportIncidentService"
>
> xmlns:s="http://reportincident.example.camel.apache.org";>
>                     <cxf:properties>
>                                        <entry key="dataFormat" 
> value="PAYLOAD"/>
>                     </cxf:properties>
>    </cxf:cxfEndpoint>
>
> Unfortunately, this config generates the following error :
>
> 2009-03-04 16:54:30,740 ERROR MainSupport - Failed:
> java.lang.IllegalArgumentException: serviceClass must be specified
> java.lang.IllegalArgumentException: serviceClass must be specified
>        at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:170)
>        at
> org.apache.camel.component.cxf.CxfSpringEndpoint.createServerFactoryBean(CxfSpringEndpoint.java:150)
>        at 
> org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:46)
>        at
> org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:95)
>        at
> org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:62)
>        at org.apache.camel.Route.getServicesForRoute(Route.java:74)
>        at org.apache.camel.impl.RouteService.doStart(RouteService.java:77)
>        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
>        at
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:743)
>        at
> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:165)
>        at
> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:160)
>        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
>        at
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:95)
>        at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:114)
>        at
> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>        at
> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>        at
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>        at
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
>        at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
>        at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
>        at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>        at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>        at
> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
>        at org.apache.camel.spring.Main.doStart(Main.java:186)
>        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
>        at org.apache.camel.util.MainSupport.run(MainSupport.java:121)
>        at org.apache.camel.util.MainSupport.run(MainSupport.java:299)
>        at org.apache.camel.spring.Main.main(Main.java:98)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:396)
>        at java.lang.Thread.run(Thread.java:619)
>
>
>
> cmoulliard wrote:
>>
>> Hi,
>>
>> In the documentation of the component camel-cxf, it is mentioned that we
>> can define the dataformat. When I set this parameter in my spring DSL, I
>> receive the following error :
>>
>> Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2:
>> Attribute 'dataFormat' is not allowed to appear in element
>> 'cxf:cxfEndpoint'.
>>
>>     <!-- webservice endpoint -->
>>     <cxf:cxfEndpoint id="reportIncident"
>>
>> address="http://localhost:8080/camel-example/incident";
>>                      wsdlURL="wsdl/report_incident.wsdl"
>>                      dataFormat="PAYLOAD"
>>                      serviceClass="#reportIncidentEndpoint"
>>                      endpointName="s:ReportIncidentPort"
>>                      serviceName="s:ReportIncidentService"
>>
>> xmlns:s="http://reportincident.example.camel.apache.org";
>>      />
>>
>> Is it a mistake of me or an error ?
>>
>> Regards,
>>
>>
>>
>
>
> -----
> Charles Moulliard
> SOA Architect
>
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
> --
> View this message in context: 
> http://www.nabble.com/camel-cxf---dataformat-tp22332652p22332877.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Reply via email to