Package org.apache.schema_validation.types

Examples of org.apache.schema_validation.types.SomeResponse


        return occuringStruct;
    }

    @Override
    public SomeResponse doSomething(SomeRequest in) throws DoSomethingFault {
        SomeResponse response = new SomeResponse();
        if (in.getId().equals("1234567890")) {
            response.setTransactionId("aaaaaaaaaaxxx"); // invalid transaction id
        } else if (in.getId().equals("9999999999")) {
            SomeFault someFault = new SomeFault();
            someFault.setErrorCode("1234");
            throw new DoSomethingFault("Fault", someFault);
        } else if (in.getId().equals("8888888888")) {
            SomeFault someFault = new SomeFault();
            someFault.setErrorCode("1");
            throw new DoSomethingFault("Fault", someFault);
        } else {
            response.setTransactionId("aaaaaaaaaa");
        }
       
        return response;
    }
View Full Code Here


    }
   
    private void assertFailureResponseValidation(Object validationConfig) throws Exception {
        SchemaValidation service = createService(validationConfig);
       
        SomeResponse response = execute(service, "1111111111"); // valid request
        assertEquals(response.getTransactionId(), "aaaaaaaaaa");
       
        try {
            execute(service, "1234567890"); // valid request, but will result in invalid response
            fail("should catch marshall exception as the invalid incoming message per schema");
        } catch (Exception e) {
View Full Code Here

   
    private void assertIgnoredRequestValidation(Object validationConfig) throws Exception {
        SchemaValidation service = createService(validationConfig);
       
        // this is an invalid request but validation is turned off.
        SomeResponse response = execute(service, "1234567890aaaa");
        assertEquals(response.getTransactionId(), "aaaaaaaaaa");
        ((java.io.Closeable)service).close();
    }
View Full Code Here

   
    private void assertIgnoredResponseValidation(Object validationConfig) throws Exception {
        SchemaValidation service = createService(validationConfig);
       
        // the request will result in invalid response but validation is turned off
        SomeResponse response = execute(service, "1234567890");
        assertEquals(response.getTransactionId(), "aaaaaaaaaaxxx");
        ((java.io.Closeable)service).close();
    }
View Full Code Here

    }
   
    private void assertFailedRequestValidation(Object validationConfig) throws Exception {
        SchemaValidation service = createService(validationConfig);
       
        SomeResponse response = execute(service, "1111111111");
        assertEquals(response.getTransactionId(), "aaaaaaaaaa");
       
        try {
            execute(service, "1234567890aaa");
            fail("should catch marshall exception as the invalid outgoing message per schema");
        } catch (Exception e) {
View Full Code Here

        return occuringStruct;
    }

    @Override
    public SomeResponse doSomething(SomeRequest in) {
        SomeResponse response = new SomeResponse();
        if (in.getId().equals("1234567890")) {
            response.setTransactionId("aaaaaaaaaaxxx"); // invalid transaction id
        } else {
            response.setTransactionId("aaaaaaaaaa");
        }
       
        return response;
    }
View Full Code Here

        floatIntStringList.add(new Float(2.5f));
        return occuringStruct;
    }

    public SomeResponse doSomething(SomeRequest in) {
        SomeResponse response = new SomeResponse();
        if (in.getId().equals("1234567890")) {
            response.setTransactionId("aaaaaaaaaaxxx"); // invalid transaction id
        } else {
            response.setTransactionId("aaaaaaaaaa");
        }
       
        return response;
    }
View Full Code Here

    }
   
    private void assertFailureResponseValidation(Object validationConfig) throws Exception {
        SchemaValidation service = createService(validationConfig);
       
        SomeResponse response = execute(service, "1111111111"); // valid request
        assertEquals(response.getTransactionId(), "aaaaaaaaaa");
       
        try {
            execute(service, "1234567890"); // valid request, but will result in invalid response
            fail("should catch marshall exception as the invalid incoming message per schema");
        } catch (Exception e) {
View Full Code Here

   
    private void assertIgnoredRequestValidation(Object validationConfig) throws Exception {
        SchemaValidation service = createService(validationConfig);
       
        // this is an invalid request but validation is turned off.
        SomeResponse response = execute(service, "1234567890aaaa");
        assertEquals(response.getTransactionId(), "aaaaaaaaaa");
    }
View Full Code Here

   
    private void assertIgnoredResponseValidation(Object validationConfig) throws Exception {
        SchemaValidation service = createService(validationConfig);
       
        // the request will result in invalid response but validation is turned off
        SomeResponse response = execute(service, "1234567890");
        assertEquals(response.getTransactionId(), "aaaaaaaaaaxxx");
    }
View Full Code Here

TOP

Related Classes of org.apache.schema_validation.types.SomeResponse

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.