Package org.apache.axis2.soap

Examples of org.apache.axis2.soap.SOAPHeader


    }

    private void parseHeaders() {
        // by the time execution comes here the nullity of SOAPEnvelope has been cheched in the
        // identifySOAPVersion() method. So not checking getSOAPEnvelope() == null here
        SOAPHeader soapHeader = getSOAPEnvelope().getHeader();

        if (soapHeader != null) {
            while (!soapHeader.isComplete()) {
                next();
            }
        } else {
            log.info("No SOAPHeaders present !!");
        }
View Full Code Here


    protected void setValueDoc(SOAPEnvelope env, OMElement value,boolean isHeader) {

        if (value != null) {
            if (isHeader){
                SOAPHeader header = env.getHeader();
                header.addChild(value);
            }else{
                SOAPBody body = env.getBody();
                body.addChild(value);
            }
View Full Code Here

                        addressingNamespace, WSA_DEFAULT_PRFIX);


        MessageInformationHeaders messageInformationHeaders =
                msgContext.getMessageInformationHeaders();
        SOAPHeader soapHeader = msgContext.getEnvelope().getHeader();


        EndpointReference epr = messageInformationHeaders.getTo();
        if (epr != null) {

            String address = epr.getAddress();
            if (!"".equals(address) && address != null) {
                SOAPHeaderBlock toHeaderBlock = soapHeader.addHeaderBlock(
                        WSA_TO, addressingNamespaceObject);
                toHeaderBlock.setText(address);
            }

            AnyContentType referenceParameters = epr.getReferenceParameters();
View Full Code Here

    private Log logger = LogFactory.getLog(getClass());

    public void invoke(MessageContext msgContext) throws AxisFault {
        logger.debug("Starting Addressing IN Handler .........");
        SOAPHeader header = msgContext.getEnvelope().getHeader();
        if (header == null) {
            return;
        }

        ArrayList addressingHeaders = null;
        try {
            addressingHeaders = header.getHeaderBlocksWithNSURI(Submission.WSA_NAMESPACE);
            if (addressingHeaders != null) {
                addressingNamespace = Submission.WSA_NAMESPACE;
                extractAddressingSubmissionInformationFromHeaders(
                        header,
                        msgContext.getMessageInformationHeaders(),
                        addressingHeaders);
            } else {
                addressingHeaders = header.getHeaderBlocksWithNSURI(Final.WSA_NAMESPACE);
                if (addressingHeaders != null) {
                    addressingNamespace = Final.WSA_NAMESPACE;
                    extractAddressingFinalInformationFromHeaders(
                            header,
                            msgContext.getMessageInformationHeaders(),
View Full Code Here

    public void testExtractAddressingInformationFromHeaders() {
        try {
            StAXSOAPModelBuilder omBuilder = testUtil.getOMBuilder(
                    testFileName);

            SOAPHeader header = ((SOAPEnvelope) omBuilder.getDocumentElement()).getHeader();
            MessageInformationHeaders messageInformationHeaders =
                    inHandler.extractCommonAddressingParameters(header,
                            null,
                            header.getHeaderBlocksWithNSURI(
                                    AddressingConstants.Submission.WSA_NAMESPACE),
                            AddressingConstants.Submission.WSA_NAMESPACE);

            if (messageInformationHeaders == null) {
                fail(
View Full Code Here

        reqEnv.declareNamespace("http://soapinterop.org/xsd", "s");
        reqEnv.declareNamespace("http://soapinterop.org/", "m");
        reqEnv.declareNamespace("http://soapinterop.org", "m1");
        reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/soap12/", "soap12");

        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.createText("string"));
        // header.addChild(headerChild);
        header.addChild(block1);

        SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest", hns);
        block2.addAttribute("xsi:type", "s:SOAPStruct", null);

        OMElement h2Val1 = omfactory.createOMElement("varString", null);
        h2Val1.addAttribute("xsi:type", "xsd:string", null);
        h2Val1.addChild(omfactory.createText("string"));
View Full Code Here

        reqEnv.declareNamespace("http://soapinterop.org/", "m");
        reqEnv.declareNamespace("http://soapinterop.org", "m1");
        reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/soap12/", "soap12");


        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.createText("string"));
        // header.addChild(headerChild);
        header.addChild(block1);

        SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest", hns);
        block2.addAttribute("xsi:type", "s:SOAPStruct", null);

        OMElement h2Val1 = omfactory.createOMElement("varString", null);
        h2Val1.addAttribute("xsi:type", "xsd:string", null);
        h2Val1.addChild(omfactory.createText("string"));
View Full Code Here

        reqEnv.declareNamespace("http://soapinterop.org/xsd", "s");
        reqEnv.declareNamespace("http://soapinterop.org/", "m");
        reqEnv.declareNamespace("http://soapinterop.org", "m1");
        reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/soap12/", "soap12");

        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.createText("string"));
        // header.addChild(headerChild);
        header.addChild(block1);

        SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest", hns);
        block2.addAttribute("xsi:type", "s:SOAPStruct", null);

        OMElement h2Val1 = omfactory.createOMElement("varString", null);
        h2Val1.addAttribute("xsi:type", "xsd:string", null);
        h2Val1.addChild(omfactory.createText("string"));
View Full Code Here

        reqEnv.declareNamespace("http://soapinterop.org/xsd", "s");
        reqEnv.declareNamespace("http://soapinterop.org/", "m");
        reqEnv.declareNamespace("http://soapinterop.org", "m1");
        reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/soap12/", "soap12");

        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.createText("string"));
        // header.addChild(headerChild);
        header.addChild(block1);

        SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest", hns);
        block2.addAttribute("xsi:type", "s:SOAPStruct", null);

        OMElement h2Val1 = omfactory.createOMElement("varString", null);
        h2Val1.addAttribute("xsi:type", "xsd:string", null);
        h2Val1.addChild(omfactory.createText("string"));
View Full Code Here

        reqEnv.declareNamespace("http://soapinterop.org/xsd", "s");
        reqEnv.declareNamespace("http://soapinterop.org/", "m");
        reqEnv.declareNamespace("http://soapinterop.org", "m1");
        reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/soap12/", "soap12");

        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.createText("string"));
        // header.addChild(headerChild);
        header.addChild(block1);

        SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest", hns);
        block2.addAttribute("xsi:type", "s:SOAPStruct", null);

        OMElement h2Val1 = omfactory.createOMElement("varString", null);
        h2Val1.addAttribute("xsi:type", "xsd:string", null);
        h2Val1.addChild(omfactory.createText("string"));
View Full Code Here

TOP

Related Classes of org.apache.axis2.soap.SOAPHeader

Copyright © 2018 www.massapicom. 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.