Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPEnvelope.serialize()


    SOAPEnvelope envelope = makeConnectionRMMessage.getMessageContext()
            .getEnvelope();

    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

    envelope.serialize(outputStream);

    return outputStream.toByteArray();
  }
}
View Full Code Here


    SOAPEnvelope envelope = makeConnectionRMMessage.getMessageContext()
            .getEnvelope();

    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

    envelope.serialize(outputStream);

    return outputStream.toByteArray();
  }
}
View Full Code Here

    }

    public void testStaxBuilder() throws Exception {
        SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();
        assertNotNull(envelope);
        envelope.serialize(new FileOutputStream(tempFile));


    }

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

        body.serialize(writer);
    }

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

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

                        OMAbstractFactory.getSOAP11Factory(), readerTwo);
    }

    public void testSerilizationWithDefaultNamespaces() throws Exception {
        SOAPEnvelope env = (SOAPEnvelope) builderTwo.getDocumentElement();
        env.serialize(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

                createXMLStreamReader(
                        new InputStreamReader(
                                new ByteArrayInputStream(xmlText2.getBytes()))));
        env.getBody().addChild(builder.getDocumentElement());

        env.serialize(System.out);
    }

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

        env.serialize(System.out);
    }

    public void testSerilizationWithCacheOn() throws Exception {
        SOAPEnvelope env = (SOAPEnvelope) builderOne.getDocumentElement();
        env.serialize(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.serialize(writer);
        writer.flush();
    }
}
View Full Code Here

    ByteArrayOutputStream byteOutStr = new ByteArrayOutputStream();
   
    OMOutputFormat outputFormat = new OMOutputFormat();
        outputFormat.setCharSetEncoding(UTF_16);
    envelope.serialize(byteOutStr, outputFormat);
   
    ByteArrayInputStream byteInStr = new ByteArrayInputStream(byteOutStr.toByteArray());
   
    StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(XMLInputFactory.newInstance().createXMLStreamReader(byteInStr, UTF_16),null);
View Full Code Here

    SOAPHeader sh = se.getHeader();
    Iterator iter = sh.getChildElements();
    while(iter.hasNext())iter.next();

    StringWriter sw = new StringWriter();
    se.serialize(sw);

    checkBodyExists(sw.toString());
  }

  public void testBodyPreservedSerializeAndConsume() throws Exception{
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.