Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPFactory.createSOAPHeader()


                                if (soapNamespace.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
                                    soapFactory = OMAbstractFactory.getSOAP12Factory();
                                } else {
                                    soapFactory = OMAbstractFactory.getSOAP11Factory();
                                }
                                soapFactory.createSOAPHeader(soapEnvelope);
                            }
                            sourceNodeList.add(soapEnvelope);
                        } else {
                            OMElement ele = (OMElement) node;
                            sourceNodeList.add(ele);
View Full Code Here


    public void addHeader(boolean mustUnderstand, Object content) throws ScriptException {
        SOAPEnvelope envelope = mc.getEnvelope();
        SOAPFactory factory = (SOAPFactory)envelope.getOMFactory();
        SOAPHeader header = envelope.getHeader();
        if (header == null) {
            header = factory.createSOAPHeader(envelope);
        }
        OMElement element = xmlHelper.toOMElement(content);
        // We can't add the element directly to the SOAPHeader. Instead, we need to copy the
        // information over to a SOAPHeaderBlock.
        SOAPHeaderBlock headerBlock = header.addHeaderBlock(element.getLocalName(),
View Full Code Here

            SOAPHeader header = messageContext.getEnvelope().getHeader();
            SOAPFactory factory = (SOAPFactory) messageContext.getEnvelope().getOMFactory();
            OMNamespace intalioSessNS = factory.createOMNamespace(Namespaces.INTALIO_SESSION_NS, "intalio");
            OMNamespace wsAddrNS = factory.createOMNamespace(Namespaces.WS_ADDRESSING_NS, "addr");
            if (header == null) {
                header = factory.createSOAPHeader(messageContext.getEnvelope());
            }
           
            if (otargetSession != null && otargetSession instanceof MutableEndpoint) {

              WSAEndpoint targetEpr = EndpointFactory.convertToWSA((MutableEndpoint) otargetSession);
View Full Code Here

            SOAPFactory factory = (SOAPFactory) messageContext.getEnvelope().getOMFactory();
            OMNamespace intalioSessNS = factory.createOMNamespace(Namespaces.INTALIO_SESSION_NS, "intalio");
            OMNamespace odeSessNS = factory.createOMNamespace(Namespaces.ODE_SESSION_NS, "odesession");
            OMNamespace wsAddrNS = factory.createOMNamespace(Namespaces.WS_ADDRESSING_NS, "addr");
            if (header == null) {
                header = factory.createSOAPHeader(messageContext.getEnvelope());
            }

            if (otargetSession != null && otargetSession instanceof MutableEndpoint) {

                WSAEndpoint targetEpr = EndpointFactory.convertToWSA((MutableEndpoint) otargetSession);
View Full Code Here

                if (soapNamespace.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
                    soapFactory = OMAbstractFactory.getSOAP12Factory();
                } else {
                    soapFactory = OMAbstractFactory.getSOAP11Factory();
                }
                soapFactory.createSOAPHeader(soapEnvelope);
            }
            return soapEnvelope;
        } catch (XMLStreamException e) {
            log.error("Error while deserializing the SOAP " + e);
            return null;
View Full Code Here

            soapFactory = OMAbstractFactory.getSOAP12Factory();
        } else {
            log.error("Not a standard soap message");
        }
        SOAPEnvelope newEnv = soapFactory.createSOAPEnvelope();
        soapFactory.createSOAPHeader(newEnv);
        soapFactory.createSOAPBody(newEnv);

        MessageContext eventMessageContext = new MessageContext();

        eventMessageContext.setOperationContext(msgContext.getOperationContext());
View Full Code Here

                    } else {
                        log.error("Not a standard soap message");
                    }

                    SOAPEnvelope newEnv = soapFactory.createSOAPEnvelope();
                    soapFactory.createSOAPHeader(newEnv);
                    soapFactory.createSOAPBody(newEnv);

                    MessageContext eventMessageContext = new MessageContext();

                    eventMessageContext.setOperationContext(messageContext.getOperationContext());
View Full Code Here

                            org.apache.axiom.soap.SOAPEnvelope omSOAPEnv =
                                    SAAJUtil.toOMSOAPEnvelope(
                                            smsg.getSOAPPart().getDocumentElement());
                            if (omSOAPEnv.getHeader() == null) {
                                SOAPFactory fac = getSOAPFactory(messageCtx);
                                fac.createSOAPHeader(omSOAPEnv);
                            }
                            outMsgContext.setEnvelope(omSOAPEnv);
                        } else {
                            handleException("Unable to serve from the cache : " +
                                    "Couldn't build the SOAP response from the cached byte stream");
View Full Code Here

                outMsgContext.getOperationContext().addMessageContext(outMsgContext);

                // Far too many lines of code...
                SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
                SOAPEnvelope env = factory.createSOAPEnvelope();
                SOAPHeader header = factory.createSOAPHeader(env);
                SOAPBody body = factory.createSOAPBody(env);
                outMsgContext.setEnvelope(env);
                OMElement respElmt = factory.createOMElement(new QName("http://axis2.ode.apache.org", "faultTestResponse"));
                body.addChild(respElmt);
                respElmt.setText("dummy");
View Full Code Here

        } else {
            soapFactory = OMAbstractFactory.getSOAP12Factory();
        }

        if (soapEnvelope.getHeader() == null) {
            soapFactory.createSOAPHeader(soapEnvelope);
        }

        OMElement bamEventElement = soapEnvelope.getHeader().getFirstChildWithName(
                ActivityPublisherConstants.BAM_EVENT_QNAME);
        if (bamEventElement == 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.