Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPHeaderBlock.addChild()


                if (isFinalAddressingNamespace && messageContext.isSOAP11()) {
                    // Add detail as a wsa:FaultDetail header
                    if (!isAddressingHeaderAlreadyAvailable(Final.FAULT_HEADER_DETAIL, false)) {
                        SOAPHeaderBlock faultDetail = header.addHeaderBlock(
                                Final.FAULT_HEADER_DETAIL, addressingNamespaceObject);
                        faultDetail.addChild(ElementHelper.importOMElement(detailElement, factory));
                    }
                } else if (!messageContext.isSOAP11()) {
                    // Add detail to the Fault in the SOAP Body
                    SOAPFault fault = envelope.getBody().getFault();
                    if (fault != null && fault.getDetail() != null) {
View Full Code Here


                log.trace("createSOAPHeaderBlock: value=" + value + " headerName=" + headerName);
            }
            if (value != null && value.length()!=0) {
                SOAPHeaderBlock soapHeaderBlock =
                        header.addHeaderBlock(headerName, addressingNamespaceObject);
                soapHeaderBlock.addChild(factory.createOMText(value));
                if (attributes != null && !attributes.isEmpty()) {
                    Iterator attrIterator = attributes.iterator();
                    while (attrIterator.hasNext()) {
                        AttributeHelper
                                .importOMAttribute((OMAttribute)attrIterator.next(), soapHeaderBlock);
View Full Code Here

        OMNode omNode = null;

        // add child elements
        for (Iterator iter = omElementToadd.getChildren(); iter.hasNext();){
             omNode = (OMNode) iter.next();
             soapHeaderBlock.addChild(omNode);
        }

        OMAttribute omatribute = null;
        // add attributes
        for (Iterator iter = omElementToadd.getAllAttributes(); iter.hasNext();){
View Full Code Here

                        new SOAP11HeaderBlockImpl(Constants.ELEM_SUPPORTEDENVELOPE,
                                                  namespace,
                                                  (SOAPFactory)this.element.getOMFactory());
                supportedEnvelop.addAttribute(Constants.ATTR_QNAME, prefix + index + ":"
                        + Constants.ELEM_ENVELOPE, null);
                upgrade.addChild(supportedEnvelop);
            } else {
                SOAP12HeaderBlockImpl supportedEnvelop =
                        new SOAP12HeaderBlockImpl(Constants.ELEM_SUPPORTEDENVELOPE,
                                                  namespace,
                                                  (SOAPFactory)this.element.getOMFactory());
View Full Code Here

                        new SOAP12HeaderBlockImpl(Constants.ELEM_SUPPORTEDENVELOPE,
                                                  namespace,
                                                  (SOAPFactory)this.element.getOMFactory());
                supportedEnvelop.addAttribute(Constants.ATTR_QNAME, prefix + index + ":"
                        + Constants.ELEM_ENVELOPE, null);
                upgrade.addChild(supportedEnvelop);
            }
        }
        SOAPHeaderElementImpl soapHeaderElementImpl = new SOAPHeaderElementImpl(upgrade);
        return soapHeaderElementImpl;
    }
View Full Code Here

        // add child elements
        for (Iterator iter = omElementToadd.getChildren(); iter.hasNext();){
             omNode = (OMNode) iter.next();
             iter.remove();
             soapHeaderBlock.addChild(omNode);
        }

        OMAttribute omatribute = null;
        // add attributes
        for (Iterator iter = omElementToadd.getAllAttributes(); iter.hasNext();){
View Full Code Here

                if (isFinalAddressingNamespace && messageContext.isSOAP11()) {
                    // Add detail as a wsa:FaultDetail header
                    if (!isAddressingHeaderAlreadyAvailable(Final.FAULT_HEADER_DETAIL, false)) {
                        SOAPHeaderBlock faultDetail = header.addHeaderBlock(
                                Final.FAULT_HEADER_DETAIL, addressingNamespaceObject);
                        faultDetail.addChild(ElementHelper.importOMElement(detailElement, factory));
                    }
                } else if (!messageContext.isSOAP11()) {
                    // Add detail to the Fault in the SOAP Body
                    SOAPFault fault = envelope.getBody().getFault();
                    if (fault != null && fault.getDetail() != null) {
View Full Code Here

                log.trace("createSOAPHeaderBlock: value=" + value + " headerName=" + headerName);
            }
            if (value != null && value.length()!=0) {
                SOAPHeaderBlock soapHeaderBlock =
                        header.addHeaderBlock(headerName, addressingNamespaceObject);
                soapHeaderBlock.addChild(factory.createOMText(value));
                if (attributes != null && !attributes.isEmpty()) {
                    Iterator attrIterator = attributes.iterator();
                    while (attrIterator.hasNext()) {
                        AttributeHelper
                                .importOMAttribute((OMAttribute)attrIterator.next(), soapHeaderBlock);
View Full Code Here

                    // add child elements
                    OMNode omNode = null;
                    for (Iterator iter = omHeaderNode.getChildren(); iter.hasNext();){
                         omNode = (OMNode) iter.next();
                         hb.addChild(omNode);
                    }

                    OMAttribute omatribute = null;
                    // add attributes
                    for (Iterator iter = omHeaderNode.getAllAttributes(); iter.hasNext();){
View Full Code Here

        SOAPHeader header = omfactory.createSOAPHeader(reqEnv);
        OMNamespace hns = reqEnv.declareNamespace("http://soapinterop.org/echoheader/",
                                                  "hns"); //xmlns:m0="http://soapinterop.org/echoheader/
        SOAPHeaderBlock block1 = header.addHeaderBlock("echoMeStringRequest", hns);
        block1.addAttribute("xsi:type", "xsd:string", null);
        block1.addChild(omfactory.createOMText("string"));
        header.addChild(block1);

        SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest", hns);
        block2.addAttribute("xsi:type", "s:SOAPStruct", null);
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.