Thanks Willem. I'll get the Camel docs updated with this information while I finish my blog entry on the Camel sample.
Glen 2008-04-19 Willem Jiang wrote: > Hi Glen, > > My comments are in the mail. > > Glen Mazza wrote: > > Hello again, I have a few more questions. I'm using a CXF-based web > > service provider running on Tomcat, using CXF's JAX-WS front end. Its > > WSDL is located on my machine as follows: > > http://localhost:8080/doubleit/services/doubleit?wsdl. > > > > Questions about the CXF component page[1]: > > > > 1.) Using this type of URI: "cxf://address?options", which of the > > options--wsdlURL, serviceClass, serviceName, portName--do I have to > > provide? It seems strange to need to provide any of these options, > > because the first can be obtained via "?wsdl" by default, the second is > > not necessarily known by the client, and the third and fourth are > > readable from the WSDL--perhaps these options are needed only by CXF's > > simple frontend? > > > Yes , the endpoint's address can get from the WSDL , but if the WSDL has > more than two ServiceNames or PortNames, you need to specify the right > one that you want. > The URI "cxf://address?options" is common pattern for cxf endpoint ( not > only the CXF provider but also CXF consumer), and camel-cxf component > can't know which frontend will be used if it do not check the annotation > from the serviceClass, so the serviceClass and address in required > parameter for the camel-cxf component, the others parameters are optional. > > 2.) Using the same type of URI, how do I specify the wsdl:operation I > > wish to be calling? I.e., if my wsdl has doubleIt, tripleIt, and > > quadrupleIt wsdl:operations, how do I specify the one that I want? > > > You can't specify the operation name by using the URI such as the > methodName now, since I want to the camel-cxf endpoint provider can > invoke more than one operation. > You can change the operation name by setting the message header with the > cxfConstants.OPERATION_NAME. > You can find the example here [1] > [1]https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerRouterTest.java > > Thanks, > > Glen > > > > > > [1] http://activemq.apache.org/camel/cxf.html > > > > > > 2008-04-09 Willem Jiang wrote: > > > >> Hi Glen, > >> > >> From your requirement , you need to start a "DoubleIt" web service your > >> self, maybe the same time that Camel context start. > >> > >> Here is the code snippet for setting up the router. > >> > >> from("test-jms:queue:test.queue").to("cxf://http://SERVICEADDRES?SEI=yourSEI...").to("file://test"); > >> > >> If you just feed the queue with a series of numbers, you need to change > >> the message for the "DoubleIt" web service in a processer first. > >> Here is an example[1] to show you how to make a web service call by > >> setting the message header with the Web service operation name , and > >> message body with the parameters. You can get the result from the > >> exchange.getOut().getBody(), which is a list. > >> > >> [1]https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java > >> > >> Willem. > >> > >> > >> Glen Mazza wrote: > >> > >>> Hello, > >>> > >>> I'm trying to create a Camel example so I can learn more about the > >>> product. What I'd like to do is feed a queue a series of numbers, which > >>> would automatically be fed as the lone parameter to a "DoubleIt" web > >>> service, the output of which (i.e., the input number doubled in value) > >>> would then be fed to a file. > >>> > >>> I understand how to write from a message queue to a file from this > >>> example[1], and also, the camel-cxf example[2] gives me a pretty good > >>> idea of how web service calls are made, but I'm not sure how to have a > >>> web service automatically activated based on what is fed through a > >>> queue; further, how to have the number that is fed into the queue serve > >>> as the lone parameter to that web service call (which component, if any, > >>> must occur between the queue and the web service so the number off the > >>> queue is put into the SOAP request.) Any guidance or known samples > >>> would be appreciated. > >>> > >>> Thanks, > >>> Glen > >>> > >>> [1] http://activemq.apache.org/camel/walk-through-an-example.html > >>> [2] http://activemq.apache.org/camel/cxf-example.html > >>> > >>> > >>> > >>> > >>> > > > > > > > Willem
