You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Aki Yoshida <el...@googlemail.com> on 2011/03/10 19:19:36 UTC

camel-cxf endpoint in CXF Dispatch mode

Hi,
I added the CXF dispatch mode to the Camel CXF endpoint so that I can
ran SOAP intermediary/gateway scenarios over a single CXF endpoint
with some CXF features enabled.

I attached the patch file and unit test files to CAMEL-3778.

In short, you can configure your endpoint like

  <cxf:cxfEndpoint id="serviceEndpoint"
		   address="http://localhost:9000/SoapContext/MyPort"
		   endpointName="s:MyPort"
		   serviceName="s:MyService"
		   bus="#bus">
    <cxf:properties>
      <entry key="dataFormat" value="PAYLOAD"/>
    </cxf:properties>
  </cxf:cxfEndpoint>

and send arbitrary SOAP messages over this endpoint while you CXF bus
configuraiton can add some features to your processing.

I would appreciate if you can give me your feedback.

Thanks.

Regards, aki

Re: camel-cxf endpoint in CXF Dispatch mode

Posted by William Tam <em...@gmail.com>.
I'll hold until Camel 2.7.0 is done.

William

On 03/11/2011 08:34 PM, Willem Jiang wrote:
> I just have a quick look at the patch and has few comments for it.
>
> 1. Just a quick question of the Dispatch mode, this dispatch is not 
> like what we use the JAXWS Dispatch API. What the difference between 
> this Dispatch and JAXWS Dispatch API ?
> We need to write some document to clarify this in case the user 
> confuse with JAXWS Dispatch.
>
> 2. As there is no specific configuration bind to the 
> CxfSprintEndpoint, we could support the Dispatch mode in CxfEndpoint 
> also. Which means we can setup the camel-cxf producer to the Dispatch 
> module also.
>
>
> 3. As we are doing the Camel 2.7.0 release now, I suppose we apply 
> this patch after the Camel 2.7.0 released to give us some time for 
> testing this new feature.
>
> Willem
>
> On 3/11/11 10:23 PM, William Tam wrote:
>> Thanks Aki. I'll take a closer look at the problem and commit it as
>> appropriate over the weekend.
>>
>> On 03/11/2011 04:09 AM, Aki Yoshida wrote:
>>> Hi William,
>>> Yes. I initialy tried out that approach. And in fact, as you saw, I am
>>> using this dummy class internally and programatically adding its
>>> operations to the endpoint. I needed to add the operations because
>>> DummyImpl does not specifiy any information and if there is no
>>> operaiton associated for the endpoint, CxfProducer gets problems at
>>> its process method as it looks for the operaiton:
>>>
>>> BindingOperationInfo boi =
>>> prepareBindingOperation(camelExchange, cxfExchange);
>>>
>>> We could handle this special case per call within this process method,
>>> but it was more reasonable to handle this case at the client/endpoint
>>> setup and keep the rest of the processing to run transparently.
>>>
>>> This was the reason why I embedded this coding at the endpoint setup.
>>> Another reason for this setup was to hide this ugly DummyImpl name
>>> from the spring configuraiton and make the configuraiton look simpler.
>>>
>>> Thanks.
>>>
>>> Regards, Aki
>>>
>>> 2011/3/11 William Tam<em...@gmail.com>:
>>>> Hi Aki,
>>>>
>>>> I recalled my suggestion was to try passing a dummy class in the
>>>> cxfEndpoint
>>>> config. It should allow you to send arbitrary payload. I guess that
>>>> didn't work? It looks like your patch is doing just that am I missing
>>>> something.
>>>>
>>>> I.e.
>>>>
>>>> <cxf:cxfEndpoint id="serviceEndpoint"
>>>> address="http://localhost:9000/SoapContext/MyPort"
>>>> endpointName="s:MyPort"
>>>> serviceName="s:MyService"
>>>> serviceClass="org.apache.cxf.jaxws.support.DummyImpl">
>>>> <cxf:properties>
>>>> <entry key="dataFormat" value="PAYLOAD"/>
>>>> </cxf:properties>
>>>> </cxf:cxfEndpoint>
>>>>
>>>> Also, could you elaborate on the purpose of addInvokeOperation()?
>>>>
>>>> Thanks,
>>>> William
>>>>
>>>> On 03/10/2011 01:19 PM, Aki Yoshida wrote:
>>>>> Hi,
>>>>> I added the CXF dispatch mode to the Camel CXF endpoint so that I can
>>>>> ran SOAP intermediary/gateway scenarios over a single CXF endpoint
>>>>> with some CXF features enabled.
>>>>>
>>>>> I attached the patch file and unit test files to CAMEL-3778.
>>>>>
>>>>> In short, you can configure your endpoint like
>>>>>
>>>>> <cxf:cxfEndpoint id="serviceEndpoint"
>>>>> address="http://localhost:9000/SoapContext/MyPort"
>>>>> endpointName="s:MyPort"
>>>>> serviceName="s:MyService"
>>>>> bus="#bus">
>>>>> <cxf:properties>
>>>>> <entry key="dataFormat" value="PAYLOAD"/>
>>>>> </cxf:properties>
>>>>> </cxf:cxfEndpoint>
>>>>>
>>>>> and send arbitrary SOAP messages over this endpoint while you CXF bus
>>>>> configuraiton can add some features to your processing.
>>>>>
>>>>> I would appreciate if you can give me your feedback.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Regards, aki
>>>>>
>>
>
>

