Hi

You need the camel: prefix to use the same namespace as the other stuff

camel:convertBodyTo


On Tue, Mar 3, 2009 at 5:34 PM, cmoulliard <[email protected]> wrote:
>
> Hi,
>
> The following syntax in my spring DSL
>
> <convertBodyTo
> type="org.apache.camel.example.reportincident.domain.InputReportIncident" />
>
> generates an error :
>
> Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
> content was found starting with element 'convertBodyTo'. One of
> '{"http://camel.apache.org/schema/spring":from,
> "http://camel.apache.org/schema/spring":aggregate,
> "http://camel.apache.org/schema/spring":bean,
> "http://camel.apache.org/schema/spring":catch,
> "http://camel.apache.org/schema/spring":choice,
> "http://camel.apache.org/schema/spring":when,
> "http://camel.apache.org/schema/spring":otherwise,
> "http://camel.apache.org/schema/spring":convertBodyTo,
> "http://camel.apache.org/schema/spring":delay,
> "http://camel.apache.org/schema/spring":enrich,
> "http://camel.apache.org/schema/spring":onException,
> "http://camel.apache.org/schema/spring":filter,
> "http://camel.apache.org/schema/spring":finally,
> "http://camel.apache.org/schema/spring":handleFault,
> "http://camel.apache.org/schema/spring":interceptor,
> "http://camel.apache.org/schema/spring":idempotentConsumer,
> "http://camel.apache.org/schema/spring":inOnly,
> "http://camel.apache.org/schema/spring":inOut,
> "http://camel.apache.org/schema/spring":intercept,
> "http://camel.apache.org/schema/spring":loadBalance,
> "http://camel.apache.org/schema/spring":loop,
> "http://camel.apache.org/schema/spring":marshal,
> "http://camel.apache.org/schema/spring":multicast,
> "http://camel.apache.org/schema/spring":pipeline,
> "http://camel.apache.org/schema/spring":policy,
> "http://camel.apache.org/schema/spring":proceed,
> "http://camel.apache.org/schema/spring":process,
> "http://camel.apache.org/schema/spring":recipientList,
> "http://camel.apache.org/schema/spring":removeHeader,
> "http://camel.apache.org/schema/spring":removeProperty,
> "http://camel.apache.org/schema/spring":resequence,
> "http://camel.apache.org/schema/spring":route,
> "http://camel.apache.org/schema/spring":routingSlip,
> "http://camel.apache.org/schema/spring":setBody,
> "http://camel.apache.org/schema/spring":setExchangePattern,
> "http://camel.apache.org/schema/spring":setHeader,
> "http://camel.apache.org/schema/spring":setOutHeader,
> "http://camel.apache.org/schema/spring":setProperty,
> "http://camel.apache.org/schema/spring":sort,
> "http://camel.apache.org/schema/spring":split,
> "http://camel.apache.org/schema/spring":stop,
> "http://camel.apache.org/schema/spring":thread,
> "http://camel.apache.org/schema/spring":throttle,
> "http://camel.apache.org/schema/spring":throwFault,
> "http://camel.apache.org/schema/spring":to,
> "http://camel.apache.org/schema/spring":transform,
> "http://camel.apache.org/schema/spring":try,
> "http://camel.apache.org/schema/spring":unmarshal}' is expected.
>        at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
>
>
> Here is the dsl :
>
> <beans xmlns="http://www.springframework.org/schema/beans";
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xmlns:camel="http://camel.apache.org/schema/spring";
>        xmlns:cxf="http://camel.apache.org/schema/cxfEndpoint";
>        xsi:schemaLocation=" http://www.springframework.org/schema/beans
>                
> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>                http://camel.apache.org/schema/osgi
>                http://camel.apache.org/schema/osgi/camel-osgi-2.0-SNAPSHOT.xsd
>                http://camel.apache.org/schema/spring
>                http://camel.apache.org/schema/spring/camel-spring.xsd
>                http://camel.apache.org/schema/cxfEndpoint
>                http://camel.apache.org/schema/cxf/camel-cxf-2.0-SNAPSHOT.xsd";>
>
>        <!-- not required for camel-cxf
>    <import resource="classpath:META-INF/cxf/cxf.xml"/>
>    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
>    <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
>         -->
>
>        <bean id="bindyDataformat"
>                  
> class="org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat">
>             <constructor-arg type="java.lang.String"
> value="org.apache.camel.example.reportincident.model" />
>        </bean>
>
>        <bean id="csv" 
> class="org.apache.camel.example.reportincident.csv.CsvBean"
> />
>
>        <bean id="reportIncidentEndpoint"
> class="org.apache.camel.example.reportincident.service.ReportIncidentEndpoint"/>
>
>    <!-- webservice endpoint -->
>    <cxf:cxfEndpoint id="reportIncident"
>                     address="/incident"
>                     wsdlURL="/wsdl/report_incident.xml"
>                     serviceClass="#reportIncidentEndpoint"
>                     endpointName="s:ReportIncidentPort"
>                     serviceName="s:ReportIncidentService"
>
> xmlns:s="http://reportincident.example.camel.apache.org";
>     />
>
>        <camelContext xmlns="http://camel.apache.org/schema/osgi";>
>
> <camel:package>org.apache.camel.example.reportincident.routing</camel:package>
>                <camel:route>
>                        <camel:from
> uri="file://d:/temp/data/?moveExpression=d:/temp/done/${file:name}" />
>                        <camel:unmarshal ref="bindyDataformat" />
>                        <camel:to uri="bean:csv" />
>                </camel:route>
>
>                <camel:route>
>                        <camel:from     uri="cxf:bean:reportIncident" />
>                        <convertBodyTo
> type="org.apache.camel.example.reportincident.domain.InputReportIncident" />
>                        <camel:to uri="log:cxf" />
>                </camel:route>
>
>        </camelContext>
> </beans>
>
> Regards,
>
>
>
>
>
> -----
> Charles Moulliard
> SOA Architect
>
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
> --
> View this message in context: 
> http://www.nabble.com/convertBodyTo---spring-DSL-generates-error-in-camel-2.0-snapshot-tp22312331p22312331.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Reply via email to