Package org.apache.axis2.soap

Examples of org.apache.axis2.soap.SOAPFaultRole.serializeWithCache()


    }

    public void testElement() throws Exception {
        SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
        SOAPBody body = env.getBody();
        body.serializeWithCache(writer);
    }

    public void testCompleteElement() throws Exception {
        SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
        env.serializeWithCache(writer);
View Full Code Here


   
    XMLStreamWriter writer = XMLOutputFactory
        .newInstance().createXMLStreamWriter(byteOutStr,UTF_16);
    OMOutputImpl outputImpl = new OMOutputImpl(writer);
        outputImpl.setCharSetEncoding(UTF_16);
    envelope.serializeWithCache(outputImpl);
    outputImpl.flush();
   
    ByteArrayInputStream byteInStr = new ByteArrayInputStream(byteOutStr.toByteArray());
   
    StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(XMLInputFactory.newInstance().createXMLStreamReader(byteInStr, UTF_16),null);
View Full Code Here

            //ignore elements that belong to the addressing namespace
            soapComparator.addIgnorableNamespace("http://schemas.xmlsoap.org/ws/2004/08/addressing");
//            ////////////////////////////////////////////////////
            System.out.println("######################################################");
            OMOutputImpl omOutput = new OMOutputImpl(System.out,false);
            requiredMessageEnvelope.serializeWithCache(omOutput);
            omOutput.flush();
            System.out.println("");
            System.out.println("-------------------------------------------------------");
           OMOutputImpl omOutput1 = new OMOutputImpl(System.out,false);
            replyMessageEnvelope.serializeWithCache(omOutput1);
View Full Code Here

        SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();
        assertNotNull(envelope);
        org.apache.axis2.om.impl.OMOutputImpl omOutput = new org.apache.axis2.om.impl.OMOutputImpl(new FileOutputStream(tempFile),
                false);
        //        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
        envelope.serializeWithCache(omOutput);


    }

    protected void tearDown() throws Exception {
View Full Code Here

        body.serializeWithCache(writer);
    }

    public void testCompleteElement() throws Exception {
        SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
        env.serializeWithCache(writer);
    }

    public void testDualNamespaces1() throws Exception {
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMNamespace ns1 = factory.createOMNamespace("bar", "x");
View Full Code Here

//    }


    public void testSerilizationWithDefaultNamespaces() throws Exception {
        SOAPEnvelope env = (SOAPEnvelope) builderTwo.getDocumentElement();
        env.serializeWithCache(writer);
        OMElement balanceElement = env.getBody().getFirstElement();
        assertEquals("Deafualt namespace has not been set properly",
                balanceElement.getNamespace().getName(),
                "http://localhost:8081/axis/services/BankPort/");
View Full Code Here

        env.getBody().addChild(builder.getDocumentElement());

        org.apache.axis2.om.impl.OMOutputImpl omOutput = new org.apache.axis2.om.impl.OMOutputImpl(System.out, false);
        //env.getBody().addChild(builder.getDocumentElement());
       
        env.serializeWithCache(omOutput);
        // env.serializeWithCache(xmlStreamWriter, true);

        omOutput.flush();

    }
View Full Code Here

    }

    public void testSerilizationWithCacheOn() throws Exception {
        SOAPEnvelope env = (SOAPEnvelope) builderOne.getDocumentElement();
        env.serializeWithCache(writer);
        writer.flush();
    }

    public void testSerilizationWithCacheOff() throws Exception {
        SOAPEnvelope env = (SOAPEnvelope) builderOne.getDocumentElement();
View Full Code Here

        writer.flush();
    }

    public void testSerilizationWithCacheOff() throws Exception {
        SOAPEnvelope env = (SOAPEnvelope) builderOne.getDocumentElement();
        env.serializeWithCache(writer);
        writer.flush();
    }
}
View Full Code Here

        SOAPEnvelope result =
                 inOutMEPClient.invokeBlockingWithEnvelopeOut(operationName.getLocalPart(), payload);
//        assertEquals("SOAP Version received is not compatible", SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, result.getNamespace().getName());
        try {
            OMOutput output = new OMOutput(System.out, false);
            result.serializeWithCache(output);
            output.flush();
        } catch (XMLStreamException e) {
            e.printStackTrace();
        }
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.