Re: How Do We Specify Operation To Choose In Camel CXf
Using Camel-CXF 2.16.1 It looks Endpoint configuration taken care of configuring the operation and operation Name space we need to call. Somehow that is not working. My xml throws the error “org.xml.sax.SAXParseException; lineNumber: 46; columnNumber: 61; cvc-complex-type.3.2.2: Attribute 'defaultOperationName' is not allowed to appear in element 'cxf:cxfEndpoint'.:org.xml.sax.SAXParseException:cvc-complex-type.3.2.2: Attribute 'defaultOperationName' is not allowed to appear in element 'cxf:cxfEndpoint'.” While deployment. End point configuration during the above error is http://localhost:7001/MTILogger/webservices/logger; endpointName="s:LoggerEndpoint" serviceName="s:LoggerEndpointService" wsdlURL="http://localhost:7001/MTILogger/webservices/logger?wsdl; serviceClass="com.adp.taxmod.logger.LoggerEndpoint" xmlns:s="http://logger.taxmod.adp.com; defaultOperationName="Logger" defaultOperationNamespace="http://logger.taxmod.adp.com"/> I know, there is a work around using CXFConstants, But we wanted to be part of the configuration. Thanks, -- View this message in context: http://camel.465427.n5.nabble.com/How-Do-We-Specify-Operation-To-Choose-In-Camel-CXf-tp474620p5778755.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How Do We Specify Operation To Choose In Camel CXf
My bad, I used the dataFormat as MESSAGE and it seems the operation name is available only in case of dataFormat = PAYLOAD. It works for me with dataFormat = PAYLOAD. Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/How-Do-We-Specify-Operation-To-Choose-In-Camel-CXf-tp474620p5717596.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How Do We Specify Operation To Choose In Camel CXf
When you chose MESSAGE data format, camel-cxf will not read the content and it is impossible to know the operation name without help of the soap action header. If you chose PAYLOAD or POJO, you should be able to get the operation name from the message header. -- Willem Jiang FuseSource Web: http://www.fusesource.com (http://www.fusesource.com/) Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: willemjiang On Friday, August 17, 2012 at 5:10 PM, anupamsen wrote: My bad, I used the dataFormat as MESSAGE and it seems the operation name is available only in case of dataFormat = PAYLOAD. It works for me with dataFormat = PAYLOAD. Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/How-Do-We-Specify-Operation-To-Choose-In-Camel-CXf-tp474620p5717596.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: How Do We Specify Operation To Choose In Camel CXf
http://camel.465427.n5.nabble.com/file/n5717466/camel-example-cxf-proxy.rar camel-example-cxf-proxy.rar I have this in the attached project. But the issue is that the operation name header is not displayed on teh incoming request. I have used the following - to uri=log:before?showHeaders=true/ -- View this message in context: http://camel.465427.n5.nabble.com/How-Do-We-Specify-Operation-To-Choose-In-Camel-CXf-tp474620p5717466.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How Do We Specify Operation To Choose In Camel CXf
Hi There, I have a similar short of issue. The problem is with the producer end. That is the from side of the route I want to chose an operation. route from uri=cxf:bean:reportIncident/ . /route Camel allows having only one endpoint at a single address like the following- cxf:cxfEndpoint id=reportIncident address=http://localhost:${proxy.port}/camel-example-cxf-proxy/webservices/ReportIncident; endpointName=s:ReportIncidentEndpoint serviceName=s:ReportIncidentEndpointService wsdlURL=etc/report_incident.wsdl xmlns:s=http://reportincident.example.camel.apache.org; cxf:properties But, in the endpoint I may have multiple operations (eg. reportCriticalIncidents, reportSmallIncidents etc.). I want to trigger different workflow based on the method being called rather than have a single entry point for the entire web service. Does camel provide facility to route based on the method/operation of an endpoint? -- View this message in context: http://camel.465427.n5.nabble.com/How-Do-We-Specify-Operation-To-Choose-In-Camel-CXf-tp474620p5716965.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How Do We Specify Operation To Choose In Camel CXf
Once the message is routing to the next endpoint, you should be able to tell the operation by looking up the message header of operationName, then you can use the CBR[1] to do the work as you want. .when(header(operationName).isEqualTo(reportCriticalIncidents)).to(direct:route1) .when(header(operationName).isEqualTo(reportSmallIncidents)).to(direct:route2) [1]http://camel.apache.org/content-based-router.html -- Willem Jiang On Wednesday, August 8, 2012 at 2:39 PM, anupamsen wrote: Hi There, I have a similar short of issue. The problem is with the producer end. That is the from side of the route I want to chose an operation. route from uri=cxf:bean:reportIncident/ . /route Camel allows having only one endpoint at a single address like the following- cxf:cxfEndpoint id=reportIncident address=http://localhost:${proxy.port}/camel-example-cxf-proxy/webservices/ReportIncident; endpointName=s:ReportIncidentEndpoint serviceName=s:ReportIncidentEndpointService wsdlURL=etc/report_incident.wsdl xmlns:s=http://reportincident.example.camel.apache.org; cxf:properties But, in the endpoint I may have multiple operations (eg. reportCriticalIncidents, reportSmallIncidents etc.). I want to trigger different workflow based on the method being called rather than have a single entry point for the entire web service. Does camel provide facility to route based on the method/operation of an endpoint? -- View this message in context: http://camel.465427.n5.nabble.com/How-Do-We-Specify-Operation-To-Choose-In-Camel-CXf-tp474620p5716965.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: How Do We Specify Operation To Choose In Camel CXf
Claus Ibsen wrote: On Tue, Jun 1, 2010 at 8:40 PM, Jon Anstey jans...@gmail.com wrote: You just have to set the operationName header before invoking the CXF endpoint. Something like this if you want to do this within a route: ... setHeader headerName=operationName constantmyOperation/constant /setHeader to uri=cxf:bean:myCXFEndpointBeanWith2Operations/ ... Btw why can't you set the operationName on the endpoint uri directly as well? Just as you can use the method parameter on the bean endpoint. to uri=cxf:bean:myCXFEndpointBeanWith2Operations?operationName=fooMethod/ And CXF ought to throw an ambiguous exception in case it cannot pick the method, just as the bean component would do. Good suggestion, we should support to specify the operationName and operationNamespace from the URI, I just create a JIRA[1] for it. [1]https://issues.apache.org/activemq/browse/CAMEL-2780 Willem On Tue, Jun 1, 2010 at 4:01 PM, Carlo Camerino carlo.camer...@gmail.comwrote: Hi, how do you specify the operation which camel will use. In the documentation, you can specify the service name and the port name but you can't specify the operation. i have two operations with the same type of arguments. camel seems to choose one but i don't know how camel is choosing it. thanks carlo -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: How Do We Specify Operation To Choose In Camel CXf
It is fine to create a property for default operation to be invoke On 06/02/2010 12:00 AM, Claus Ibsen wrote: On Tue, Jun 1, 2010 at 8:40 PM, Jon Ansteyjans...@gmail.com wrote: You just have to set the operationName header before invoking the CXF endpoint. Something like this if you want to do this within a route: ... setHeader headerName=operationName constantmyOperation/constant /setHeader to uri=cxf:bean:myCXFEndpointBeanWith2Operations/ ... Btw why can't you set the operationName on the endpoint uri directly as well? Just as you can use the method parameter on the bean endpoint. to uri=cxf:bean:myCXFEndpointBeanWith2Operations?operationName=fooMethod/ And CXF ought to throw an ambiguous exception in case it cannot pick the method, just as the bean component would do. A endpoint can support 10 operations all with different arguments. I'd say it is a best practice to always set the operationName header so you are sure which operation you are calling. Adding a default operation property in the URI is probably a good idea. On Tue, Jun 1, 2010 at 4:01 PM, Carlo Camerinocarlo.camer...@gmail.comwrote: Hi, how do you specify the operation which camel will use. In the documentation, you can specify the service name and the port name but you can't specify the operation. i have two operations with the same type of arguments. camel seems to choose one but i don't know how camel is choosing it. thanks carlo -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
How Do We Specify Operation To Choose In Camel CXf
Hi, how do you specify the operation which camel will use. In the documentation, you can specify the service name and the port name but you can't specify the operation. i have two operations with the same type of arguments. camel seems to choose one but i don't know how camel is choosing it. thanks carlo
Re: How Do We Specify Operation To Choose In Camel CXf
You just have to set the operationName header before invoking the CXF endpoint. Something like this if you want to do this within a route: ... setHeader headerName=operationName constantmyOperation/constant /setHeader to uri=cxf:bean:myCXFEndpointBeanWith2Operations/ ... On Tue, Jun 1, 2010 at 4:01 PM, Carlo Camerino carlo.camer...@gmail.comwrote: Hi, how do you specify the operation which camel will use. In the documentation, you can specify the service name and the port name but you can't specify the operation. i have two operations with the same type of arguments. camel seems to choose one but i don't know how camel is choosing it. thanks carlo -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: How Do We Specify Operation To Choose In Camel CXf
oh great it works thanks On Wed, Jun 2, 2010 at 2:40 AM, Jon Anstey jans...@gmail.com wrote: You just have to set the operationName header before invoking the CXF endpoint. Something like this if you want to do this within a route: ... setHeader headerName=operationName constantmyOperation/constant /setHeader to uri=cxf:bean:myCXFEndpointBeanWith2Operations/ ... On Tue, Jun 1, 2010 at 4:01 PM, Carlo Camerino carlo.camer...@gmail.com wrote: Hi, how do you specify the operation which camel will use. In the documentation, you can specify the service name and the port name but you can't specify the operation. i have two operations with the same type of arguments. camel seems to choose one but i don't know how camel is choosing it. thanks carlo -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: How Do We Specify Operation To Choose In Camel CXf
On Tue, Jun 1, 2010 at 8:40 PM, Jon Anstey jans...@gmail.com wrote: You just have to set the operationName header before invoking the CXF endpoint. Something like this if you want to do this within a route: ... setHeader headerName=operationName constantmyOperation/constant /setHeader to uri=cxf:bean:myCXFEndpointBeanWith2Operations/ ... Btw why can't you set the operationName on the endpoint uri directly as well? Just as you can use the method parameter on the bean endpoint. to uri=cxf:bean:myCXFEndpointBeanWith2Operations?operationName=fooMethod/ And CXF ought to throw an ambiguous exception in case it cannot pick the method, just as the bean component would do. On Tue, Jun 1, 2010 at 4:01 PM, Carlo Camerino carlo.camer...@gmail.comwrote: Hi, how do you specify the operation which camel will use. In the documentation, you can specify the service name and the port name but you can't specify the operation. i have two operations with the same type of arguments. camel seems to choose one but i don't know how camel is choosing it. thanks carlo -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus