Package org.apache.axiom.soap

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


    public void testSendingMustUnderstandWithNextRole() throws Exception {
        ServiceClient serviceClient = getClient(Echo.SERVICE_NAME, Echo.ECHO_OM_ELEMENT_OP_NAME);
       
        SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
        OMNamespace headerNs = fac.createOMNamespace("http://dummyHeader", "dh");
        SOAPHeaderBlock h1 = fac.createSOAPHeaderBlock("DummyHeader", headerNs);
        h1.setMustUnderstand(true);
        h1.addChild(fac.createOMText("Dummy String"));
        h1.setRole(SOAP12Constants.SOAP_ROLE_NEXT);
       
View Full Code Here


    public SOAPElement addAttribute(QName qname, String value) throws SOAPException {
        OMNamespace omNamespace = null;
        SOAPFactory soapFactory;
        if (this.element.getOMFactory() instanceof SOAP11Factory) {
            soapFactory = new SOAP11Factory();
            omNamespace = soapFactory.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
        } else if (this.element.getOMFactory() instanceof SOAP12Factory) {
            soapFactory = new SOAP12Factory();
            omNamespace = soapFactory.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
        }
        this.element.addAttribute(qname.getLocalPart(), value, omNamespace);
View Full Code Here

        if (this.element.getOMFactory() instanceof SOAP11Factory) {
            soapFactory = new SOAP11Factory();
            omNamespace = soapFactory.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
        } else if (this.element.getOMFactory() instanceof SOAP12Factory) {
            soapFactory = new SOAP12Factory();
            omNamespace = soapFactory.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
        }
        this.element.addAttribute(qname.getLocalPart(), value, omNamespace);
        return this;
    }
View Full Code Here

        return in;
    }

    public OMElement multireturn(OMElement ele) throws XMLStreamException {
        SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "res");
        OMElement method = fac.createOMElement("multiretuenResponse", omNs);
        OMElement value1 = fac.createOMElement("return0", null);
        value1.addChild(
                fac.createOMText(value1, "10"));
        method.addChild(value1);
View Full Code Here

                ConfigurationContextFactory.createDefaultConfigurationContext();
        msgCtxt = cfgCtx.createMessageContext();
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope defaultEnvelope = factory.getDefaultEnvelope();
        OMNamespace addressingNamespace =
                factory.createOMNamespace(Final.WSA_NAMESPACE, WSA_DEFAULT_PREFIX);
        SOAPHeaderBlock soapHeaderBlock =
                defaultEnvelope.getHeader().addHeaderBlock(WSA_TO, addressingNamespace);
        soapHeaderBlock.setText("http://oldEPR.org");
        soapHeaderBlock =
                defaultEnvelope.getHeader().addHeaderBlock(WSA_RELATES_TO, addressingNamespace);
View Full Code Here

                ConfigurationContextFactory.createDefaultConfigurationContext();
        msgCtxt = cfgCtx.createMessageContext();
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope defaultEnvelope = factory.getDefaultEnvelope();
        OMNamespace addressingNamespace =
                factory.createOMNamespace(Final.WSA_NAMESPACE, WSA_DEFAULT_PREFIX);
        SOAPHeaderBlock soapHeaderBlock =
                defaultEnvelope.getHeader().addHeaderBlock(WSA_TO, addressingNamespace);
        soapHeaderBlock.setText("http://oldEPR.org");
        soapHeaderBlock =
                defaultEnvelope.getHeader().addHeaderBlock(WSA_RELATES_TO, addressingNamespace);
View Full Code Here

                messageNameSpace = outaxisMessage.getElementQName().getNamespaceURI();
            } else {
                messageNameSpace = service.getTargetNamespace();
            }

            OMNamespace ns = fac.createOMNamespace(messageNameSpace,
                                                   service.getSchemaTargetNamespacePrefix());
            SOAPEnvelope envelope = fac.getDefaultEnvelope();
            OMElement bodyContent = null;

            if (WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(
View Full Code Here

                messageNameSpace = outaxisMessage.getElementQName().getNamespaceURI();
            } else {
                messageNameSpace = service.getTargetNamespace();
            }

            OMNamespace ns = fac.createOMNamespace(messageNameSpace,
                                                   service.getSchemaTargetNamespacePrefix());
            SOAPEnvelope envelope = fac.getDefaultEnvelope();
            OMElement bodyContent = null;

            if (WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(
View Full Code Here

        MessageContext mc = new MessageContext();
        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope soapEnvelope = fac.createSOAPEnvelope();

        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
        OMElement data = fac.createOMElement(operation, omNs);
        OMElement folder = fac.createOMElement("folderName", omNs);
        if (folderName != null) {
            folder.setText(folderName);
        }
View Full Code Here

*/
public class OMElementCreator {
    public static OMElement creatQueueElement(String createQueueElement,
                                              String key) {
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        OMNamespace opN = factory.createOMNamespace(
                "http://webservices.amazon.com/AWSSimpleQueueService/2005-01-01",
                "nsQ");
        OMElement createQueue = factory.createOMElement("CreateQueue", opN);
        OMElement subID = factory.createOMElement("SubscriptionId", opN);
        OMElement request = factory.createOMElement("Request", opN);
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.