Examples of OutofBandHeader


Examples of org.apache.cxf.outofband.header.OutofBandHeader

    private void addReplyOutOfBandHeader() {
        if (context != null) {
            MessageContext ctx = context.getMessageContext();
            if (ctx != null) {
                try {
                    OutofBandHeader ob = new OutofBandHeader();
                    ob.setName("testOobReturnHeaderName");
                    ob.setValue("testOobReturnHeaderValue");
                    ob.setHdrAttribute("testReturnHdrAttribute");
                    JAXBElement<OutofBandHeader> job = new JAXBElement<OutofBandHeader>(
                            new QName(Constants.TEST_HDR_NS, Constants.TEST_HDR_RESPONSE_ELEM),
                            OutofBandHeader.class, null, ob);
                    Header hdr = new Header(
                            new QName(Constants.TEST_HDR_NS, Constants.TEST_HDR_RESPONSE_ELEM),
                            job,
                            new JAXBDataBinding(ob.getClass()));
                    List<Header> hdrList = CastUtils.cast((List<?>) ctx.get(Header.HEADER_LIST));
                    hdrList.add(hdr);
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.