camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cww1769 <wei.v.c...@alcatel-lucent.com>
Subject RE: how to set attachment headers in camel exchange?
Date Sat, 19 Jan 2013 08:57:05 GMT
Hi, Willem:
It doesn't work either:( I can see the instance of the isgCxfBiding is created from log:
2013-01-19 16:38:25,479 | DEBUG | tenderThread-137 | DefaultComponent                 | ache.camel.impl.DefaultComponent
  73 | Creating endpoint uri=[cxf://http://135.252.181.3:40006?bus=%23cxf&cxfBinding=%23isgCxfBinding&serviceClass=org._3gpp.schemas.mms.rel630.mm7_service.MMSServicePortType],
path=[http://135.252.181.3:40006], parameters=[{bus=#cxf, cxfBinding=#isgCxfBinding, serviceClass=org._3gpp.schemas.mms.rel630.mm7_service.MMSServicePortType}]
2013-01-19 16:38:25,479 | DEBUG | tenderThread-137 | DefaultListableBeanFactory       | tory.support.AbstractBeanFactory
 242 | Returning cached instance of singleton bean 'isgCxfBinding'
2013-01-19 16:38:25,479 | DEBUG | tenderThread-137 | EndpointHelper                   | apache.camel.util.EndpointHelper
 253 | Configured property: cxfBinding on bean: Endpoint[http://135.252.181.3:40006] with
value: com.alcatel_lucent.isg.enabler.mms.util.ISGCxfBinding@6859ace0<mailto:com.alcatel_lucent.isg.enabler.mms.util.ISGCxfBinding@6859ace0>

But the exchange still goes to DefaultCxfBinding according to the log:
2013-01-19 16:41:38,747 | DEBUG | ndMessageService | SendProcessor                    | .camel.processor.SendProcessor$2
 113 | >>>> Endpoint[cxf://http://135.252.181.3:40006?bus=%23cxf&cxfBinding=%23isgCxfBinding&serviceClass=org._3gpp.schemas.mms.rel630.mm7_service.MMSServicePortType]
Exchange[Message: [org._3gpp.ftp.specs.archive._23_series._23_140.schema.rel_6_mm7_1_0.SubmitReqType@3d4f64f3]]
2013-01-19 16:41:38,748 | DEBUG | ndMessageService | DefaultCxfBinding                | .component.cxf.DefaultCxfBinding
 563 | Propagate to CXF header: org.apache.cxf.headers.Header.list value: [org.apache.cxf.binding.soap.SoapHeader@1271043f]

________________________________
From: Willem.Jiang [via Camel] [mailto:ml-node+s465427n5725733h33@n5.nabble.com]
Sent: 2013年1月18日 16:57
To: CHEN Wei V
Subject: Re: how to set attachment headers in camel exchange?

Hi
You can override the DefaultCxfBinding by configure it in your camel-cxf URI with the option
cxfBinding=#bindingName.

You need to bind the instance of the ISGCxfBinding with the name of bindingName.
--
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem





On Friday, January 18, 2013 at 10:43 AM, cww1769 wrote:

> Hi, Willem:
> I have thought about another solution which you suggested.
> 1) Wrote an ISGDataHandler which extends DataHandler and holds the attachment headers.
> 2) Wrote an ISGCxfBinding which extends DefaultCxfBinding but it will uses ISGDataHandler
to add headers.
> But I still have a question:
> How can I set my ISGCxfBinding to my endpoint? I think camel will produce my endpoint
itself.
> What do you think?
>
> ________________________________
> From: Willem.Jiang [via Camel] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=5725733&i=0>]
> Sent: 2013年1月17日 15:38
> To: CHEN Wei V
> Subject: Re: how to set attachment headers in camel exchange?
>
> Hi,
>
> I need to see the full picture of issue.
>
> Please show use the camel route which will use the processor you have.
> As I have suggested in the CAMEL-5966, you should be able to do it within the CXF Message.
>
>
> [1]https://issues.apache.org/jira/browse/CAMEL-5966
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
> http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
>
> On Thursday, January 17, 2013 at 9:40 AM, cww1769 wrote:
>
> > Hi, all:
> > I just met a problem in my project which is using cxf-camel. Here is my
> > code in the camel processor:
> > *
> > HashMap<String, Object> map = (HashMap<String,
> > Object>)exchange.getIn().getBody();
> > org.apache.cxf.message.Attachment attachment =
> > (Attachment)map.get("MyAttachment");
> > exchange.getOut().addAttachment(attachment.getId(),attachment.getDataHandler());*
> >
> > The out message will have an attachment with two headers: content-type and
> > content-id, but I want the attachment has other headers like
> > content-disposition which I have set in attachment. I considered adding an
> > interceptor, but I don't know how I can get the attachment headers.
> > Thanks for your attention and time!
> >
> >
> >
> >
> > --
> > View this message in context: http://camel.465427.n5.nabble.com/how-to-set-attachment-headers-in-camel-exchange-tp5725670.html
> > Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
>
>
>
>
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
>
> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
> ISGDataHandler.java (884 bytes) <http://camel.465427.n5.nabble.com/attachment/5725728/0/ISGDataHandler.java>
> ISGCxfBinding.java (4K) <http://camel.465427.n5.nabble.com/attachment/5725728/1/ISGCxfBinding.java>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/how-to-set-attachment-headers-in-camel-exchange-tp5725670p5725728.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/how-to-set-attachment-headers-in-camel-exchange-tp5725670p5725733.html
To unsubscribe from how to set attachment headers in camel exchange?, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5725670&code=d2VpLnYuY2hlbkBhbGNhdGVsLWx1Y2VudC5jb218NTcyNTY3MHwtNTY4MzQ1ODk4>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://camel.465427.n5.nabble.com/how-to-set-attachment-headers-in-camel-exchange-tp5725670p5725807.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message