FAQ
Hi,

I have a following question regarding camel:cxf component:
is it required for producer to use cxf:bean URI?

I expect that producer also works for uri without bean: uri="cxf://anAddress?options"

My problem that Camel tries to create a service (act as consumer) for following route:
<camelContext xmlns="http://camel.apache.org/schema/spring">
<camel:route>
<camel:from uri="timer://myTimer?fixedRate=true&amp;period=2000"/>
<camel:to uri="cxf://http://localhost:8088/mockFlightReservationSOAP?defaultOperationName=reserveFlight&amp;dataFormat=MESSAGE&amp;wsdlURL=file:///c:/1/wsdls/FlightReservation.wsdl"/>
</camel:route>
</camelContext>

Console output: "INFO: Creating Service {http://www.eclipse.org/swordfish/samples/FlightReservation/}FlightReservationService from WSDL: file:///c:/1/wsdls/FlightReservation.wsdl "

I expect that Camel tries to call external web service instead its creation.
Where is my error?

Regards,
Andrei.

Search Discussions

  • William Tam at Sep 28, 2011 at 4:42 pm
    Hi Andrei,

    cxf:bean is not required. The producer in cxf uri should work as you
    expected. There is quite a few of unit tests that cover producer uri
    expressed in just "cxf".

    Here is one example.

    https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerOperationTest.java

    return "cxf://" + getSimpleServerAddress()
    + "?serviceClass=org.apache.camel.component.cxf.HelloService"
    + "&defaultOperationName=" + ECHO_OPERATION;

    Regards.
    On 09/28/2011 12:14 PM, Andrei Shakirin wrote:
    Hi,

    I have a following question regarding camel:cxf component:
    is it required for producer to use cxf:bean URI?

    I expect that producer also works for uri without bean: uri="cxf://anAddress?options"

    My problem that Camel tries to create a service (act as consumer) for following route:
    <camelContext xmlns="http://camel.apache.org/schema/spring">
    <camel:route>
    <camel:from uri="timer://myTimer?fixedRate=true&amp;period=2000"/>
    <camel:to uri="cxf://http://localhost:8088/mockFlightReservationSOAP?defaultOperationName=reserveFlight&amp;dataFormat=MESSAGE&amp;wsdlURL=file:///c:/1/wsdls/FlightReservation.wsdl"/>
    </camel:route>
    </camelContext>

    Console output: "INFO: Creating Service {http://www.eclipse.org/swordfish/samples/FlightReservation/}FlightReservationService from WSDL: file:///c:/1/wsdls/FlightReservation.wsdl "

    I expect that Camel tries to call external web service instead its creation.
    Where is my error?

    Regards,
    Andrei.
  • Willem Jiang at Sep 29, 2011 at 1:28 am

    On 9/29/11 12:14 AM, Andrei Shakirin wrote:
    Hi,

    I have a following question regarding camel:cxf component:
    is it required for producer to use cxf:bean URI?

    I expect that producer also works for uri without bean: uri="cxf://anAddress?options"

    My problem that Camel tries to create a service (act as consumer) for following route:
    <camelContext xmlns="http://camel.apache.org/schema/spring">
    <camel:route>
    <camel:from uri="timer://myTimer?fixedRate=true&amp;period=2000"/>
    <camel:to uri="cxf://http://localhost:8088/mockFlightReservationSOAP?defaultOperationName=reserveFlight&amp;dataFormat=MESSAGE&amp;wsdlURL=file:///c:/1/wsdls/FlightReservation.wsdl"/>
    </camel:route>
    </camelContext>

    Console output: "INFO: Creating Service {http://www.eclipse.org/swordfish/samples/FlightReservation/}FlightReservationService from WSDL: file:///c:/1/wsdls/FlightReservation.wsdl "
    This console output is telling you CXF is creating a service module to
    use from the WSDL file that you give.
    At the mean time, CXF support to build the service module from SEI.
    I expect that Camel tries to call external web service instead its creation.
    Where is my error?
    CXF need to build the service module before sending the invocation to
    the external web service.
    Regards,
    Andrei.

    --
    Willem
    ----------------------------------
    FuseSource
    Web: http://www.fusesource.com
    Blog: http://willemjiang.blogspot.com (English)
    http://jnn.javaeye.com (Chinese)
    Twitter: willemjiang
    Weibo: willemjiang
  • Andrei Shakirin at Sep 30, 2011 at 7:23 am
    Yep,
    Thanks - it is really so.
    Logging was switched off and didn't see apropriate error messages.

    Regards,
    Andrei.

    -----Original Message-----
    From: Willem Jiang
    Sent: 29 September 2011 03:28
    To: users@camel.apache.org
    Subject: Re: Camel CXF producer without "cxf:bean" in uri
    On 9/29/11 12:14 AM, Andrei Shakirin wrote:
    Hi,

    I have a following question regarding camel:cxf component:
    is it required for producer to use cxf:bean URI?

    I expect that producer also works for uri without bean: uri="cxf://anAddress?options"

    My problem that Camel tries to create a service (act as consumer) for following route:
    <camelContext xmlns="http://camel.apache.org/schema/spring">
    <camel:route>
    <camel:from uri="timer://myTimer?fixedRate=true&amp;period=2000"/>
    <camel:to uri="cxf://http://localhost:8088/mockFlightReservationSOAP?defaultOperationName=reserveFlight&amp;dataFormat=MESSAGE&amp;wsdlURL=file:///c:/1/wsdls/FlightReservation.wsdl"/>
    </camel:route>
    </camelContext>

    Console output: "INFO: Creating Service {http://www.eclipse.org/swordfish/samples/FlightReservation/}FlightReservationService from WSDL: file:///c:/1/wsdls/FlightReservation.wsdl "
    This console output is telling you CXF is creating a service module to use from the WSDL file that you give.
    At the mean time, CXF support to build the service module from SEI.
    I expect that Camel tries to call external web service instead its creation.
    Where is my error?
    CXF need to build the service module before sending the invocation to the external web service.
    Regards,
    Andrei.

    --
    Willem
    ----------------------------------
    FuseSource
    Web: http://www.fusesource.com
    Blog: http://willemjiang.blogspot.com (English)
    http://jnn.javaeye.com (Chinese)
    Twitter: willemjiang
    Weibo: willemjiang

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedSep 28, '11 at 4:15p
activeSep 30, '11 at 7:23a
posts4
users3
websitecamel.apache.org

People

Translate

site design / logo © 2022 Grokbase