Package org.springframework.ws

Examples of org.springframework.ws.MockWebServiceMessage$StringBufferWriter


        Boolean b = (Boolean) result;
        assertTrue("Invalid boolean value", b);
    }
    @Test
    public void resolveDouble() throws Exception {
        MockWebServiceMessage request = new MockWebServiceMessage(CONTENTS);
        MessageContext messageContext = new DefaultMessageContext(request, new MockWebServiceMessageFactory());

        Object result = resolver.resolveArgument(messageContext, doubleParameter);

        assertTrue("resolver does not return double", result instanceof Double);
View Full Code Here


        assertEquals("Invalid double value", 42D, d, 0D);
    }

    @Test
    public void resolveNode() throws Exception {
        MockWebServiceMessage request = new MockWebServiceMessage(CONTENTS);
        MessageContext messageContext = new DefaultMessageContext(request, new MockWebServiceMessageFactory());

        Object result = resolver.resolveArgument(messageContext, nodeParameter);

        assertTrue("resolver does not return Node", result instanceof Node);
View Full Code Here

        assertEquals("Invalid node value", "child", node.getLocalName());
    }

    @Test
    public void resolveNodeList() throws Exception {
        MockWebServiceMessage request = new MockWebServiceMessage(CONTENTS);
        MessageContext messageContext = new DefaultMessageContext(request, new MockWebServiceMessageFactory());

        Object result = resolver.resolveArgument(messageContext, nodeListParameter);

        assertTrue("resolver does not return NodeList", result instanceof NodeList);
View Full Code Here

        assertEquals("Invalid Node value", "child", nodeList.item(0).getLocalName());
    }

    @Test
    public void resolveString() throws Exception {
        MockWebServiceMessage request = new MockWebServiceMessage(CONTENTS);
        MessageContext messageContext = new DefaultMessageContext(request, new MockWebServiceMessageFactory());

        Object result = resolver.resolveArgument(messageContext, stringParameter);

        assertTrue("resolver does not return String", result instanceof String);
View Full Code Here

        assertEquals("Invalid string value", "text", s);
    }
   
    @Test
    public void resolveConvertedType() throws Exception {
        MockWebServiceMessage request = new MockWebServiceMessage(CONTENTS);
        MessageContext messageContext = new DefaultMessageContext(request, new MockWebServiceMessageFactory());

        Object result = resolver.resolveArgument(messageContext, convertedParameter);

        assertTrue("resolver does not return String", result instanceof Integer);
View Full Code Here

        assertEquals("Invalid integer value", new Integer(42), i);
    }

    @Test
    public void resolveNamespacesMethod() throws Exception {
        MockWebServiceMessage request = new MockWebServiceMessage(
                "<root xmlns=\"http://springframework.org/spring-ws\">text</root>");
        MessageContext messageContext = new DefaultMessageContext(request, new MockWebServiceMessageFactory());

        Object result = resolver.resolveArgument(messageContext, namespaceMethodParameter);
View Full Code Here

        assertEquals("Invalid string value", "text", s);
    }
   
    @Test
    public void resolveNamespacesClass() throws Exception {
        MockWebServiceMessage request = new MockWebServiceMessage(
                "<root xmlns=\"http://springframework.org/spring-ws\">text</root>");
        MessageContext messageContext = new DefaultMessageContext(request, new MockWebServiceMessageFactory());

        Object result = resolver.resolveArgument(messageContext, namespaceClassParameter);
View Full Code Here

        saajMessage.getSOAPBody().addChildElement(LOCAL_NAME, "", NAMESPACE_URI);
        return new DefaultMessageContext(new SaajSoapMessage(saajMessage), new SaajSoapMessageFactory(saajFactory));
    }

    protected MessageContext createMockMessageContext() throws TransformerException {
        MockWebServiceMessage request = new MockWebServiceMessage(new StringSource(XML));
        return new DefaultMessageContext(request, new MockWebServiceMessageFactory());
    }
View Full Code Here

        delegate = new EndpointInterceptorAdapter();

        namespaceUri = "http://springframework.org/spring-ws";
        localPart = "element";

        MockWebServiceMessage request = new MockWebServiceMessage("<" + localPart + " xmlns=\"" + namespaceUri + "\" />");
        messageContext = new DefaultMessageContext(request, new MockWebServiceMessageFactory());
    }
View Full Code Here

    public void setUp() throws Exception {
        receiverSupport = new MyReceiverSupport();
        messageFactory = new MockWebServiceMessageFactory();
        receiverSupport.setMessageFactory(messageFactory);
        connectionMock = createStrictMock(FaultAwareWebServiceConnection.class);
        request = new MockWebServiceMessage();
    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.MockWebServiceMessage$StringBufferWriter

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.