Package org.apache.cxf.jaxws.schemavalidation

Examples of org.apache.cxf.jaxws.schemavalidation.RequestIdType


        ServicePortType greeter = service.getPort(portName, ServicePortType.class);
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        updateAddressPort(greeter, PORT);

        RequestIdType requestId = new RequestIdType();
        requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
        CkRequestType request = new CkRequestType();
        request.setRequest(requestId);
        ((BindingProvider)greeter).getRequestContext().put("schema-validation-enabled", Boolean.TRUE);
        CkResponseType response = greeter.ckR(request);
        assertEquals(response.getProduct().get(0).getAction().getStatus(), 4);
       
        try {
            requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeez");
            request.setRequest(requestId);
            greeter.ckR(request);
            fail("should catch marshall exception as the invalid outgoing message per schema");
        } catch (Exception e) {
            assertTrue(e.getMessage().contains("Marshalling Error"));
View Full Code Here


        ServicePortType greeter = service.getPort(portName, ServicePortType.class);
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        updateAddressPort(greeter, PORT);

        RequestIdType requestId = new RequestIdType();
        requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
        CkRequestType request = new CkRequestType();
        request.setRequest(requestId);
        ((BindingProvider)greeter).getRequestContext().put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE);
        RequestHeader header = new RequestHeader();
        header.setHeaderValue("AABBCC");
        CkResponseType response = greeter.ckR(request, header);
        assertEquals(response.getProduct().get(0).getAction().getStatus(), 4);
       
        try {
            requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeez");
            request.setRequest(requestId);
            greeter.ckR(request, header);
            fail("should catch marshall exception as the invalid outgoing message per schema");
        } catch (Exception e) {
            assertTrue(e.getMessage().contains("Marshalling Error"));
            assertTrue(e.getMessage().contains("is not facet-valid with respect to pattern"));
        }

        try {
            requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
            request.setRequest(requestId);
            header.setHeaderValue("AABBCCDDEEFFGGHHIIJJ");
           
            //Check if incoming validation on server side works, turn off outgoing
            greeter.ckR(request, header);
            fail("should catch marshall exception as the invalid outgoing message per schema");
        } catch (Exception e) {
            assertTrue(e.getMessage().contains("Marshalling Error"));
            assertTrue(e.getMessage().contains("is not facet-valid with respect to maxLength"));
        }
       
        try {
            requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
            request.setRequest(requestId);
            header.setHeaderValue("AABBCCDDEEFFGGHHIIJJ");
           
            //Check if incoming validation on server side works, turn off outgoing
            ((BindingProvider)greeter).getRequestContext().put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.FALSE);
View Full Code Here

        ServicePortType greeter = service.getPort(portName, ServicePortType.class);
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        updateAddressPort(greeter, PORT);

        RequestIdType requestId = new RequestIdType();
        requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
        CkRequestType request = new CkRequestType();
        request.setRequest(requestId);
        ((BindingProvider)greeter).getRequestContext().put("schema-validation-enabled", Boolean.TRUE);
        CkResponseType response = greeter.ckR(request);
        assertEquals(response.getProduct().get(0).getAction().getStatus(), 4);
       
        try {
            requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeez");
            request.setRequest(requestId);
            greeter.ckR(request);
            fail("should catch marshall exception as the invalid outgoing message per schema");
        } catch (Exception e) {
            assertTrue(e.getMessage().contains("Marshalling Error"));
View Full Code Here

        ServicePortType greeter = service.getPort(portName, ServicePortType.class);
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        updateAddressPort(greeter, PORT);

        RequestIdType requestId = new RequestIdType();
        requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
        CkRequestType request = new CkRequestType();
        request.setRequest(requestId);
        ((BindingProvider)greeter).getRequestContext().put("schema-validation-enabled", Boolean.TRUE);
        CkResponseType response = greeter.ckR(request);
        assertEquals(response.getProduct().get(0).getAction().getStatus(), 4);
       
        try {
            requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeez");
            request.setRequest(requestId);
            greeter.ckR(request);
            fail("should catch marshall exception as the invalid outgoing message per schema");
        } catch (Exception e) {
            assertTrue(e.getMessage().contains("Marshalling Error"));
View Full Code Here

        ServicePortType greeter = service.getPort(portName, ServicePortType.class);
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        updateAddressPort(greeter, PORT);

        RequestIdType requestId = new RequestIdType();
        requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
        CkRequestType request = new CkRequestType();
        request.setRequest(requestId);
        ((BindingProvider)greeter).getRequestContext().put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE);
        CkResponseType response = greeter.ckR(request);
        assertEquals(response.getProduct().get(0).getAction().getStatus(), 4);
       
        try {
            requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeez");
            request.setRequest(requestId);
            greeter.ckR(request);
            fail("should catch marshall exception as the invalid outgoing message per schema");
        } catch (Exception e) {
            assertTrue(e.getMessage().contains("Marshalling Error"));
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxws.schemavalidation.RequestIdType

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.