Package org.springframework.ws.transport

Examples of org.springframework.ws.transport.WebServiceConnection.send()


            if (messageSender.supports(replyEpr.getAddress())) {
                supported = true;
                WebServiceConnection connection = null;
                try {
                    connection = messageSender.createConnection(replyEpr.getAddress());
                    connection.send(messageContext.getResponse());
                    break;
                }
                finally {
                    messageContext.clearResponse();
                    if (connection != null) {
View Full Code Here


        expect(strategyMock.newMessageId((SoapMessage) context.getResponse())).andReturn(messageId);

        URI uri = new URI("http://example.com/business/client1");
        expect(senderMock.supports(uri)).andReturn(true);
        expect(senderMock.createConnection(uri)).andReturn(connectionMock);
        connectionMock.send(response);
        connectionMock.close();

        replay(strategyMock, senderMock, connectionMock);

        boolean result = interceptor.handleResponse(context, null);
View Full Code Here

            connection = messageSender.createConnection(mailTo);
            SOAPMessage saajMessage = messageFactory.createMessage();
            saajMessage.getSOAPBody().addBodyElement(new QName("http://springframework.org", "test"));
            SoapMessage soapRequest = new SaajSoapMessage(saajMessage);
            soapRequest.setSoapAction(SOAP_ACTION);
            connection.send(soapRequest);
            Assert.assertEquals("No mail message sent", 1, Mailbox.get("server@example.com").size());
        }
        finally {
            if (connection != null) {
                connection.close();
View Full Code Here

        try {
            URI uri = new URI("jms:SenderRequestQueue?deliveryMode=NON_PERSISTENT");
            connection = messageSender.createConnection(uri);
            SoapMessage soapRequest = new SaajSoapMessage(messageFactory.createMessage());
            soapRequest.setSoapAction(SOAP_ACTION);
            connection.send(soapRequest);

            BytesMessage request = (BytesMessage) jmsTemplate.receive();
            assertNotNull("No message received", request);
            assertTrue("No message content received", request.readByte() != -1);
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
View Full Code Here

            URI uri = new URI(
                    "jms:SenderRequestQueue?replyToName=" + responseQueueName + "&deliveryMode=NON_PERSISTENT");
            connection = messageSender.createConnection(uri);
            SoapMessage soapRequest = new SaajSoapMessage(messageFactory.createMessage());
            soapRequest.setSoapAction(SOAP_ACTION);
            connection.send(soapRequest);

            final BytesMessage request = (BytesMessage) jmsTemplate.receive();
            assertNotNull("No message received", request);
            assertTrue("No message content received", request.readByte() != -1);
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
View Full Code Here

        try {
            URI uri = new URI("jms:SenderRequestQueue?deliveryMode=NON_PERSISTENT&messageType=TEXT_MESSAGE");
            connection = messageSender.createConnection(uri);
            SoapMessage soapRequest = new SaajSoapMessage(messageFactory.createMessage());
            soapRequest.setSoapAction(SOAP_ACTION);
            connection.send(soapRequest);

            TextMessage request = (TextMessage) jmsTemplate.receive();
            assertNotNull("No message received", request);
            assertNotNull("No message content received", request.getText());
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
View Full Code Here

        try {
            URI uri = new URI("jms:SenderRequestQueue?deliveryMode=NON_PERSISTENT");
            connection = messageSender.createConnection(uri);
            SoapMessage soapRequest = new SaajSoapMessage(messageFactory.createMessage());
            soapRequest.setSoapAction(SOAP_ACTION);
            connection.send(soapRequest);

            BytesMessage request = (BytesMessage) jmsTemplate.receive();
            assertNotNull("No message received", request);
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            messageFactory.createMessage().writeTo(bos);
View Full Code Here

        jettyServer.start();

        WebServiceConnection connection = messageSender.createConnection(connectionUri);
        SOAPMessage request = createRequest();
        try {
            connection.send(new SaajSoapMessage(request));
            WebServiceMessage response = connection.receive(messageFactory);
            Assert.assertNull("Response", response);
        }
        finally {
            connection.close();
View Full Code Here

            HttpComponentsMessageSender messageSender = appContext
                    .getBean("messageSender", HttpComponentsMessageSender.class);
            connection = messageSender.createConnection(new URI("http://localhost:" + port));

            connection.send(new SaajSoapMessage(messageFactory.createMessage()));
            connection.receive(new SaajSoapMessageFactory(messageFactory));

            appContext.close();
        }
        finally {
View Full Code Here

                    .getBean("messageSender", CommonsHttpMessageSender.class);
            connection = messageSender.createConnection(new URI("http://localhost:" + port));

            appContext.close();

            connection.send(new SaajSoapMessage(messageFactory.createMessage()));
            connection.receive(new SaajSoapMessageFactory(messageFactory));
        }
        finally {
            if (connection != null) {
                try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.