Package org.reficio.ws

Examples of org.reficio.ws.SoapContext


    public static void registerAutoResponderForAllServiceBindings(SoapServer server, int testServiceId, Wsdl parser) {
        for (QName bindingName : parser.getBindings()) {
            String contextPath = TestUtils.formatContextPath(testServiceId, bindingName);
            log.info(String.format("Registering auto responder for service [%d] undex context path [%s]", testServiceId, contextPath));
            SoapContext context = SoapContext.builder().exampleContent(true).build();
            SoapBuilder builder = parser.binding().name(bindingName).find();
            server.registerRequestResponder(contextPath, new AutoResponder(builder, context));
        }
    }
View Full Code Here


    @Test
    public void testParseTestWsdlProperContext() {
        URL wsdlUrl = ResourceUtils.getResourceWithAbsolutePackagePath("wsdl", "TestService.wsdl");
        Wsdl parser = Wsdl.parse(wsdlUrl);
        String expectedBindingString = "{http://schemas.eviware.com/TestService/v1/}TestServiceSoap";
        SoapContext context = SoapContext.builder().typeComments(true).build();
        SoapBuilder builder = parser.binding().name(expectedBindingString).find(context);

        assertEquals(context, builder.getContext());
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    private static void testService(int testServiceId) throws Exception {
        URL wsdlUrl = getDefinitionUrl(testServiceId);
        Wsdl parser = Wsdl.parse(wsdlUrl);
        SoapContext context = SoapContext.builder()
                .exampleContent(false)
                .build();
        for (QName bindingQName : parser.getBindings()) {
            String bindingName = bindingQName.getLocalPart();
            SoapBuilder builder = parser.binding().name(bindingQName).find();
View Full Code Here

            response = postRequest(client, request, soapAction);
        } else {
            response = postRequest(client, request);
        }

        SoapContext context = SoapContext.builder().exampleContent(true).build();
        if (op.getOperation().getStyle().equals(OperationType.REQUEST_RESPONSE)) {
            String expectedResponse = soapBuilder.buildOutputMessage(operation, context);
            if (!operation.isOutputSoapEncoded()) {
                soapBuilder.validateOutputMessage(operation, response);
            }
View Full Code Here

    private void registerService(SoapServer server, AutoResponder responder) {
        server.registerRequestResponder(path, responder);
    }

    private AutoResponder getAutoResponder(SoapBuilder builder) {
        SoapContext context = SoapContext.builder()
                .exampleContent(true)
                .buildOptional(true)
                .alwaysBuildHeaders(true)
                .build();
        return new AutoResponder(builder, context);
View Full Code Here

    }

    @Test
    public void testRequestResponse() {
        SoapOperation operation = builder.operation().name("ConversionRate").find();
        SoapContext context = SoapContext.builder().exampleContent(true).build();
        String request = builder.buildInputMessage(operation, context);

        String response = client.post(request);
        assertNotNull(response);
    }
View Full Code Here

    public static void stopServer() {
        server.stop();
    }

    public static AutoResponder getAutoResponderForTestService() throws WSDLException {
        SoapContext context = SoapContext.builder().exampleContent(false).build();
        Wsdl parser = Wsdl.parse(wsdlUrl);
        builder = parser.binding().name(bindingName).find();

        AutoResponder responder = new AutoResponder(builder, context);
        return responder;
View Full Code Here

TOP

Related Classes of org.reficio.ws.SoapContext

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.