Package org.apache.ws.commons.soap.impl.builder

Examples of org.apache.ws.commons.soap.impl.builder.StAXSOAPModelBuilder


            fileName = IN_FILE_NAME;
        }
        XMLStreamReader parser = XMLInputFactory.newInstance()
                .createXMLStreamReader(
                        new FileReader(getTestResourceFile(fileName)));
        builder = new StAXSOAPModelBuilder(parser, null);
        return builder;
    }
View Full Code Here


    }


    public void testExtractAddressingInformationFromHeaders() {
        try {
            StAXSOAPModelBuilder omBuilder = testUtil.getOMBuilder(
                    testFileName);

            SOAPHeader header = ((SOAPEnvelope) omBuilder.getDocumentElement()).getHeader();
            Options options =
                    inHandler.extractAddressingInformation(header,
                            new MessageContext(),
                            header.getHeaderBlocksWithNSURI(
                                    AddressingConstants.Submission.WSA_NAMESPACE),
View Full Code Here

                fromAddress.trim());
    }

    public void testWSAFinalInformation() {
        try {
            StAXSOAPModelBuilder omBuilder = testUtil.getOMBuilder(
                    wsaFinalTestFile);
            inHandler.addressingNamespace = AddressingConstants.Final.WSA_NAMESPACE;
            SOAPHeader header = ((SOAPEnvelope) omBuilder.getDocumentElement()).getHeader();
            Options options =
                    inHandler.extractAddressingInformation(header,
                            new MessageContext(),
                            header.getHeaderBlocksWithNSURI(
                                    AddressingConstants.Final.WSA_NAMESPACE),
View Full Code Here

        msgCtxt.setTo(epr);
        msgCtxt.setReplyTo(replyTo);
        msgCtxt.setEnvelope(defaultEnvelope);
        outHandler.invoke(msgCtxt);

        StAXSOAPModelBuilder omBuilder = testUtil.getOMBuilder("eprTest.xml");

        XMLComparator xmlComparator = new XMLComparator();

        assertTrue(
                xmlComparator.compare(omBuilder.getDocumentElement(),
                        defaultEnvelope));

    }
View Full Code Here

            fileName = IN_FILE_NAME;
        }
        XMLStreamReader parser = XMLInputFactory.newInstance()
                .createXMLStreamReader(
                        new FileReader(getTestResourceFile(fileName)));
        builder = new StAXSOAPModelBuilder(parser, new SOAP11Factory(), null);
        return builder;
    }
View Full Code Here

   

    protected StAXSOAPModelBuilder getOMBuilder(InputStream in) throws Exception {
        XMLStreamReader parser = XMLInputFactory.newInstance()
                .createXMLStreamReader(in);
        builder = new StAXSOAPModelBuilder(parser, new DOMSOAPFactory(), null);
        return builder;
    }
View Full Code Here

                                "http://moretesting.ws.org", "ws"), firstElement);
    }

    public void testGetText() {
        try {
            StAXSOAPModelBuilder soapBuilder = getOMBuilder(
                    "soap/OMElementTest.xml");
            SOAPEnvelope soapEnvelope = (SOAPEnvelope) soapBuilder.getDocumentElement();
            OMElement wsaTo = soapEnvelope.getHeader().getFirstChildWithName(
                    new QName(WSA_URI, WSA_TO));

            String expectedString = "http://localhost:8081/axis/services/BankPort";
            assertEquals("getText is not returning the correct value",
View Full Code Here

        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);

    SOAPEnvelope resultEnv = builder.getSOAPEnvelope();
   
    OMElement bodyChildResult = resultEnv.getBody().getFirstElement();
   
    assertNotNull("No child in body element", bodyChildResult);
   
View Full Code Here

TOP

Related Classes of org.apache.ws.commons.soap.impl.builder.StAXSOAPModelBuilder

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.