Package org.apache.axiom.soap

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


        if (otargetSession != null || ocallbackSession != null) {
            SOAPHeader header = messageContext.getEnvelope().getHeader();
            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) {
View Full Code Here


        SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
        try {
            envelope.getBody().addChild(AXIOMUtil.stringToOM(PAYLOAD));
            SOAPFactory soapFactory = OMAbstractFactory.getSOAP11Factory();
            OMNamespace omNs = soapFactory.createOMNamespace(
                    ActivityPublisherConstants.BAM_ACTIVITY_ID_HEADER_NAMESPACE_URI, "ns");
            SOAPHeaderBlock soapHeaderBlock = envelope.getHeader().addHeaderBlock(
                    "BAMEvent", omNs);
            soapHeaderBlock.addAttribute("activityID", ACTIVITY_ID, null);
            synCtx.setEnvelope(envelope);
View Full Code Here

            hl7Element = AXIOMUtil.stringToOM(hl7Xml);
        } catch (XMLStreamException e) {
            handleException("Error when creating the OMNode with HL7",e);
        }
        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
        OMNamespace ns = fac.createOMNamespace("http://wso2.org/hl7", "hl7");
        OMElement messageEl = fac.createOMElement("message", ns);
        messageEl.addChild(hl7Element);
        return messageEl;
    }
View Full Code Here

                outMsgContext.setEnvelope(env);
                OMElement respElmt = factory.createOMElement(new QName("http://axis2.ode.apache.org", "faultTestResponse"));
                body.addChild(respElmt);
                respElmt.setText("dummy");
                SOAPHeaderBlock headerBlock = factory.createSOAPHeaderBlock("ConversationId",
                        factory.createOMNamespace("http://my.company/super/protocol", "pns"), header);
                headerBlock.setText("ZZYV");
                AxisEngine.send(outMsgContext);
            }
        });
View Full Code Here

        Parser xmlParser = new DefaultXMLParser();
        String xmlDoc = xmlParser.encode(message);

        OMElement hl7Element = AXIOMUtil.stringToOM(xmlDoc);
        OMNamespace ns = fac.createOMNamespace("http://wso2.org/hl7", "hl7");
        OMElement topicOm = fac.createOMElement("message", ns);
        topicOm.addChild(hl7Element);
        envelope.getBody().addChild(topicOm);
        return envelope;
    }
View Full Code Here

        Parser xmlParser = new DefaultXMLParser();
        String xmlDoc = xmlParser.encode(message);

        OMElement hl7Element = AXIOMUtil.stringToOM(xmlDoc);
        OMNamespace ns = fac.createOMNamespace("http://wso2.org/hl7", "hl7");
        OMElement topicOm = fac.createOMElement("message", ns);
        topicOm.addChild(hl7Element);
        envelope.getBody().addChild(topicOm);
        return envelope;
    }
View Full Code Here

        }

        OMElement bamEventElement = soapEnvelope.getHeader().getFirstChildWithName(
                ActivityPublisherConstants.BAM_EVENT_QNAME);
        if (bamEventElement == null) {
            OMNamespace omNs = soapFactory.createOMNamespace(
                    ActivityPublisherConstants.BAM_ACTIVITY_ID_HEADER_NAMESPACE_URI, "ns");
            SOAPHeaderBlock soapHeaderBlock = soapEnvelope.getHeader().addHeaderBlock(
                    "BAMEvent", omNs);
            soapHeaderBlock.addAttribute("activityID", activityId, null);
        }
View Full Code Here

        String attachmentID = mc.addAttachment(dataHandler);


        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope env = factory.getDefaultEnvelope();
        OMNamespace ns = factory.createOMNamespace("http://services.samples", "m0");
        OMElement payload = factory.createOMElement("uploadFileUsingSwA", ns);
        OMElement request = factory.createOMElement("request", ns);
        OMElement imageId = factory.createOMElement("imageId", ns);
        imageId.setText(attachmentID);
        request.addChild(imageId);
View Full Code Here

            XmlSchemaElement xmlSchemaElement = outAxisMessage.getSchemaElement();
            OMElement outElement;
            String prefix = "ws";
            if (xmlSchemaElement != null) {
                QName elementQName = xmlSchemaElement.getSchemaTypeName();
                OMNamespace namespace = fac.createOMNamespace(elementQName.getNamespaceURI(),
                        prefix);
                outElement = fac.createOMElement(xmlSchemaElement.getName(), namespace);
                XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
                if (schemaType instanceof XmlSchemaComplexType) {
                    XmlSchemaComplexType complexType = ((XmlSchemaComplexType) schemaType);
View Full Code Here

      //We will create a SOAP message, which holds the input message as a blob
      SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
      SOAPEnvelope env = factory.getDefaultEnvelope();
            if (inputStream != null) {
                OMNamespace ns = factory.createOMNamespace(
                        RelayConstants.BINARY_CONTENT_QNAME.getNamespaceURI(), "ns");
                OMElement omEle = factory.createOMElement(
                        RelayConstants.BINARY_CONTENT_QNAME.getLocalPart(), ns);

                StreamingOnRequestDataSource ds = new StreamingOnRequestDataSource(inputStream);
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.