You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Peter Easton (JIRA)" <ji...@apache.org> on 2011/03/30 18:58:05 UTC

[jira] [Created] (CAMEL-3820) cxfrs producer component should handle attachments

cxfrs producer component should handle attachments
--------------------------------------------------

                 Key: CAMEL-3820
                 URL: https://issues.apache.org/jira/browse/CAMEL-3820
             Project: Camel
          Issue Type: Bug
          Components: camel-cxf
    Affects Versions: 2.7.0, 2.1.0
            Reporter: Peter Easton
             Fix For: 2.1.0


camel-cxf producer does not support attachments, for example:

Where:
    <route>
       <from uri="direct://http"/>
       <to uri="cxfrs://http://localhost:9002"/>
    </route>

a send like the following should be supported.

        Exchange exchange = template.send("direct://http", new Processor() {

            public void process(Exchange exchange) throws Exception {
                exchange.setPattern(ExchangePattern.InOut);
                Message inMessage = exchange.getIn();
                inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, Boolean.TRUE);
                inMessage.setHeader(Exchange.HTTP_METHOD, "PUT");
                inMessage.setHeader(Exchange.CONTENT_TYPE, "multipart/related");
                inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/multicustomers");                

                inMessage.setBody(null);   
                inMessage.addAttachment("p1", new DataHandler(new ByteArrayDataSource("p1 content".getBytes(), "text/plain")) );
                inMessage.addAttachment("p2", new DataHandler(new ByteArrayDataSource("p2 content".getBytes(), "text/plain")) );
            }
            
        });

I am enclosing a suggested change to org.apache.camel.component.cxf.jaxrs.DefaultCxfRsBinding that supports attachments for the cxfrs producer.

Note support for attachments by the cxfrs consumer component may require a separate defect.

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

[jira] [Updated] (CAMEL-3820) cxfrs producer component should handle attachments

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

Claus Ibsen updated CAMEL-3820:
-------------------------------

    Fix Version/s:     (was: 2.9.0)
    
> cxfrs producer component should handle attachments
> --------------------------------------------------
>
>                 Key: CAMEL-3820
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3820
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cxf
>    Affects Versions: 2.7.0
>            Reporter: Peter Easton
>             Fix For: Future
>
>         Attachments: patch.txt
>
>
> camel-cxf producer does not support attachments, for example:
> Where:
>     <route>
>        <from uri="direct://http"/>
>        <to uri="cxfrs://http://localhost:9002"/>
>     </route>
> a send like the following should be supported.
>         Exchange exchange = template.send("direct://http", new Processor() {
>             public void process(Exchange exchange) throws Exception {
>                 exchange.setPattern(ExchangePattern.InOut);
>                 Message inMessage = exchange.getIn();
>                 inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, Boolean.TRUE);
>                 inMessage.setHeader(Exchange.HTTP_METHOD, "PUT");
>                 inMessage.setHeader(Exchange.CONTENT_TYPE, "multipart/related");
>                 inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/multicustomers");                
>                 inMessage.setBody(null);   
>                 inMessage.addAttachment("p1", new DataHandler(new ByteArrayDataSource("p1 content".getBytes(), "text/plain")) );
>                 inMessage.addAttachment("p2", new DataHandler(new ByteArrayDataSource("p2 content".getBytes(), "text/plain")) );
>             }
>             
>         });
> I am enclosing a suggested change to org.apache.camel.component.cxf.jaxrs.DefaultCxfRsBinding that supports attachments for the cxfrs producer.
> Note support for attachments by the cxfrs consumer component may require a separate defect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-3820) cxfrs producer component should handle attachments

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

Willem Jiang commented on CAMEL-3820:
-------------------------------------

Hi Peter,
Thanks for contributing the patch.
I just has quick look at it, there is only some changes of DefaultCxfRsBinding in the patch. Can you provide a unit test for it?


> cxfrs producer component should handle attachments
> --------------------------------------------------
>
>                 Key: CAMEL-3820
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3820
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.1.0, 2.7.0
>            Reporter: Peter Easton
>             Fix For: 2.1.0
>
>         Attachments: patch.txt
>
>
> camel-cxf producer does not support attachments, for example:
> Where:
>     <route>
>        <from uri="direct://http"/>
>        <to uri="cxfrs://http://localhost:9002"/>
>     </route>
> a send like the following should be supported.
>         Exchange exchange = template.send("direct://http", new Processor() {
>             public void process(Exchange exchange) throws Exception {
>                 exchange.setPattern(ExchangePattern.InOut);
>                 Message inMessage = exchange.getIn();
>                 inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, Boolean.TRUE);
>                 inMessage.setHeader(Exchange.HTTP_METHOD, "PUT");
>                 inMessage.setHeader(Exchange.CONTENT_TYPE, "multipart/related");
>                 inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/multicustomers");                
>                 inMessage.setBody(null);   
>                 inMessage.addAttachment("p1", new DataHandler(new ByteArrayDataSource("p1 content".getBytes(), "text/plain")) );
>                 inMessage.addAttachment("p2", new DataHandler(new ByteArrayDataSource("p2 content".getBytes(), "text/plain")) );
>             }
>             
>         });
> I am enclosing a suggested change to org.apache.camel.component.cxf.jaxrs.DefaultCxfRsBinding that supports attachments for the cxfrs producer.
> Note support for attachments by the cxfrs consumer component may require a separate defect.

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