Re: camel-cxf endpoint in CXF Dispatch mode

Posted by Aki Yoshida <el...@googlemail.com>.
Hi Willem,
Thanks for your feedback.

1. I see this dispatch mode as a binding of the JAXWS dispatch API to
the current Camel endpoint model. The JAXWS dispatch gives you the
dispatch API (Dispatch<T>) that allows you transmit SOAPMessage or
Source objects. The Camel CXF endpoint supports the data formats
MESSAGE and PAYLOAD which can be associated with these two object
types. In other words, this dispatch mode is trying to provide the
functionality of the JAXWS dispatch mode at the Camel's endpoint. In
any case, I agree with you that we will need the documentation that
exactly explains its functionality.

2. Okay.

3. Sounds fine. This gives us time to sort out and complete points 1 and 2.

Should I prepare the documentation and attach to the ticket?

Thanks.
Regards, Aki

2011/3/12 Willem Jiang <wi...@gmail.com>:
> I just have a quick look at the patch and has few comments for it.
>
> 1. Just a quick question of the Dispatch mode, this dispatch is not like
> what we use the JAXWS Dispatch API. What the difference between this
> Dispatch and JAXWS Dispatch API ?
> We need to write some document to clarify this in case the user confuse with
> JAXWS Dispatch.
>
> 2. As there is no specific configuration bind to the CxfSprintEndpoint, we
> could support the Dispatch mode in CxfEndpoint also. Which means we can
> setup the camel-cxf producer to the Dispatch module also.
>
>
> 3. As we are doing the Camel 2.7.0 release now, I suppose we apply this
> patch after the Camel 2.7.0 released to give us some time for testing this
> new feature.
>
> Willem
>
> On 3/11/11 10:23 PM, William Tam wrote:
>>
>> Thanks Aki. I'll take a closer look at the problem and commit it as
>> appropriate over the weekend.
>>
>> On 03/11/2011 04:09 AM, Aki Yoshida wrote:
>>>
>>> Hi William,
>>> Yes. I initialy tried out that approach. And in fact, as you saw, I am
>>> using this dummy class internally and programatically adding its
>>> operations to the endpoint. I needed to add the operations because
>>> DummyImpl does not specifiy any information and if there is no
>>> operaiton associated for the endpoint, CxfProducer gets problems at
>>> its process method as it looks for the operaiton:
>>>
>>> BindingOperationInfo boi =
>>> prepareBindingOperation(camelExchange, cxfExchange);
>>>
>>> We could handle this special case per call within this process method,
>>> but it was more reasonable to handle this case at the client/endpoint
>>> setup and keep the rest of the processing to run transparently.
>>>
>>> This was the reason why I embedded this coding at the endpoint setup.
>>> Another reason for this setup was to hide this ugly DummyImpl name
>>> from the spring configuraiton and make the configuraiton look simpler.
>>>
>>> Thanks.
>>>
>>> Regards, Aki
>>>
>>> 2011/3/11 William Tam<em...@gmail.com>:
>>>>
>>>> Hi Aki,
>>>>
>>>> I recalled my suggestion was to try passing a dummy class in the
>>>> cxfEndpoint
>>>> config. It should allow you to send arbitrary payload. I guess that
>>>> didn't work? It looks like your patch is doing just that am I missing
>>>> something.
>>>>
>>>> I.e.
>>>>
>>>> <cxf:cxfEndpoint id="serviceEndpoint"
>>>> address="http://localhost:9000/SoapContext/MyPort"
>>>> endpointName="s:MyPort"
>>>> serviceName="s:MyService"
>>>> serviceClass="org.apache.cxf.jaxws.support.DummyImpl">
>>>> <cxf:properties>
>>>> <entry key="dataFormat" value="PAYLOAD"/>
>>>> </cxf:properties>
>>>> </cxf:cxfEndpoint>
>>>>
>>>> Also, could you elaborate on the purpose of addInvokeOperation()?
>>>>
>>>> Thanks,
>>>> William
>>>>
>>>> On 03/10/2011 01:19 PM, Aki Yoshida wrote:
>>>>>
>>>>> Hi,
>>>>> I added the CXF dispatch mode to the Camel CXF endpoint so that I can
>>>>> ran SOAP intermediary/gateway scenarios over a single CXF endpoint
>>>>> with some CXF features enabled.
>>>>>
>>>>> I attached the patch file and unit test files to CAMEL-3778.
>>>>>
>>>>> In short, you can configure your endpoint like
>>>>>
>>>>> <cxf:cxfEndpoint id="serviceEndpoint"
>>>>> address="http://localhost:9000/SoapContext/MyPort"
>>>>> endpointName="s:MyPort"
>>>>> serviceName="s:MyService"
>>>>> bus="#bus">
>>>>> <cxf:properties>
>>>>> <entry key="dataFormat" value="PAYLOAD"/>
>>>>> </cxf:properties>
>>>>> </cxf:cxfEndpoint>
>>>>>
>>>>> and send arbitrary SOAP messages over this endpoint while you CXF bus
>>>>> configuraiton can add some features to your processing.
>>>>>
>>>>> I would appreciate if you can give me your feedback.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Regards, aki
>>>>>
>>
>
>
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
>

