You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Aki Yoshida (JIRA)" <ji...@apache.org> on 2011/03/10 19:01:00 UTC

[jira] Created: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Support CXF Dispatch mode at CXF Endpoints
------------------------------------------

                 Key: CAMEL-3778
                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
             Project: Camel
          Issue Type: New Feature
          Components: camel-cxf
    Affects Versions: 2.6.0
            Reporter: Aki Yoshida
             Fix For: 2.7.0


Hi,
Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.

Now I have implemented this feature and I would like to hear what you think.

In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
{code:xml}
  <cxf:cxfEndpoint id="serviceEndpoint"
		   address="http://localhost:9000/SoapContext/GreeterPort"
		   endpointName="s:GreeterPort" 
		   serviceName="s:GreeterService"
		   bus="#bus">
    <cxf:properties>
      <entry key="dataFormat" value="PAYLOAD"/>
    </cxf:properties>
  </cxf:cxfEndpoint>
{code}
In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.

I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.

I am attached all the file to this ticket. I would appreciate if you can comment on this feature.

Thanks.
Regards, Aki



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009227#comment-13009227 ] 

William Tam edited comment on CAMEL-3778 at 3/21/11 5:39 PM:
-------------------------------------------------------------

@Aki, Here is what I think ...  I don't think wsdlURL and serviceClass options necessarily imply skipPayloadMessagePartCheck (and vice versa).  I don't think explicitly setting the skipPayloadMessagePartCheck option is necessarily a bad thing.  

      was (Author: wtam):
    @Aki, Here is what I think ...  I don't think wsdlURL and serviceClass options necessarily imply skipPayloadMessagePartCheck (and vice versa).  I don't think explicitly setting the skipPayloadMessagePartCheck is necessarily a bad thing.  
  
> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009227#comment-13009227 ] 

William Tam commented on CAMEL-3778:
------------------------------------

@Aki, Here is what I think ...  I don't think wsdlURL and serviceClass options necessarily imply skipPayloadMessagePartCheck (and vice versa).  I don't think explicit setting the skipPayloadMessagePartCheck is necessarily a bad thing.  

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009238#comment-13009238 ] 

William Tam commented on CAMEL-3778:
------------------------------------

@Aki,

I am OK with killing the endpoint option (skipPayloadMessagePartCheck).  A boolean is maintained internally and it is set to true if the default SEI (serviceClass) is in effect.  

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009238#comment-13009238 ] 

William Tam edited comment on CAMEL-3778 at 3/21/11 5:55 PM:
-------------------------------------------------------------

@Aki,

I am OK with killing the endpoint option (skipPayloadMessagePartCheck).  A boolean is maintained internally and it is set to true if the default SEI (serviceClass) is in effect.  I think this is what you suggested, right?

      was (Author: wtam):
    @Aki,

I am OK with killing the endpoint option (skipPayloadMessagePartCheck).  A boolean is maintained internally and it is set to true if the default SEI (serviceClass) is in effect.  
  
> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "Aki Yoshida (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aki Yoshida updated CAMEL-3778:
-------------------------------

    Attachment: tests.zip
                patch-20110310.txt

patch-20110310.txt
  - svn diff for the changes required

tests.zip
  - unit test files


> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>             Fix For: 2.7.0
>
>         Attachments: patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam updated CAMEL-3778:
-------------------------------

    Attachment: CAMEL-3386.patch

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007514#comment-13007514 ] 

Hadrian Zbarcea commented on CAMEL-3778:
----------------------------------------

Aki, thanks for the patch.

We are in the process of releasing camel-2.7.0 and I will have to move this new feature to 2.8.0 which will be released soon, probably around 6-8 weeks.

Sorry for the inconvenience.

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Issue Comment Edited: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008874#comment-13008874 ] 

William Tam edited comment on CAMEL-3778 at 3/20/11 4:01 AM:
-------------------------------------------------------------

Here is the mail thread related to this issue.

http://camel.465427.n5.nabble.com/camel-cxf-endpoint-without-wsdl-and-serviceClass-possible-td3385901.html#a3387482

@Aki
I made some updates to your patch.  Please review CAMEL-3778.patch (ignore CAMEL-3386.patch) and provide your feedbacks.  

* I added a boolean option "skipPayloadMessagePartCheck" to switch on/off the check for expected message parts in CxfEndpoint.setParameters().  (To other readers, the enforcement of the check precludes sending arbitrary payload in PAYLOAD/MESSAGE mode as Aki has found out.)  The default should be false (i.e. do checking).  In your patch, to skip the checking when it sees null part name is probably not a good idea.  

* I avoided the hard coded CXF operation info in the CxfEndpoint class by JAXWS annotations in the Default SEI (i.e. dummy serviceClass), which makes it cleaner and shielded from CXF model "APIs" changes.



      was (Author: wtam):
    Here is the mail thread related to this issue.

