Package com.consol.citrus.ws.client

Examples of com.consol.citrus.ws.client.WebServiceEndpointConfiguration


   
    private String responsePayload = "<testMessage>Hello</testMessage>";
   
    @Test
    public void testSoapBody() throws TransformerException, IOException {
        SoapResponseMessageCallback callback = new SoapResponseMessageCallback(new WebServiceEndpointConfiguration());
       
        StringSource soapBodySource = new StringSource(responsePayload);
       
        Set<SoapHeaderElement> soapHeaders = new HashSet<SoapHeaderElement>();
        Set<Attachment> soapAttachments = new HashSet<Attachment>();
View Full Code Here


        verify(soapResponse, soapEnvelope, soapBody, soapHeader);
    }
   
    @Test
    public void testSoapAction() throws TransformerException, IOException {
        SoapResponseMessageCallback callback = new SoapResponseMessageCallback(new WebServiceEndpointConfiguration());
       
        StringSource soapBodySource = new StringSource(responsePayload);
       
        Set<SoapHeaderElement> soapHeaders = new HashSet<SoapHeaderElement>();
        Set<Attachment> soapAttachments = new HashSet<Attachment>();
View Full Code Here

        String soapHeaderContent = "<header>" +
                            "<operation>unitTest</operation>" +
                            "<messageId>123456789</messageId>" +
                        "</header>";
       
        SoapResponseMessageCallback callback = new SoapResponseMessageCallback(new WebServiceEndpointConfiguration());
       
        StringSource soapBodySource = new StringSource(responsePayload);
       
        Set<SoapHeaderElement> soapHeaders = new HashSet<SoapHeaderElement>();
        Set<Attachment> soapAttachments = new HashSet<Attachment>();
View Full Code Here

        verify(soapResponse, soapEnvelope, soapBody, soapHeader);
    }
   
    @Test
    public void testSoapHeader() throws TransformerException, IOException {
        SoapResponseMessageCallback callback = new SoapResponseMessageCallback(new WebServiceEndpointConfiguration());
       
        StringSource soapBodySource = new StringSource(responsePayload);
       
        SoapHeaderElement soapHeaderElement = EasyMock.createMock(SoapHeaderElement.class);
       
View Full Code Here

        SoapAttachment attachment = new SoapAttachment();
        attachment.setContentId("attContentId");
        attachment.setContent("This is a SOAP attachment" + System.getProperty("line.separator") + "with multi-line");
        attachment.setContentType("plain/text");
       
        SoapResponseMessageCallback callback = new SoapResponseMessageCallback(new WebServiceEndpointConfiguration());
       
        StringSource soapBodySource = new StringSource(responsePayload);
       
        Set<SoapHeaderElement> soapHeaders = new HashSet<SoapHeaderElement>();
        Set<Attachment> soapAttachments = new HashSet<Attachment>();
View Full Code Here

    @Test
    public void testOutboundSoapMessageCreation() throws TransformerException, IOException {
        Message testMessage = new DefaultMessage(requestPayload);

        WebServiceEndpointConfiguration endpointConfiguration = new WebServiceEndpointConfiguration();
        endpointConfiguration.setMessageFactory(soapMessageFactory);

        SoapMessageConverter soapMessageConverter = new SoapMessageConverter();

        StringResult soapBodyResult = new StringResult();
View Full Code Here

        expect(soapRequest.getSoapBody()).andReturn(soapBody).once();
        expect(soapBody.getPayloadResult()).andReturn(soapBodyResult).once();

        replay(soapRequest, soapBody);

        soapMessageConverter.convertOutbound(soapRequest, testMessage, new WebServiceEndpointConfiguration());

        Assert.assertEquals(soapBodyResult.toString(), "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + requestPayload);

        verify(soapRequest, soapBody);
    }
View Full Code Here

        soapRequest.setSoapAction("soapAction");
        expectLastCall().once();

        replay(soapRequest, soapBody);

        soapMessageConverter.convertOutbound(soapRequest, testMessage, new WebServiceEndpointConfiguration());

        verify(soapRequest, soapBody);
    }
View Full Code Here

        expect(soapRequest.getSoapHeader()).andReturn(soapHeader).once();
        expect(soapHeader.getResult()).andReturn(soapHeaderResult).once();

        replay(soapRequest, soapBody, soapHeader);

        soapMessageConverter.convertOutbound(soapRequest, testMessage, new WebServiceEndpointConfiguration());

        Assert.assertEquals(soapHeaderResult.toString(), soapHeaderContent);

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

        expect(soapRequest.getSoapHeader()).andReturn(soapHeader).times(2);
        expect(soapHeader.getResult()).andReturn(soapHeaderResult).times(2);

        replay(soapRequest, soapBody, soapHeader);

        soapMessageConverter.convertOutbound(soapRequest, testMessage, new WebServiceEndpointConfiguration());

        Assert.assertEquals(soapHeaderResult.toString(), soapHeaderContent + "<AppInfo><appId>123456789</appId></AppInfo>");

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

TOP

Related Classes of com.consol.citrus.ws.client.WebServiceEndpointConfiguration

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.