Package org.springframework.ws

Examples of org.springframework.ws.WebServiceMessage


public abstract class AbstractSoap11MessageFactoryTestCase extends AbstractSoapMessageFactoryTestCase {

    @Test
    public void testCreateEmptySoap11Message() throws Exception {
        WebServiceMessage message = messageFactory.createWebServiceMessage();
        assertTrue("Not a SoapMessage", message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        assertEquals("Invalid soap version", SoapVersion.SOAP_11, soapMessage.getVersion());
    }
View Full Code Here


        headers.put("Content-Type", "text/xml");
        String soapAction = "\"http://springframework.org/spring-ws/Action\"";
        headers.put("SOAPAction", soapAction);
        TransportInputStream tis = new MockTransportInputStream(is, headers);

        WebServiceMessage message = messageFactory.createWebServiceMessage(tis);
        assertTrue("Not a SoapMessage", message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        assertEquals("Invalid soap version", SoapVersion.SOAP_11, soapMessage.getVersion());
        assertEquals("Invalid soap action", soapAction, soapMessage.getSoapAction());
        assertFalse("Message a XOP pacakge", soapMessage.isXopPackage());
View Full Code Here

        Map<String, String> headers = new HashMap<String, String>();
        headers.put("Content-Type",
                "multipart/related;" + "type=\"text/xml\";" + "boundary=\"----=_Part_0_11416420.1149699787554\"");
        TransportInputStream tis = new MockTransportInputStream(is, headers);

        WebServiceMessage message = messageFactory.createWebServiceMessage(tis);
        assertTrue("Not a SoapMessage", message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        assertEquals("Invalid soap version", SoapVersion.SOAP_11, soapMessage.getVersion());
        assertFalse("Message a XOP package", soapMessage.isXopPackage());
        Iterator<Attachment> iter = soapMessage.getAttachments();
View Full Code Here

        headers.put("Content-Type", "multipart/related;" + "start-info=\"text/xml\";" +
                "type=\"application/xop+xml\";" + "start=\"<0.urn:uuid:492264AB42E57108E01176731445508@apache.org>\";" +
                "boundary=\"MIMEBoundaryurn_uuid_492264AB42E57108E01176731445507\"");
        TransportInputStream tis = new MockTransportInputStream(is, headers);

        WebServiceMessage message = messageFactory.createWebServiceMessage(tis);
        assertTrue("Not a SoapMessage", message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        assertEquals("Invalid soap version", SoapVersion.SOAP_11, soapMessage.getVersion());
        assertTrue("Message not a XOP package", soapMessage.isXopPackage());
        Iterator<Attachment> iter = soapMessage.getAttachments();
View Full Code Here

        headers.put("Content-Type", "multipart/related;" + "startinfo=\"text/xml\";" +
                "type=\"application/xop+xml\";" + "start=\"<0.urn:uuid:492264AB42E57108E01176731445508@apache.org>\";" +
                "boundary=\"MIMEBoundaryurn_uuid_492264AB42E57108E01176731445507\"");
        TransportInputStream tis = new MockTransportInputStream(is, headers);

        WebServiceMessage message = messageFactory.createWebServiceMessage(tis);
        assertTrue("Not a SoapMessage", message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        assertEquals("Invalid soap version", SoapVersion.SOAP_11, soapMessage.getVersion());
        assertTrue("Message not a XOP package", soapMessage.isXopPackage());
        Iterator<Attachment> iter = soapMessage.getAttachments();
View Full Code Here

public abstract class AbstractSoap12MessageFactoryTestCase extends AbstractSoapMessageFactoryTestCase {

    @Override
    public void testCreateEmptyMessage() throws Exception {
        WebServiceMessage message = messageFactory.createWebServiceMessage();
        assertTrue("Not a SoapMessage", message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        assertEquals("Invalid soap version", SoapVersion.SOAP_12, soapMessage.getVersion());
    }
View Full Code Here

        Map<String, String> headers = new HashMap<String, String>();
        String soapAction = "\"http://springframework.org/spring-ws/Action\"";
        headers.put(TransportConstants.HEADER_CONTENT_TYPE, "application/soap+xml; action=" + soapAction);
        TransportInputStream tis = new MockTransportInputStream(is, headers);

        WebServiceMessage message = messageFactory.createWebServiceMessage(tis);
        assertTrue("Not a SoapMessage", message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        assertEquals("Invalid soap version", SoapVersion.SOAP_12, soapMessage.getVersion());
        assertEquals("Invalid soap action", soapAction, soapMessage.getSoapAction());
        assertFalse("Message is a XOP pacakge", soapMessage.isXopPackage());
View Full Code Here

        Map<String, String> headers = new HashMap<String, String>();
        headers.put("Content-Type", "multipart/related;" + "type=\"application/soap+xml\";" +
                "boundary=\"----=_Part_0_11416420.1149699787554\"");
        TransportInputStream tis = new MockTransportInputStream(is, headers);

        WebServiceMessage message = messageFactory.createWebServiceMessage(tis);
        assertTrue("Not a SoapMessage", message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        assertEquals("Invalid soap version", SoapVersion.SOAP_12, soapMessage.getVersion());
        assertFalse("Message is a XOP package", soapMessage.isXopPackage());
        Attachment attachment = soapMessage.getAttachment("interface21");
View Full Code Here

        headers.put("Content-Type", "multipart/related;" + "start-info=\"application/soap+xml\";" +
                "type=\"application/xop+xml\";" + "start=\"<0.urn:uuid:40864869929B855F971176851454456@apache.org>\";" +
                "boundary=\"MIMEBoundaryurn_uuid_40864869929B855F971176851454455\"");
        TransportInputStream tis = new MockTransportInputStream(is, headers);

        WebServiceMessage message = messageFactory.createWebServiceMessage(tis);
        assertTrue("Not a SoapMessage", message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        assertEquals("Invalid soap version", SoapVersion.SOAP_12, soapMessage.getVersion());
        assertTrue("Message is not a XOP package", soapMessage.isXopPackage());
        Iterator<Attachment> iter = soapMessage.getAttachments();
View Full Code Here

        // create webservice response from output body
        if (exchange.getPattern().isOutCapable()) {
            Message responseMessage = exchange.getOut(Message.class);
            if (responseMessage != null) {
                Source responseBody = responseMessage.getBody(Source.class);
                WebServiceMessage response = messageContext.getResponse();
                XmlConverter xmlConverter = configuration.getXmlConverter();
                xmlConverter.toResult(responseBody, response.getPayloadResult());
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.WebServiceMessage

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.