Hi Charles, I just noticed that your response message is org.apache.camel.example.reportincident.domain.OutputReportIncident and You request message using this QName. {http://reportincident.example.camel.apache.org}ReportIncident
So please check your backend WebService's wsdl file and wsdl/report_incident.wsdl's namespace. Willem cmoulliard wrote: > Hi, > > Even, if I use the following camel spring 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/cxf" > 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.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd > http://camel.apache.org/schema/cxf > http://camel.apache.org/schema/cxf/camel-cxf.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.ReportIncidentEndpointService"/> > > <bean id="OK" > class="org.apache.camel.example.reportincident.domain.OutputReportIncident"> > <property name="code" value="0"/> > </bean> > > <!-- 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:cxfEndpoint> > > <camelContext trace="true" xmlns="http://camel.apache.org/schema/osgi"> > > <camel:package>org.apache.camel.example.reportincident.routing</camel:package> > > <!-- File route --> > <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> > > <!-- CXF route --> > <camel:route> > <camel:from uri="cxf:bean:reportIncident" /> > <camel:convertBodyTo > type="org.apache.camel.example.reportincident.domain.InputReportIncident" /> > <camel:to uri="log:cxf" /> > <camel:transform> > <camel:method bean="OK" method="code"/> > </camel:transform> > </camel:route> > </camelContext> > </beans> > > I receive always the same error : > > INFO: Interceptor has thrown exception, unwinding now Message part > {http://reportincident.example.camel.apache.org}inputReportIncident was not > recognized. (Does it exist in service WSDL?) > > Questions : > > - How can I have more CXF tracing and the stack trace of the interceptor ? > - Does the problem comes from generation of the web service output reply ? > - Why the following message (in bold) is displayed in the console ? Is is > the root cause of my problem ? > > 05-mars-2009 12:47:11 > org.apache.cxf.service.factory.ReflectionServiceFactoryBean > initializeWSDLOperations > ATTENTION: Could not find a matching method for operation > {http://reportincident.example.camel.apache.org}ReportIncident. Operation > will be unavailable. > 05-mars-2009 12:47:11 org.apache.cxf.endpoint.ServerImpl initDestination > INFO: Setting the server's publish address to be > http://localhost:8080/camel-example/incident > 2009-03-05 12:47:11,469 DEBUG DefaultInstrumentationAgent - Registered MBean > with objectname: > org.apache.camel:context=WDBED0002003/camelContext,type=consumers,name=CxfConsumer(0x1bfeb82) > > 05-mars-2009 12:47:11 sun.reflect.NativeMethodAccessorImpl invoke0 > INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via > org.mortbay.log.Slf4jLog > 05-mars-2009 12:47:11 sun.reflect.NativeMethodAccessorImpl invoke0 > INFO: jetty-6.1.9 > 05-mars-2009 12:47:11 sun.reflect.NativeMethodAccessorImpl invoke0 > INFO: Started selectchannelconnec...@0.0.0.0:8080 > 2009-03-05 12:47:11,860 DEBUG DefaultInstrumentationAgent - Registered MBean > with objectname: > org.apache.camel:context=WDBED0002003/camelContext,type=routes,name="node1" > 2009-03-05 12:47:11,875 DEBUG DefaultInstrumentationAgent - Registered MBean > with objectname: > org.apache.camel:context=WDBED0002003/camelContext,type=consumers,name=FileConsumer(0x39826) > > 2009-03-05 12:47:11,875 INFO DefaultCamelContext - Apache Camel > 2.0-SNAPSHOT (CamelContext:camelContext) started > 2009-03-05 12:47:11,875 DEBUG DefaultComponent - Creating endpoint > uri=[spring-event:default], path=[default], parameters=[{}] > 2009-03-05 12:47:11,891 DEBUG DefaultCamelContext - spring-event:default > converted to endpoint: Endpoint[spring-event:default] by component: > org.apache.camel.component.event.eventcompon...@8ebb5a > 2009-03-05 12:47:11,891 DEBUG DefaultInstrumentationAgent - Registered MBean > with objectname: > org.apache.camel:context=WDBED0002003/camelContext,type=endpoints,name="spring-event:default\?id=0x20a20c46" > > 2009-03-05 12:47:12,000 DEBUG MainSupport - Starting Spring > ApplicationContext: > org.springframework.context.support.classpathxmlapplicationcont...@166bfd8 > 2009-03-05 12:47:12,000 DEBUG SpringCamelContext - Publishing spring-event: > org.springframework.context.event.contextstartedevent[source=org.springframework.context.support.classpathxmlapplicationcont...@166bfd8: > display name > [org.springframework.context.support.classpathxmlapplicationcont...@166bfd8]; > startup date [Thu Mar 05 12:47:04 CET 2009]; root of context hierarchy] > 2009-03-05 12:47:12,000 DEBUG DefaultListableBeanFactory - Returning cached > instance of singleton bean 'camelContext' > 2009-03-05 12:47:12,016 INFO MainSupport - Generating DOT file for routes: > C:\Workspace\osgi\reportincident.interfaces\target/site/cameldoc for: > org.apache.camel.spring.springcamelcont...@112d7ae with name: camelContext > 05-mars-2009 12:49:17 org.apache.cxf.phase.PhaseInterceptorChain doIntercept > INFO: Interceptor has thrown exception, unwinding now Message part > {http://reportincident.example.camel.apache.org}inputReportIncident was not > recognized. (Does it exist in service WSDL?) > > > Regards, > > Charles > > Claus Ibsen-2 wrote: >> Hi >> >> Ah the OK response in Spring DSL needs to be the model object >> generated by the wsdl schema. >> >> So you need to return a response as a object where you instantiate >> this object with OK as status. >> <constant> can only be used for string constants, so you need to set >> the body to that object. >> >> >> >> <transform> >> <method re="myResponseBean"/> >> <transform> >> >> And then create a bean with the id myResponse that returns the >> response object - ReportIncidentOuput, isn't that the name of that >> object? >> I can not remevber excacly >> >> >> On Wed, Mar 4, 2009 at 4:41 PM, cmoulliard <cmoulli...@gmail.com> wrote: >>> Hi, >>> >>> I try to run an camel-cxf project on SMX4. I have been able to package it >>> and deploy my project on SMX4. Unfortunately, when I call the following >>> url >>> from my browser, I receive an HTTP error 200 >>> >>> The log is not really verbose even in TRACE or DEBUG mode >>> >>> 16:34:58,178 | DEBUG | le/incident?wsdl | jetty >>> | >>> .service.internal.util.JCLLogger 85 | REQUEST /camel-example/incident >>> on >>> org.mortbay.jetty.httpconnect...@dddff >>> 16:34:58,303 | DEBUG | le/incident?wsdl | jetty >>> | >>> .service.internal.util.JCLLogger 85 | RESPONSE /camel-example/incident >>> 200 >>> >>> On the servicemix console, I see the following WARNING : >>> >>> Warning: The encoding 'UTF-8' is not supported by the Java runtime. >>> >>> Camel config : >>> >>> >>> <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.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.xsd"> >>> >>> <!-- not required for camel-cxf camel-cxf-2.0-SNAPSHOT >>> <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.ReportIncidentEndpointService"/> >>> >>> <bean id="OK" >>> class="org.apache.camel.example.reportincident.domain.OutputReportIncident"> >>> <property name="code" value="0"/> >>> </bean> >>> >>> <!-- 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" >>> /> >>> >>> >>> >>> <camelContext trace="true" >>> xmlns="http://camel.apache.org/schema/osgi"> >>> >>> <camel:package>org.apache.camel.example.reportincident.routing</camel:package> >>> >>> <!-- File route --> >>> <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> >>> >>> <!-- CXF route --> >>> <camel:route> >>> <camel:from uri="cxf:bean:reportIncident" /> >>> <camel:to uri="log:cxf" /> >>> <camel:convertBodyTo >>> type="org.apache.camel.example.reportincident.domain.InputReportIncident" >>> /> >>> <camel:to uri="log:cxf" /> >>> <camel:transform> >>> <camel:constant>OK</camel:constant> >>> </camel:transform> >>> </camel:route> >>> >>> >>> </camelContext> >>> </beans> >>> >>> Regards, >>> >>> Charles >>> >>> ----- >>> 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-on-SMX4-%3A-HTTP-error-200-in-the-log-tp22332508p22332508.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/ >> >> > > > ----- > Charles Moulliard > SOA Architect > > My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/