You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by cmoulliard <cm...@gmail.com> on 2009/03/04 16:41:07 UTC
camel-cxf on SMX4 : HTTP error 200 in the log
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.HttpConnection@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.
Re: camel-cxf on SMX4 : HTTP error 200 in the log
Posted by cmoulliard <cm...@gmail.com>.
By the way, this is not the root cause of my issue. I continue to have the
following answer :
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Message part
{http://reportincident.example.camel.apache.org}inputReportIncident was not
recognized. (Does it exist in service WSDL?)</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
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 <cm...@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.HttpConnection@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/
--
View this message in context: http://www.nabble.com/camel-cxf-on-SMX4-%3A-HTTP-error-200-in-the-log-tp22332508p22333679.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-cxf on SMX4 : HTTP error 200 in the log
Posted by cmoulliard <cm...@gmail.com>.
Many thanks Willem.
I will check my config.
willem.jiang wrote:
>
> 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 SelectChannelConnector@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.EventComponent@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.ClassPathXmlApplicationContext@166bfd8
>> 2009-03-05 12:47:12,000 DEBUG SpringCamelContext - Publishing
>> spring-event:
>> org.springframework.context.event.ContextStartedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@166bfd8:
>> display name
>> [org.springframework.context.support.ClassPathXmlApplicationContext@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.SpringCamelContext@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 <cm...@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.HttpConnection@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/
>
>
>
-----
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-tp22332508p22352600.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-cxf on SMX4 : HTTP error 200 in the log
Posted by Willem Jiang <wi...@gmail.com>.
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 SelectChannelConnector@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.EventComponent@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.ClassPathXmlApplicationContext@166bfd8
> 2009-03-05 12:47:12,000 DEBUG SpringCamelContext - Publishing spring-event:
> org.springframework.context.event.ContextStartedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@166bfd8:
> display name
> [org.springframework.context.support.ClassPathXmlApplicationContext@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.SpringCamelContext@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 <cm...@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.HttpConnection@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/
Re: camel-cxf on SMX4 : HTTP error 200 in the log
Posted by cmoulliard <cm...@gmail.com>.
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 SelectChannelConnector@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.EventComponent@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.ClassPathXmlApplicationContext@166bfd8
2009-03-05 12:47:12,000 DEBUG SpringCamelContext - Publishing spring-event:
org.springframework.context.event.ContextStartedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@166bfd8:
display name
[org.springframework.context.support.ClassPathXmlApplicationContext@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.SpringCamelContext@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 <cm...@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.HttpConnection@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/
--
View this message in context: http://www.nabble.com/camel-cxf-on-SMX4-%3A-HTTP-error-200-in-the-log-tp22332508p22349888.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-cxf on SMX4 : HTTP error 200 in the log
Posted by cmoulliard <cm...@gmail.com>.
Claus,
In the spring schema, I see the following parameter when we would like to
call a method
<xs:complexType name="methodCallExpression">
<xs:simpleContent>
<xs:extension base="tns:expressionType">
<xs:attribute name="bean" type="xs:string"/>
<xs:attribute name="method" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
I presume that correct syntax is the following :
<camel:transform>
<camel:method bean="OK" method="code"/>
</camel:transform>
Regards
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 <cm...@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.HttpConnection@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/
--
View this message in context: http://www.nabble.com/camel-cxf-on-SMX4-%3A-HTTP-error-200-in-the-log-tp22332508p22333572.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-cxf on SMX4 : HTTP error 200 in the log
Posted by Claus Ibsen <cl...@gmail.com>.
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 <cm...@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.HttpConnection@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/