Re: camel-cxf endpoint in CXF Dispatch mode

Posted by Willem Jiang <wi...@gmail.com>.
I just have a quick look at the patch and has few comments for it.

1. Just a quick question of the Dispatch mode, this dispatch is not like 
what we use the JAXWS Dispatch API. What the difference between this 
Dispatch and JAXWS Dispatch API ?
We need to write some document to clarify this in case the user confuse 
with JAXWS Dispatch.

2. As there is no specific configuration bind to the CxfSprintEndpoint, 
we could support the Dispatch mode in CxfEndpoint also. Which means we 
can setup the camel-cxf producer to the Dispatch module also.


3. As we are doing the Camel 2.7.0 release now, I suppose we apply this 
patch after the Camel 2.7.0 released to give us some time for testing 
this new feature.

Willem

On 3/11/11 10:23 PM, William Tam wrote:
> Thanks Aki. I'll take a closer look at the problem and commit it as
> appropriate over the weekend.
>
> On 03/11/2011 04:09 AM, Aki Yoshida wrote:
>> Hi William,
>> Yes. I initialy tried out that approach. And in fact, as you saw, I am
>> using this dummy class internally and programatically adding its
>> operations to the endpoint. I needed to add the operations because
>> DummyImpl does not specifiy any information and if there is no
>> operaiton associated for the endpoint, CxfProducer gets problems at
>> its process method as it looks for the operaiton:
>>
>> BindingOperationInfo boi =
>> prepareBindingOperation(camelExchange, cxfExchange);
>>
>> We could handle this special case per call within this process method,
>> but it was more reasonable to handle this case at the client/endpoint
>> setup and keep the rest of the processing to run transparently.
>>
>> This was the reason why I embedded this coding at the endpoint setup.
>> Another reason for this setup was to hide this ugly DummyImpl name
>> from the spring configuraiton and make the configuraiton look simpler.
>>
>> Thanks.
>>
>> Regards, Aki
>>
>> 2011/3/11 William Tam<em...@gmail.com>:
>>> Hi Aki,
>>>
>>> I recalled my suggestion was to try passing a dummy class in the
>>> cxfEndpoint
>>> config. It should allow you to send arbitrary payload. I guess that
>>> didn't work? It looks like your patch is doing just that am I missing
>>> something.
>>>
>>> I.e.
>>>
>>> <cxf:cxfEndpoint id="serviceEndpoint"
>>> address="http://localhost:9000/SoapContext/MyPort"
>>> endpointName="s:MyPort"
>>> serviceName="s:MyService"
>>> serviceClass="org.apache.cxf.jaxws.support.DummyImpl">
>>> <cxf:properties>
>>> <entry key="dataFormat" value="PAYLOAD"/>
>>> </cxf:properties>
>>> </cxf:cxfEndpoint>
>>>
>>> Also, could you elaborate on the purpose of addInvokeOperation()?
>>>
>>> Thanks,
>>> William
>>>
>>> On 03/10/2011 01:19 PM, Aki Yoshida wrote:
>>>> Hi,
>>>> I added the CXF dispatch mode to the Camel CXF endpoint so that I can
>>>> ran SOAP intermediary/gateway scenarios over a single CXF endpoint
>>>> with some CXF features enabled.
>>>>
>>>> I attached the patch file and unit test files to CAMEL-3778.
>>>>
>>>> In short, you can configure your endpoint like
>>>>
>>>> <cxf:cxfEndpoint id="serviceEndpoint"
>>>> address="http://localhost:9000/SoapContext/MyPort"
>>>> endpointName="s:MyPort"
>>>> serviceName="s:MyService"
>>>> bus="#bus">
>>>> <cxf:properties>
>>>> <entry key="dataFormat" value="PAYLOAD"/>
>>>> </cxf:properties>
>>>> </cxf:cxfEndpoint>
>>>>
>>>> and send arbitrary SOAP messages over this endpoint while you CXF bus
>>>> configuraiton can add some features to your processing.
>>>>
>>>> I would appreciate if you can give me your feedback.
>>>>
>>>> Thanks.
>>>>
>>>> Regards, aki
>>>>
>


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