[jira] [Updated] (CAMEL-3820) cxfrs producer component should handle attachments

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

Peter Easton updated CAMEL-3820:
--------------------------------

    Attachment: patch.txt

Patch applied to latest trunk revision 1086028 org.apache.camel.component.cxf.jaxrs.DefaultCxfRsBinding

> cxfrs producer component should handle attachments
> --------------------------------------------------
>
>                 Key: CAMEL-3820
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3820
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.1.0, 2.7.0
>            Reporter: Peter Easton
>             Fix For: 2.1.0
>
>         Attachments: patch.txt
>
>
> camel-cxf producer does not support attachments, for example:
> Where:
>     <route>
>        <from uri="direct://http"/>
>        <to uri="cxfrs://http://localhost:9002"/>
>     </route>
> a send like the following should be supported.
>         Exchange exchange = template.send("direct://http", new Processor() {
>             public void process(Exchange exchange) throws Exception {
>                 exchange.setPattern(ExchangePattern.InOut);
>                 Message inMessage = exchange.getIn();
>                 inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, Boolean.TRUE);
>                 inMessage.setHeader(Exchange.HTTP_METHOD, "PUT");
>                 inMessage.setHeader(Exchange.CONTENT_TYPE, "multipart/related");
>                 inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/multicustomers");                
>                 inMessage.setBody(null);   
>                 inMessage.addAttachment("p1", new DataHandler(new ByteArrayDataSource("p1 content".getBytes(), "text/plain")) );
>                 inMessage.addAttachment("p2", new DataHandler(new ByteArrayDataSource("p2 content".getBytes(), "text/plain")) );
>             }
>             
>         });
> I am enclosing a suggested change to org.apache.camel.component.cxf.jaxrs.DefaultCxfRsBinding that supports attachments for the cxfrs producer.
> Note support for attachments by the cxfrs consumer component may require a separate defect.

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

[jira] [Updated] (CAMEL-3820) cxfrs producer component should handle attachments

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

Claus Ibsen updated CAMEL-3820:
-------------------------------

    Issue Type: Improvement  (was: Bug)

> cxfrs producer component should handle attachments
> --------------------------------------------------
>
>                 Key: CAMEL-3820
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3820
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cxf
>    Affects Versions: 2.1.0, 2.7.0
>            Reporter: Peter Easton
>             Fix For: 2.8.0
>
>         Attachments: patch.txt
>
>
> camel-cxf producer does not support attachments, for example:
> Where:
>     <route>
>        <from uri="direct://http"/>
>        <to uri="cxfrs://http://localhost:9002"/>
>     </route>
> a send like the following should be supported.
>         Exchange exchange = template.send("direct://http", new Processor() {
>             public void process(Exchange exchange) throws Exception {
>                 exchange.setPattern(ExchangePattern.InOut);
>                 Message inMessage = exchange.getIn();
>                 inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, Boolean.TRUE);
>                 inMessage.setHeader(Exchange.HTTP_METHOD, "PUT");
>                 inMessage.setHeader(Exchange.CONTENT_TYPE, "multipart/related");
>                 inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/multicustomers");                
>                 inMessage.setBody(null);   
>                 inMessage.addAttachment("p1", new DataHandler(new ByteArrayDataSource("p1 content".getBytes(), "text/plain")) );
>                 inMessage.addAttachment("p2", new DataHandler(new ByteArrayDataSource("p2 content".getBytes(), "text/plain")) );
>             }
>             
>         });
> I am enclosing a suggested change to org.apache.camel.component.cxf.jaxrs.DefaultCxfRsBinding that supports attachments for the cxfrs producer.
> Note support for attachments by the cxfrs consumer component may require a separate defect.

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

[jira] [Updated] (CAMEL-3820) cxfrs producer component should handle attachments

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

Claus Ibsen updated CAMEL-3820:
-------------------------------

    Fix Version/s:     (was: 2.1.0)
                   2.8.0

