@Test
    public void testUnmarshall_Simple() throws Exception {
        String xml = "<?xml version=\"1.0\"?>\r\n" +
                "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\">\r\n" +
                "  <soap:Header>\r\n" +
                "     <ns1:CustomHeader xmlns:ns1=\"urn:ns1\">CVALUE</ns1:CustomHeader>\r\n" +
                "  </soap:Header>\r\n" +
                "  <soap:Body>\r\n" +
                "    <m:GetStockPrice xmlns:m=\"http://www.example.org/stock/Surya\">\r\n" +
                "      <m:StockName>IBM</m:StockName>\r\n" +
                "    </m:GetStockPrice>\r\n" +
                "  </soap:Body>\r\n" +
                "</soap:Envelope>";
        byte [] xmlBytes = xml.getBytes();
        SoapPayloadIO io = new SoapPayloadIO();
        try (InputStream is = new ByteArrayInputStream(xmlBytes)) {
            SOAPEnvelope envelope = io.unmarshall(is);
            Assert.assertNotNull(envelope);
            Assert.assertEquals("Envelope", envelope.getLocalName());
            Assert.assertEquals("http://www.w3.org/2003/05/soap-envelope", envelope.getNamespaceURI());

            SOAPHeader header = envelope.getHeader();
            Assert.assertNotNull(header);

            Iterator<?> allHeaderElements = header.examineAllHeaderElements();
            Assert.assertTrue(allHeaderElements.hasNext());
            SOAPHeaderElement cheader = (SOAPHeaderElement) allHeaderElements.next();
            Assert.assertNotNull(cheader);
            Assert.assertEquals("CVALUE", cheader.getTextContent());
        }
    }
Test method for {@link io.apiman.gateway.engine.io.SoapPayloadIO#unmarshall(java.io.InputStream)}.
gateway/engine/core/src/test/java/io/apiman/gateway/engine/io/SoapPayloadIOTest.java