You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Subscription <su...@coldyak.com> on 2012/10/02 22:11:01 UTC
help on nesting CXF Header elements
Hi,
Can anybody give a solution on how to embed CXF Headers? I want to do the
following:
Header valueHeader = new Header(VALUE, "546738", new
JAXBDataBinding(String.class));
Header nameHeader = new Header(NAME, "myId", new
JAXBDataBinding(String.class));
How do I embed these two elements as the child elements to a Header?
what's the way?
Header itemHeader = new Header(ITEM, ?
thanks
-Sonam
________________________________________________
Message sent using UebiMiau 2.7.9
Re: help on nesting CXF Header elements
Posted by Daniel Kulp <dk...@apache.org>.
On Oct 2, 2012, at 4:11 PM, Subscription <su...@coldyak.com> wrote:
> Hi,
>
> Can anybody give a solution on how to embed CXF Headers? I want to do the
> following:
>
> Header valueHeader = new Header(VALUE, "546738", new
> JAXBDataBinding(String.class));
>
> Header nameHeader = new Header(NAME, "myId", new
> JAXBDataBinding(String.class));
>
> How do I embed these two elements as the child elements to a Header?
>
> what's the way?
>
> Header itemHeader = new Header(ITEM, ?
You would likely need to create a simple structure to hold it:
public class MyItem {
public String value;
public String name;
}
MyItem i = new MyItem();
i.value = "546738";
i.name = "myId";
Header itemHeader = new Header(ITEM, i,
new JAXBDataBinding(MyItem.class));
Dan
>
> thanks
>
> -Sonam
>
> ________________________________________________
> Message sent using UebiMiau 2.7.9
>
>
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com