Package javax.xml.ws

Examples of javax.xml.ws.ProtocolException


        try {
            Message msg = msgCtx.getMessage();
            if (msg != null && msg.isFault()) {
                //XMLFault fault = msg.getXMLFault();
                // 4.3.2 conformance bullet 1 requires a ProtocolException here
                ProtocolException pe =
                    MethodMarshallerUtils.createSystemException(msg.getXMLFault(), msg);
                if (msgCtx.getLocalException() != null) {
                    // If a local exception occured, set it as the initial cause of the
                    // exception that will be returned
                    ExceptionFactory.setInitialCause(pe, msgCtx.getLocalException());
View Full Code Here


     *
     * @param message
     * @return
     */
    public static ProtocolException createSystemException(XMLFault xmlFault, Message message) {
        ProtocolException e = null;
        Protocol protocol = message.getProtocol();
        String text = xmlFault.getReason().getText();

        if (protocol == Protocol.soap11 || protocol == Protocol.soap12) {
            // Throw a SOAPFaultException
View Full Code Here

                }
                if (exceptionType != null && !outbound && "inbound".equals(direction)) {
                    if ("RuntimeException".equals(exceptionType)) {
                        throw new RuntimeException(exceptionText);
                    } else if ("ProtocolException".equals(exceptionType)) {
                        throw new ProtocolException(exceptionText);
                    } else if ("SOAPFaultException".equals(exceptionType)) {
                        throw createSOAPFaultException(exceptionText);
                    } else if ("SOAPFaultExceptionWDetail".equals(exceptionType)) {
                        throw createSOAPFaultExceptionWithDetail(exceptionText);
                    }
                } else if (exceptionType != null && outbound && "outbound".equals(direction)) {
                    if ("RuntimeException".equals(exceptionType)) {
                        throw new RuntimeException(exceptionText);
                    } else if ("ProtocolException".equals(exceptionType)) {
                        throw new ProtocolException(exceptionText);
                    } else if ("SOAPFaultException".equals(exceptionType)) {
                        throw createSOAPFaultException(exceptionText);
                    } else if ("SOAPFaultExceptionWDetail".equals(exceptionType)) {
                        throw createSOAPFaultExceptionWithDetail(exceptionText);
                    }
View Full Code Here

        TestHandler<LogicalMessageContext> handler2 = new TestHandler<LogicalMessageContext>(false) {
            public boolean handleMessage(LogicalMessageContext ctx) {
                super.handleMessage(ctx);
                Boolean outbound = (Boolean)ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
                if (outbound) {
                    throw new ProtocolException(clientHandlerMessage);
                }  
                return true;
            }
        };
        TestSOAPHandler soapHandler1 = new TestSOAPHandler(false);
View Full Code Here

        TestHandler<LogicalMessageContext> handler2 = new TestHandler<LogicalMessageContext>(false) {
            public boolean handleMessage(LogicalMessageContext ctx) {
                super.handleMessage(ctx);
                Boolean outbound = (Boolean)ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
                if (!outbound) {
                    throw new ProtocolException(clientHandlerMessage);
                }  
                return true;
            }
        };
        TestSOAPHandler soapHandler1 = new TestSOAPHandler(false);
View Full Code Here

        TestSOAPHandler soapHandler1 = new TestSOAPHandler<SOAPMessageContext>(false) {
            public boolean handleMessage(SOAPMessageContext ctx) {
                super.handleMessage(ctx);
                Boolean outbound = (Boolean)ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
                if (outbound) {
                    throw new ProtocolException(clientHandlerMessage);
                }  
                return true;
            }
        };
        TestSOAPHandler soapHandler2 = new TestSOAPHandler(false);
View Full Code Here

        TestSOAPHandler soapHandler1 = new TestSOAPHandler<SOAPMessageContext>(false) {
            public boolean handleMessage(SOAPMessageContext ctx) {
                super.handleMessage(ctx);
                Boolean outbound = (Boolean)ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
                if (!outbound) {
                    throw new ProtocolException(clientHandlerMessage);
                }  
                return true;
            }
        };
        TestSOAPHandler soapHandler2 = new TestSOAPHandler(false);
View Full Code Here

        TestHandler<LogicalMessageContext> handler2 = new TestHandler<LogicalMessageContext>(false) {
            public boolean handleMessage(LogicalMessageContext ctx) {
                super.handleMessage(ctx);
                Boolean outbound = (Boolean)ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
                if (outbound) {
                    throw new ProtocolException(clientHandlerMessage);
                }  
                return true;
            }
        };
        TestSOAPHandler soapHandler1 = new TestSOAPHandler(false);
View Full Code Here

        TestHandler<LogicalMessageContext> handler2 = new TestHandler<LogicalMessageContext>(false) {
            public boolean handleMessage(LogicalMessageContext ctx) {
                super.handleMessage(ctx);
                Boolean outbound = (Boolean)ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
                if (!outbound) {
                    throw new ProtocolException(clientHandlerMessage);
                }  
                return true;
            }
        };
        TestSOAPHandler soapHandler1 = new TestSOAPHandler(false);
View Full Code Here

        TestSOAPHandler soapHandler1 = new TestSOAPHandler<SOAPMessageContext>(false) {
            public boolean handleMessage(SOAPMessageContext ctx) {
                super.handleMessage(ctx);
                Boolean outbound = (Boolean)ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
                if (outbound) {
                    throw new ProtocolException(clientHandlerMessage);
                }  
                return true;
            }
        };
        TestSOAPHandler soapHandler2 = new TestSOAPHandler(false);
View Full Code Here

TOP

Related Classes of javax.xml.ws.ProtocolException

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.