http://camel.465427.n5.nabble.com/camel-cxf-endpoint-without-wsdl-and-serviceClass-possible-td3385901.html#a3387482

@Aki
I made some updates to your patch.  Please review CAMEL-3386.patch (I messed up the number) and provide your feedbacks.  

* I added a boolean option "skipPayloadMessagePartCheck" to switch on/off the check for expected message parts in CxfEndpoint.setParameters().  (To other readers, the enforcement of the check precludes sending arbitrary payload in PAYLOAD/MESSAGE mode as Aki has found out.)  The default should be false (i.e. do checking).  In your patch, to skip the checking when it sees null part name is probably not a good idea.  

* I avoided the hard coded CXF operation info in the CxfEndpoint class by JAXWS annotations in the Default SEI (i.e. dummy serviceClass), which makes it cleaner and shielded from CXF model "APIs" changes.


  
> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009229#comment-13009229 ] 

William Tam edited comment on CAMEL-3778 at 3/21/11 5:39 PM:
-------------------------------------------------------------

BTW, I don't think it has anything to do with Dispatch mode per se.  It is more about the ability to skip payload message checking.

      was (Author: wtam):
    BTW, I don't think it has anything to do with Dispatch mode per se.  It is more about to ability to skip payload message checking.
  
> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009531#comment-13009531 ] 

Willem Jiang commented on CAMEL-3778:
-------------------------------------

@William,
If you don't specify the WSDL and SEI in the URI, that could mean that the CxfProducer works in Dispatch Mode :)

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778-2.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam resolved CAMEL-3778.
--------------------------------

    Resolution: Fixed

Committed revision 1084433.  Thanks Aki Yoshida for the patch.
 


> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778-2.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009195#comment-13009195 ] 

William Tam commented on CAMEL-3778:
------------------------------------

@Aki

