Package org.apache.ws.commons.soap

Examples of org.apache.ws.commons.soap.SOAPHeader


    protected void setUp() throws Exception {
        super.setUp();
    }

    public void testGetHeader1() {
        SOAPHeader header = soapEnvelope.getHeader();
        assertTrue("Header information retrieved not correct",
                (header != null &&
                header.getLocalName().equalsIgnoreCase("Header")));
    }
View Full Code Here


                getTestResourceFile("soap/sample1.xml"))
                .getDocumentElement();
    }

    public void testGetHeader2() throws Exception {
        SOAPHeader header = getSecondEnvelope().getHeader();
        assertTrue("Header information retrieved not correct",
                (header != null &&
                header.getLocalName().equalsIgnoreCase("Header")));
    }
View Full Code Here

    public void testCreateSOAPHeader() {
        try {
            OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder(
                    getTestResourceFile("soap/minimalMessage.xml"));
            SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement();
            SOAPHeader soapHeader = omFactory.createSOAPHeader(soapEnvelope);
            assertTrue(
                    "Programatically created SOAPHeader should have done = true ",
                    soapHeader.isComplete());
            soapHeader.detach();
            SOAPHeader soapHeaderTwo = omFactory.createSOAPHeader(soapEnvelope,
                    omBuilder);
            assertTrue(
                    "SOAPHeader with a builder should start with done = false ",
                    !soapHeaderTwo.isComplete());
            assertTrue("This SOAPHeader must have a builder ",
                    soapHeaderTwo.getBuilder() instanceof OMXMLParserWrapper);


        } catch (Exception e) {
            log.info(e.getMessage());
        }
View Full Code Here

    public void testCreateSOAPHeaderBlock() {
        try {
            OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder(
                    getTestResourceFile("soap/soapmessage.xml"));
            SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement();
            SOAPHeader soapHeader = soapEnvelope.getHeader();
            SOAPHeaderBlock soapHeaderBlock = omFactory.createSOAPHeaderBlock(
                    "soapHeaderBlockOne", namespace, soapHeader);
            assertTrue(
                    "Programatically created SOAPHeaderBlock should have done = true ",
                    soapHeaderBlock.isComplete());
View Full Code Here

TOP

Related Classes of org.apache.ws.commons.soap.SOAPHeader

Copyright © 2018 www.massapicom. 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.