@Test
    public void testMarshall_Simple() throws Exception {
        MessageFactory msgFactory = MessageFactory.newInstance();
        SOAPMessage message = msgFactory.createMessage();
        SOAPEnvelope envelope = message.getSOAPPart().getEnvelope();

        SOAPHeader header = envelope.getHeader();
        SOAPHeaderElement cheader = header.addHeaderElement(new QName("urn:ns1", "CustomHeader"));
        cheader.setTextContent("CVALUE");

        SoapPayloadIO io = new SoapPayloadIO();
        byte[] data = io.marshall(envelope);
        String actual = new String(data);

        String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"><SOAP-ENV:Header><CustomHeader xmlns=\"urn:ns1\">CVALUE</CustomHeader></SOAP-ENV:Header><SOAP-ENV:Body/></SOAP-ENV:Envelope>";
        Assert.assertEquals(expected, actual);
    }
Test method for {@link io.apiman.gateway.engine.io.SoapPayloadIO#marshall(org.w3c.dom.Document)}.
gateway/engine/core/src/test/java/io/apiman/gateway/engine/io/SoapPayloadIOTest.java