Package org.apache.axis2.soap

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


    public void testSendingMustUnderstandWithArbitaryRole() throws Exception {
        try {
            SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
            SOAPEnvelope envelope = fac.getDefaultEnvelope();
            OMNamespace headerNs = fac.createOMNamespace("http://dummyHeader", "dh");
            SOAPHeaderBlock h1 =
                fac.createSOAPHeaderBlock("DummyHeader", headerNs, envelope.getHeader());
            h1.setMustUnderstand(true);
            h1.addChild(fac.createText("Dummy String"));
            h1.setRole("http://myOwnRole");
View Full Code Here


    private void callTheService() throws Exception {
        try {
            SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();

            OMNamespace omNs = fac.createOMNamespace("http://localhost/my",
                    "my");
            OMElement method = fac.createOMElement("echoOMElement", omNs);
            OMElement value = fac.createOMElement("myValue", omNs);
            value.setText("Isaac Assimov, the foundation Sega");
            method.addChild(value);
View Full Code Here

        call.close();
    }

    public void testDispatchWithURLAndSOAPAction() throws Exception {
        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
        OMNamespace omNs = fac.createOMNamespace("http://dummyURL", "my");
        OMElement payload = fac.createOMElement("echoOMElementRequest", omNs);
        OMElement value = fac.createOMElement("myValue", omNs);
        value.addChild(
                fac.createText(value, "Isaac Assimov, the foundation Sega"));
        payload.addChild(value);
View Full Code Here

    }

    public void testDispatchWithSOAPBody() throws Exception {
        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();

        OMNamespace omNs = fac.createOMNamespace(
                "http://127.0.0.1:5555/axis/services/EchoXMLService", "my");
        OMElement payload = fac.createOMElement("echoOMElement", omNs);
        OMElement value = fac.createOMElement("myValue", omNs);
        value.addChild(
                fac.createText(value, "Isaac Assimov, the foundation Sega"));
View Full Code Here

    public void testEchoXMLSync() throws Exception {
        try {
            SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();

//            SOAPEnvelope reqEnv = fac.getDefaultEnvelope();
            OMNamespace omNs = fac.createOMNamespace("http://localhost/my",
                    "my");
            OMElement method = fac.createOMElement("echoOMElement", omNs);
            OMElement value = fac.createOMElement("myValue", omNs);
            value.addChild(
                    fac.createText(value,
View Full Code Here

                    // invoke the WebService
                    OMElement result = (OMElement) method.invoke(obj, parms);
                    SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
                    envelope = fac.getDefaultEnvelope();

                    OMNamespace ns = fac.createOMNamespace("http://soapenc/",
                            "res");
                    OMElement responseMethodName = fac.createOMElement(
                            methodName + "Response", ns);
                    if (result != null) {
                        responseMethodName.addChild(result);
View Full Code Here

                "wsdl");
        namespace = reqEnv.declareNamespace(
                "http://webservices.amazon.com/AWSAlexa/2005-02-01",
                "tns");

        nulNS = omFactory.createOMNamespace("", "");

        operation =
                omFactory.createOMElement("Search",
                        "http://webservices.amazon.com/AWSAlexa/2005-02-01",
                        "ns1");
View Full Code Here

            String operation = values[1];
            SOAPFactory soapFactory = new SOAP11Factory();
            SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();

            OMNamespace omNs =
                soapFactory.createOMNamespace(values[0], "services");
            OMNamespace defualtNs = new OMNamespaceImpl("", null);

            OMElement opElement = soapFactory.createOMElement(operation, omNs);

            Iterator it = map.keySet().iterator();
View Full Code Here

  public void runTest(String value, String expected) throws XMLStreamException, FactoryConfigurationError, IOException {
   
    SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
    SOAPEnvelope envelope = factory.getDefaultEnvelope();
    String ns = "http://testuri.org";
    OMNamespace namespace = factory.createOMNamespace(ns,"tst");
   
    String ln = "Child";
   
    OMElement bodyChild = factory.createOMElement(ln,namespace);
    bodyChild.addChild(factory.createText(value));
View Full Code Here

    public static Axis2SynapseMessage createSampleSOAP11MessageWithAddressing(
            String testingRepository) {
        Axis2SynapseMessage sm =
                createSampleSOAP11MessageWithoutAddressing(testingRepository);
        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
        OMNamespace wsaTo = fac.createOMNamespace(Submission.WSA_NAMESPACE,"wsa");
        SOAPHeaderBlock addressingToHeaderBlock = fac.createSOAPHeaderBlock("To",wsaTo, sm.getEnvelope().getHeader());
        addressingToHeaderBlock.setText(URN_SAMPLE_TO_ADDRESS);
        sm.getEnvelope().getHeader().addChild(addressingToHeaderBlock);
        return sm;
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.