> cxfrs producer component should handle attachments
> --------------------------------------------------
>
>                 Key: CAMEL-3820
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3820
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cxf
>    Affects Versions: 2.1.0, 2.7.0
>            Reporter: Peter Easton
>             Fix For: 2.8.0
>
>         Attachments: patch.txt
>
>
> camel-cxf producer does not support attachments, for example:
> Where:
>     <route>
>        <from uri="direct://http"/>
>        <to uri="cxfrs://http://localhost:9002"/>
>     </route>
> a send like the following should be supported.
>         Exchange exchange = template.send("direct://http", new Processor() {
>             public void process(Exchange exchange) throws Exception {
>                 exchange.setPattern(ExchangePattern.InOut);
>                 Message inMessage = exchange.getIn();
>                 inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, Boolean.TRUE);
>                 inMessage.setHeader(Exchange.HTTP_METHOD, "PUT");
>                 inMessage.setHeader(Exchange.CONTENT_TYPE, "multipart/related");
>                 inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/multicustomers");                
>                 inMessage.setBody(null);   
>                 inMessage.addAttachment("p1", new DataHandler(new ByteArrayDataSource("p1 content".getBytes(), "text/plain")) );
>                 inMessage.addAttachment("p2", new DataHandler(new ByteArrayDataSource("p2 content".getBytes(), "text/plain")) );
>             }
>             
>         });
> I am enclosing a suggested change to org.apache.camel.component.cxf.jaxrs.DefaultCxfRsBinding that supports attachments for the cxfrs producer.
> Note support for attachments by the cxfrs consumer component may require a separate defect.

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

[jira] [Commented] (CAMEL-3820) cxfrs producer component should handle attachments

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

Claus Ibsen commented on CAMEL-3820:
------------------------------------

Peter any update on providing tests? We cannot accept the patch without tests.

> cxfrs producer component should handle attachments
> --------------------------------------------------
>
>                 Key: CAMEL-3820
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3820
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cxf
>    Affects Versions: 2.7.0
>            Reporter: Peter Easton
>             Fix For: 2.9.0, Future
>
>         Attachments: patch.txt
>
>
> camel-cxf producer does not support attachments, for example:
> Where:
>     <route>
>        <from uri="direct://http"/>
>        <to uri="cxfrs://http://localhost:9002"/>
>     </route>
> a send like the following should be supported.
>         Exchange exchange = template.send("direct://http", new Processor() {
>             public void process(Exchange exchange) throws Exception {
>                 exchange.setPattern(ExchangePattern.InOut);
>                 Message inMessage = exchange.getIn();
>                 inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, Boolean.TRUE);
>                 inMessage.setHeader(Exchange.HTTP_METHOD, "PUT");
>                 inMessage.setHeader(Exchange.CONTENT_TYPE, "multipart/related");
>                 inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/multicustomers");                
>                 inMessage.setBody(null);   
>                 inMessage.addAttachment("p1", new DataHandler(new ByteArrayDataSource("p1 content".getBytes(), "text/plain")) );
>                 inMessage.addAttachment("p2", new DataHandler(new ByteArrayDataSource("p2 content".getBytes(), "text/plain")) );
>             }
>             
>         });
> I am enclosing a suggested change to org.apache.camel.component.cxf.jaxrs.DefaultCxfRsBinding that supports attachments for the cxfrs producer.
> Note support for attachments by the cxfrs consumer component may require a separate defect.

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

[jira] [Updated] (CAMEL-3820) cxfrs producer component should handle attachments

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

Claus Ibsen updated CAMEL-3820:
-------------------------------

    Affects Version/s:     (was: 2.1.0)
        Fix Version/s:     (was: 2.8.0)
                       Future
                       2.9.0

> cxfrs producer component should handle attachments
> --------------------------------------------------
>
>                 Key: CAMEL-3820
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3820
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cxf
>    Affects Versions: 2.7.0
>            Reporter: Peter Easton
>             Fix For: 2.9.0, Future
>
>         Attachments: patch.txt
>
>
> camel-cxf producer does not support attachments, for example:
> Where:
>     <route>
>        <from uri="direct://http"/>
>        <to uri="cxfrs://http://localhost:9002"/>
>     </route>
> a send like the following should be supported.
>         Exchange exchange = template.send("direct://http", new Processor() {
>             public void process(Exchange exchange) throws Exception {
>                 exchange.setPattern(ExchangePattern.InOut);
>                 Message inMessage = exchange.getIn();
>                 inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, Boolean.TRUE);
>                 inMessage.setHeader(Exchange.HTTP_METHOD, "PUT");
>                 inMessage.setHeader(Exchange.CONTENT_TYPE, "multipart/related");
>                 inMessage.setHeader(Exchange.HTTP_PATH, "/customerservice/multicustomers");                
>                 inMessage.setBody(null);   
>                 inMessage.addAttachment("p1", new DataHandler(new ByteArrayDataSource("p1 content".getBytes(), "text/plain")) );
>                 inMessage.addAttachment("p2", new DataHandler(new ByteArrayDataSource("p2 content".getBytes(), "text/plain")) );
>             }
>             
>         });
> I am enclosing a suggested change to org.apache.camel.component.cxf.jaxrs.DefaultCxfRsBinding that supports attachments for the cxfrs producer.
> Note support for attachments by the cxfrs consumer component may require a separate defect.

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