Re: camel-cxf endpoint in CXF Dispatch mode

Posted by William Tam <em...@gmail.com>.
Thanks Aki.  I'll take a closer look at the problem and commit it as 
appropriate over the weekend.

On 03/11/2011 04:09 AM, Aki Yoshida wrote:
> Hi William,
> Yes. I initialy tried out that approach. And in fact, as you saw, I am
> using this dummy class internally and programatically adding its
> operations to the endpoint. I needed to add the operations because
> DummyImpl does not specifiy any information and if there is no
> operaiton associated for the endpoint, CxfProducer gets problems at
> its process method as it looks for the operaiton:
>
>          BindingOperationInfo boi =
> prepareBindingOperation(camelExchange, cxfExchange);
>
> We could handle this special case per call within this process method,
> but it was more reasonable to handle this case at the client/endpoint
> setup and keep the rest of the processing to run transparently.
>
> This was the reason why I embedded this coding at the endpoint setup.
> Another reason for this setup was to hide this ugly DummyImpl name
> from the spring configuraiton and make the configuraiton look simpler.
>
> Thanks.
>
> Regards, Aki
>
> 2011/3/11 William Tam<em...@gmail.com>:
>> Hi Aki,
>>
>> I recalled my suggestion was to try passing a dummy class in the cxfEndpoint
>> config.   It should allow you to send arbitrary payload.  I guess that
>> didn't work?   It looks like your patch is doing just that am I missing
>> something.
>>
>> I.e.
>>
>>   <cxf:cxfEndpoint id="serviceEndpoint"
>>                    address="http://localhost:9000/SoapContext/MyPort"
>>                    endpointName="s:MyPort"
>>                    serviceName="s:MyService"
>>                    serviceClass="org.apache.cxf.jaxws.support.DummyImpl">
>>     <cxf:properties>
>>       <entry key="dataFormat" value="PAYLOAD"/>
>>     </cxf:properties>
>>   </cxf:cxfEndpoint>
>>
>> Also, could you elaborate on the purpose of addInvokeOperation()?
>>
>> Thanks,
>> William
>>
>> On 03/10/2011 01:19 PM, Aki Yoshida wrote:
>>> Hi,
>>> I added the CXF dispatch mode to the Camel CXF endpoint so that I can
>>> ran SOAP intermediary/gateway scenarios over a single CXF endpoint
>>> with some CXF features enabled.
>>>
>>> I attached the patch file and unit test files to CAMEL-3778.
>>>
>>> In short, you can configure your endpoint like
>>>
>>>    <cxf:cxfEndpoint id="serviceEndpoint"
>>>                    address="http://localhost:9000/SoapContext/MyPort"
>>>                    endpointName="s:MyPort"
>>>                    serviceName="s:MyService"
>>>                    bus="#bus">
>>>      <cxf:properties>
>>>        <entry key="dataFormat" value="PAYLOAD"/>
>>>      </cxf:properties>
>>>    </cxf:cxfEndpoint>
>>>
>>> and send arbitrary SOAP messages over this endpoint while you CXF bus
>>> configuraiton can add some features to your processing.
>>>
>>> I would appreciate if you can give me your feedback.
>>>
>>> Thanks.
>>>
>>> Regards, aki
>>>

Re: camel-cxf endpoint in CXF Dispatch mode