I don't think the option is confusing (pls suggest a better name if you can think of something) or unnecessary.  Keep in mind that the proposed option is specific for PAYLOAD mode only.  You don't need set any options to send arbitrary payloads if you are using MESSAGE mode (which I'd recommend and it is faster).  

In PAYLOAD mode, we need to make sure the XML message parts are properly added to CXF Message Content List.  So, obviously the check should be performed by default.  The "skipPayloadMessagePartCheck" option would allow users to put any XML elements in the Message Content List if they desire (which I think it is an abuse).   Perhaps, explicit setting the option is a good way to document/remind users that the endpoint will skip payload message part checking.  Do it make sense?


> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008874#comment-13008874 ] 

William Tam commented on CAMEL-3778:
------------------------------------

Here is the mail thread related to this issue.

http://camel.465427.n5.nabble.com/camel-cxf-endpoint-without-wsdl-and-serviceClass-possible-td3385901.html#a3387482

@Aki
I made some updates to your patch.  Please review CAMEL-3386.patch and provide your feedbacks.  

* I added a boolean option "skipPayloadMessagePartCheck" to switch on/off the check for expected message parts in CxfEndpoint.setParameters().  (To other readers, the enforcement of the check precludes sending arbitrary payload in PAYLOAD/MESSAGE mode as Aki has found out.)  The default should be false (i.e. do checking).  In your patch, to skip the checking when it sees null part name is probably not a good idea.  

* I avoided the hard coded CXF operation info in the CxfEndpoint class by JAXWS annotations in the Default SEI (i.e. dummy serviceClass), which makes it cleaner and shielded from CXF model "APIs" changes.



> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009500#comment-13009500 ] 

Willem Jiang commented on CAMEL-3778:
-------------------------------------

+1 to skip the message partinfo checking if CxfEndpoint works in Dispatch Model.
Customer should make sure he builds up the right elements for the soap body.


> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "Aki Yoshida (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009076#comment-13009076 ] 

Aki Yoshida commented on CAMEL-3778:
------------------------------------

Hi William,
Thanks. I have a question about the skipPayloadMessagePartCheck option in the URL. Could it unnecessarily confuse people if this option is introduced and can be set independently of the values set in the endpoint definition (i.e., wsdlURL and serviceClass)?

Regards, Aki

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009539#comment-13009539 ] 

William Tam commented on CAMEL-3778:
------------------------------------

@Willem

Yea, it "could", but it does not *necessarily* mean "Dispatch Mode".  It could be a user error that left out both WSDL and SEI.  Anyways, I already revised the patch to remove the option.

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778-2.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Issue Comment Edited: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008874#comment-13008874 ] 

William Tam edited comment on CAMEL-3778 at 3/20/11 5:14 AM:
-------------------------------------------------------------

Here is the mail thread related to this issue.

http://camel.465427.n5.nabble.com/camel-cxf-endpoint-without-wsdl-and-serviceClass-possible-td3385901.html#a3387482

@Aki
I made some updates to your patch.  Please review CAMEL-3778.patch (ignore CAMEL-3386.patch) and provide your feedbacks.  

* I added a boolean option "skipPayloadMessagePartCheck" to switch on/off the check for expected message parts in CxfEndpoint.setParameters().  (To other readers, the enforcement of the check precludes sending arbitrary payload in PAYLOAD mode as Aki has found out.)  The default should be false (i.e. do checking).  In your patch, to skip the checking when it sees null part name is probably not a good idea.  

* I avoided the hard coded CXF operation info in the CxfEndpoint class by JAXWS annotations in the Default SEI (i.e. dummy serviceClass), which makes it cleaner and shielded from CXF model "APIs" changes.



      was (Author: wtam):
    Here is the mail thread related to this issue.

http://camel.465427.n5.nabble.com/camel-cxf-endpoint-without-wsdl-and-serviceClass-possible-td3385901.html#a3387482

@Aki
I made some updates to your patch.  Please review CAMEL-3778.patch (ignore CAMEL-3386.patch) and provide your feedbacks.  

* I added a boolean option "skipPayloadMessagePartCheck" to switch on/off the check for expected message parts in CxfEndpoint.setParameters().  (To other readers, the enforcement of the check precludes sending arbitrary payload in PAYLOAD/MESSAGE mode as Aki has found out.)  The default should be false (i.e. do checking).  In your patch, to skip the checking when it sees null part name is probably not a good idea.  

* I avoided the hard coded CXF operation info in the CxfEndpoint class by JAXWS annotations in the Default SEI (i.e. dummy serviceClass), which makes it cleaner and shielded from CXF model "APIs" changes.


  
> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hadrian Zbarcea updated CAMEL-3778:
-----------------------------------

    Fix Version/s:     (was: 2.7.0)
                   2.8.0

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam updated CAMEL-3778:
-------------------------------

    Attachment: CAMEL-3778.patch

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam updated CAMEL-3778:
-------------------------------

    Attachment: CAMEL-3778-2.patch

Revised with no new user visible option. (CAMEL-3778-2.patch)

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778-2.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009521#comment-13009521 ] 

William Tam commented on CAMEL-3778:
------------------------------------

@Willem

Not quite sure what you meant.  The (Camel CXF) endpoint does not know about "Dispatch Model", right?  If you voted for killing the skipPayloadMessagePartCheck, then we are all in agreement.



> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Assigned: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam reassigned CAMEL-3778:
----------------------------------

    Assignee: William Tam

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.7.0
>
>         Attachments: patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009229#comment-13009229 ] 

William Tam commented on CAMEL-3778:
------------------------------------

BTW, I don't think it has anything to do with Dispatch mode per se.  It is more about to ability to skip payload message checking.

> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "Aki Yoshida (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009220#comment-13009220 ] 

Aki Yoshida commented on CAMEL-3778:
------------------------------------

Hi William,
It's not about the name of the option, but its potential semantics
that seems to have an inherent dependency to the other two parameters
wsdlURL and serviceClass. I thought it seemed confusing to be able to
set this skipPayloadmessagePartCheck to true while at the same time,
for example, parameter wsdlURL can be set to point to some WSDL that
explicitly defines the structure of the payload.

Not checking the payload part is probably only useful for the
dispatched mode. So, if there is an implicit mechanism and it is
automatically set for the dispatched mode, I think that would be
simpler. Maybe there is a way to check these conditions together? I
will take a look at it tomorrow. How do you think?

Thanks.
Regards, Aki



> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009227#comment-13009227 ] 

William Tam edited comment on CAMEL-3778 at 3/21/11 5:34 PM:
-------------------------------------------------------------

@Aki, Here is what I think ...  I don't think wsdlURL and serviceClass options necessarily imply skipPayloadMessagePartCheck (and vice versa).  I don't think explicitly setting the skipPayloadMessagePartCheck is necessarily a bad thing.  

      was (Author: wtam):
    @Aki, Here is what I think ...  I don't think wsdlURL and serviceClass options necessarily imply skipPayloadMessagePartCheck (and vice versa).  I don't think explicit setting the skipPayloadMessagePartCheck is necessarily a bad thing.  
  
> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Issue Comment Edited: (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008874#comment-13008874 ] 

William Tam edited comment on CAMEL-3778 at 3/20/11 3:56 AM:
-------------------------------------------------------------

Here is the mail thread related to this issue.

http://camel.465427.n5.nabble.com/camel-cxf-endpoint-without-wsdl-and-serviceClass-possible-td3385901.html#a3387482

@Aki
I made some updates to your patch.  Please review CAMEL-3386.patch (I messed up the number) and provide your feedbacks.  

* I added a boolean option "skipPayloadMessagePartCheck" to switch on/off the check for expected message parts in CxfEndpoint.setParameters().  (To other readers, the enforcement of the check precludes sending arbitrary payload in PAYLOAD/MESSAGE mode as Aki has found out.)  The default should be false (i.e. do checking).  In your patch, to skip the checking when it sees null part name is probably not a good idea.  

* I avoided the hard coded CXF operation info in the CxfEndpoint class by JAXWS annotations in the Default SEI (i.e. dummy serviceClass), which makes it cleaner and shielded from CXF model "APIs" changes.



      was (Author: wtam):
    Here is the mail thread related to this issue.

http://camel.465427.n5.nabble.com/camel-cxf-endpoint-without-wsdl-and-serviceClass-possible-td3385901.html#a3387482

@Aki
I made some updates to your patch.  Please review CAMEL-3386.patch and provide your feedbacks.  

* I added a boolean option "skipPayloadMessagePartCheck" to switch on/off the check for expected message parts in CxfEndpoint.setParameters().  (To other readers, the enforcement of the check precludes sending arbitrary payload in PAYLOAD/MESSAGE mode as Aki has found out.)  The default should be false (i.e. do checking).  In your patch, to skip the checking when it sees null part name is probably not a good idea.  

* I avoided the hard coded CXF operation info in the CxfEndpoint class by JAXWS annotations in the Default SEI (i.e. dummy serviceClass), which makes it cleaner and shielded from CXF model "APIs" changes.


  
> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (CAMEL-3778) Support CXF Dispatch mode at CXF Endpoints

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009195#comment-13009195 ] 

William Tam edited comment on CAMEL-3778 at 3/21/11 4:22 PM:
-------------------------------------------------------------

@Aki

I don't think the option is confusing (pls suggest a better name if you can think of something) or unnecessary.  Keep in mind that the proposed option is specific for PAYLOAD mode only.  You don't need set any options to send arbitrary payloads if you are using MESSAGE mode (which I'd recommend and it is faster).  

In PAYLOAD mode, we need to make sure the XML message parts are properly added to CXF Message Content List.  So, obviously the check should be performed by default.  The "skipPayloadMessagePartCheck" option would allow users to put any XML elements in the Message Content List if they desire (which I think it is an abuse).   Perhaps, explicit setting the option is a good way to document/remind users that the endpoint will skip payload message part checking.  Does it make sense?


      was (Author: wtam):
    @Aki

I don't think the option is confusing (pls suggest a better name if you can think of something) or unnecessary.  Keep in mind that the proposed option is specific for PAYLOAD mode only.  You don't need set any options to send arbitrary payloads if you are using MESSAGE mode (which I'd recommend and it is faster).  

In PAYLOAD mode, we need to make sure the XML message parts are properly added to CXF Message Content List.  So, obviously the check should be performed by default.  The "skipPayloadMessagePartCheck" option would allow users to put any XML elements in the Message Content List if they desire (which I think it is an abuse).   Perhaps, explicit setting the option is a good way to document/remind users that the endpoint will skip payload message part checking.  Do it make sense?

  
> Support CXF Dispatch mode at CXF Endpoints
> ------------------------------------------
>
>                 Key: CAMEL-3778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3778
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Aki Yoshida
>            Assignee: William Tam
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3386.patch, CAMEL-3778.patch, patch-20110310.txt, tests.zip
>
>
> Hi,
> Sometime ago I asked in this mailing list whether it is possible to use the dispatch mode of CXF in the Camel's CXF endpoint. The answer was no. But I wanted to have the CXF dispatch mode so that I can run SOAP intermediary/gateway scenarios with CXF features enabled and send arbitrary SOAP messages from a single endpoint.
> Now I have implemented this feature and I would like to hear what you think.
> In short, I modified CxfSpringEndpoint and CxfEndpoint so that Camel uses the CXF dispatch mode when no service class nor WSDL is specified in the endpoint configuration. For example, you can configure the endpoint as:
> {code:xml}
>   <cxf:cxfEndpoint id="serviceEndpoint"
> 		   address="http://localhost:9000/SoapContext/GreeterPort"
> 		   endpointName="s:GreeterPort" 
> 		   serviceName="s:GreeterService"
> 		   bus="#bus">
>     <cxf:properties>
>       <entry key="dataFormat" value="PAYLOAD"/>
>     </cxf:properties>
>   </cxf:cxfEndpoint>
> {code}
> In this case, the endpoint is set up for the dispatch mode. The dispatch mode supports two operations Invoke and InvokeOneWay and the default operation is Invoke. You can change the operation by simply setting the camel header operationName.
> I added two unit tests classes to show how the dispatch mode works for both PAYLOAD and MESSAGE data format.
> I am attached all the file to this ticket. I would appreciate if you can comment on this feature.
> Thanks.
> Regards, Aki

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira