Package com.consol.citrus.ws.message

Examples of com.consol.citrus.ws.message.SoapMessage


        Assert.assertEquals(responseMessage.getHeader(SoapMessageHeaders.SOAP_ACTION), "soapOperation");
        Assert.assertEquals(responseMessage.getHeaderData().size(), 0L);

        Assert.assertTrue(SoapMessage.class.isInstance(responseMessage));

        SoapMessage soapResponseMessage = (SoapMessage) responseMessage;
        Assert.assertEquals(soapResponseMessage.getAttachments().get(0).getContentId(), attachment.getContentId());
        Assert.assertEquals(soapResponseMessage.getAttachments().get(0).getContentType(), attachment.getContentType());
        Assert.assertEquals(FileUtils.readToString(soapResponseMessage.getAttachments().get(0).getInputStream()), attachment.getContent());

        verify(soapResponse, soapEnvelope, soapBody, soapHeader);
    }
View Full Code Here


        SoapAttachment attachment = new SoapAttachment();
        attachment.setContentId("attContentId");
        attachment.setContent("This is a SOAP attachment\nwith multi-line");
        attachment.setContentType("plain/text");

        SoapMessage testMessage = new SoapMessage(requestPayload);
        testMessage.addAttachment(attachment);

        SoapMessageConverter soapMessageConverter = new SoapMessageConverter();

        reset(soapRequest, soapBody);
View Full Code Here

        replay(soapResponse, soapEnvelope, soapBody, soapHeader);

        Message responseMessage = soapMessageConverter.convertInbound(soapResponse, new WebServiceEndpointConfiguration());
        Assert.assertTrue(SoapMessage.class.isInstance(responseMessage));

        SoapMessage soapResponseMessage = (SoapMessage) responseMessage;
        Assert.assertEquals(soapResponseMessage.getPayload(), "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + responsePayload);
        Assert.assertEquals(soapResponseMessage.getSoapAction(), "soapOperation");
        Assert.assertEquals(soapResponseMessage.getHeaderData().size(), 0L);

        List<SoapAttachment> attachments = soapResponseMessage.getAttachments();
        Assert.assertEquals(attachments.size(), 1L);
        Assert.assertEquals(attachments.get(0).getContentId(), attachment.getContentId());
        Assert.assertEquals(attachments.get(0).getContentType(), attachment.getContentType());
        Assert.assertEquals(FileUtils.readToString(attachments.get(0).getInputStream()), attachment.getContent());
View Full Code Here

TOP

Related Classes of com.consol.citrus.ws.message.SoapMessage

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.