camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Camel CXF Spring Tomcat configuration
Date Mon, 11 Feb 2008 05:39:12 GMT
Hi Aswin

My comments are in the mail.
aswin.nair wrote:
> Hello Willem,
>   
>
> willem.jiang wrote:
>   
>> After I went through your mail , I think you are already starting the 
>> servlet transport for CXF
>> by loading the bus with the CXF Servlet transport.
>>
>>     
>  Yes I had the servlet transport working after I changed the service name of
> the Camel CXF component from cfx to camelcfx. I think we can configure the
> endpoints using the camel configuration for that, but if we need to import
> the default CXF configurations we may have the conflict. 
>   
[Willem] I got that , since "cxf" is used for the CXF bus instance in 
the Spring context ,we need to resolve
 the conflict of cxf and camel-cxf component.
>
> willem.jiang wrote:
>   
>> To be honestly , I do not write any test code for the WebServiceProvider 
>> in camel-cxf component.
>> So you may meet some trouble when  you start up the WebServiceProvider  
>> in  camel context,
>> and patches are welcomed :)
>>
>>     
> Sure. 
>
>
> willem.jiang wrote:
>   
>> 1. Starting the CXF endpoint by call the JAXWS API (not by starting 
>> camel context in spring)
>> 2. Then starting the camel context in your Provider implement code (you 
>> could start the camel
>> context here), and routing the message to various processors
>>
>>     
> We already have a similar thing, but I think the approach like what you have
> for the WebService SEI would be really nice as the routes would be more
> descriptive.
>   
[Willem] Can you show me the SEI that you have in your project?
camel-cxf consumer component pass the message to the router in three 
different
 data formate. 
They are PAYLOAD, MESSAGE, POJO
You can find the more information by reading the comments in the 
DataFormat.java[1]
[1]https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java

Now I am working on the refactoring work CAMEL-312 [2] , and if you have any
 requirement please free to add comment on the JIRA
[2]https://issues.apache.org/activemq/browse/CAMEL-312
>
> willem.jiang wrote:
>   
>> Here are my answers for your questions in the mail
>> 1) For the SEI
>> In camel-cxf component , we mainly use SEI to look for the type class 
>> information for XML message
>> If you just use the WebServiceProvider , you just need to implement an 
>> invoke API in your implement
>>  class. The business function could let invoke method to deal with.
>>
>>     
> Okay. This was the stuff confusing me and now I got it. So the SEI method
> would not be invoked (by default) by Camel but instead be forwarded to the
> route. I think the same could be done for the WebServiceProvider SEIs also
> with some minor modifications to Camel CXF classes. 
>
>
>   
[Willem] I think we need to make the SEI more clear.
It just is an interface and CXF will delegate to the SEI implementor 
when it received a SOAP request.
For camel-cxf component, the CXF endpoint consumer will delegate the 
request to the camel router
 processors.


For the WebServcieProvider , the SEI just have one invoke method and we 
skip the the XML
unmarshal and marshal processing in CXF. In this case we do not need to 
use the type classes to
do the data bind work.
> willem.jiang wrote:
>   
>> 2) For the Serlvet transport.
>> Since CXF will load the jetty engine to start up the http listener by 
>> default, you need to load the bus
>> with CXF serlvet transport, you can went thought the CXF wiki[1] for 
>> more information.
>>
>> Now, you already did it by letting the Spring configuration context 
>> import the
>>
>> classpath:META-INF/cxf/cxf-servlet.xml
>>
>> [1] http://cwiki.apache.org/CXF20DOC/index.html
>>
>>     
> Yes, this would work, but we have to change the service name of the CFX
> component to be something other than "cfx". Alternatively I think we can
> create a new cfx-configuration file with different names for the default bus
> and referring that like following 
>  	<cxf:cxfEndpoint id="SimpleServiceEndpoint" 
>  	        serviceClass="org.aswin.services.SimpleServicesProvider"
>  			address="/SimpleService" 	    
>     		wsdlURL="WEB-INF/wsdl/SimpleService.wsdl"    		     		
>     		endpointName="s:SimpleWebServicePort" 
>     		serviceName="s:SimpleWebService"     		  
>     	    xmlns:s="http://services.aswin.org/soap"
>     	    bus="newbus" >    	     
>     </cxf:cxfEndpoint>     
>
> Please correct me if I wrong in any of these. I would try making changes to
> the Camel CXF classes if you think it would be a good thing to have.
>
>   
[Willem]
Setting the cxfEndpoint bus with another bus instance is a way to do it 
. Because there are lots of CXF
 component which injected into the "cxf" bus , so it is not easy way to 
do it.

> Thanks
> Aswin
>
>
>   
Willem.

Mime
View raw message