Posted by Aki Yoshida <el...@googlemail.com>.
Hi William,
Yes. I initialy tried out that approach. And in fact, as you saw, I am
using this dummy class internally and programatically adding its
operations to the endpoint. I needed to add the operations because
DummyImpl does not specifiy any information and if there is no
operaiton associated for the endpoint, CxfProducer gets problems at
its process method as it looks for the operaiton:

        BindingOperationInfo boi =
prepareBindingOperation(camelExchange, cxfExchange);

We could handle this special case per call within this process method,
but it was more reasonable to handle this case at the client/endpoint
setup and keep the rest of the processing to run transparently.

This was the reason why I embedded this coding at the endpoint setup.
Another reason for this setup was to hide this ugly DummyImpl name
from the spring configuraiton and make the configuraiton look simpler.

Thanks.

Regards, Aki

2011/3/11 William Tam <em...@gmail.com>:
> Hi Aki,
>
> I recalled my suggestion was to try passing a dummy class in the cxfEndpoint
> config.   It should allow you to send arbitrary payload.  I guess that
> didn't work?   It looks like your patch is doing just that am I missing
> something.
>
> I.e.
>
>  <cxf:cxfEndpoint id="serviceEndpoint"
>                   address="http://localhost:9000/SoapContext/MyPort"
>                   endpointName="s:MyPort"
>                   serviceName="s:MyService"
>                   serviceClass="org.apache.cxf.jaxws.support.DummyImpl">
>    <cxf:properties>
>      <entry key="dataFormat" value="PAYLOAD"/>
>    </cxf:properties>
>  </cxf:cxfEndpoint>
>
> Also, could you elaborate on the purpose of addInvokeOperation()?
>
> Thanks,
> William
>
> On 03/10/2011 01:19 PM, Aki Yoshida wrote:
>>
>> Hi,
>> I added the CXF dispatch mode to the Camel CXF endpoint so that I can
>> ran SOAP intermediary/gateway scenarios over a single CXF endpoint
>> with some CXF features enabled.
>>
>> I attached the patch file and unit test files to CAMEL-3778.
>>
>> In short, you can configure your endpoint like
>>
>>   <cxf:cxfEndpoint id="serviceEndpoint"
>>                   address="http://localhost:9000/SoapContext/MyPort"
>>                   endpointName="s:MyPort"
>>                   serviceName="s:MyService"
>>                   bus="#bus">
>>     <cxf:properties>
>>       <entry key="dataFormat" value="PAYLOAD"/>
>>     </cxf:properties>
>>   </cxf:cxfEndpoint>
>>
>> and send arbitrary SOAP messages over this endpoint while you CXF bus
>> configuraiton can add some features to your processing.
>>
>> I would appreciate if you can give me your feedback.
>>
>> Thanks.
>>
>> Regards, aki
>>
>

Re: camel-cxf endpoint in CXF Dispatch mode

Posted by William Tam <em...@gmail.com>.
Hi Aki,

I recalled my suggestion was to try passing a dummy class in the 
cxfEndpoint config.   It should allow you to send arbitrary payload.  I 
guess that didn't work?   It looks like your patch is doing just that am 
I missing something.

I.e.

   <cxf:cxfEndpoint id="serviceEndpoint"
		   address="http://localhost:9000/SoapContext/MyPort"
		   endpointName="s:MyPort"
		   serviceName="s:MyService"
		   serviceClass="org.apache.cxf.jaxws.support.DummyImpl">
     <cxf:properties>
       <entry key="dataFormat" value="PAYLOAD"/>
     </cxf:properties>
   </cxf:cxfEndpoint>

Also, could you elaborate on the purpose of addInvokeOperation()?

Thanks,
William

On 03/10/2011 01:19 PM, Aki Yoshida wrote:
> Hi,
> I added the CXF dispatch mode to the Camel CXF endpoint so that I can
> ran SOAP intermediary/gateway scenarios over a single CXF endpoint
> with some CXF features enabled.
>
> I attached the patch file and unit test files to CAMEL-3778.
>
> In short, you can configure your endpoint like
>
>    <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/MyPort"
> 		   endpointName="s:MyPort"
> 		   serviceName="s:MyService"
> 		   bus="#bus">
>      <cxf:properties>
>        <entry key="dataFormat" value="PAYLOAD"/>
>      </cxf:properties>
>    </cxf:cxfEndpoint>
>
> and send arbitrary SOAP messages over this endpoint while you CXF bus
> configuraiton can add some features to your processing.
>
> I would appreciate if you can give me your feedback.
>
> Thanks.
>
> Regards, aki
>