Examples of ProtocolException


Examples of javax.xml.ws.ProtocolException

        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

Examples of javax.xml.ws.ProtocolException

        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

Examples of javax.xml.ws.ProtocolException

        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

Examples of net.buffalo.protocal.ProtocolException

    if (value.equals("1")) {
      return Boolean.TRUE;
    } else if (value.equals("0")) {
      return Boolean.FALSE;
    } else {
      throw new ProtocolException("<"+ProtocalTag.TAG_BOOLEAN+"> contains only 1 or 0: "+ value);
    }
  }
View Full Code Here

Examples of net.kuujo.copycat.protocol.ProtocolException

            state.currentTerm(response.term());
            state.currentLeader(null);
            state.transition(FollowerController.class);
            triggerPingFutures(index, new CopycatException("Not the leader"));
          } else if (!response.succeeded()) {
            triggerPingFutures(index, new ProtocolException("Replica not in sync"));
          } else {
            triggerPingFutures(index);
          }
        } else {
          triggerPingFutures(index, response.error());
View Full Code Here

Examples of net.plan99.payfile.ProtocolException

                sendError(e);
            } catch (IOException ignored) {}
        } catch (Throwable t) {
            // Internal server error.
            try {
                sendError(new ProtocolException(ProtocolException.Code.INTERNAL_ERROR, "Internal server error: " + t.toString()));
            } catch (IOException ignored) {}
        } finally {
            forceClose();
        }
    }
View Full Code Here

Examples of net.sf.jz3950.ProtocolException

        PresentResponse_type presentResponse = (PresentResponse_type) pdu.o;
        Records_type recordsType = presentResponse.records;

        if (recordsType == null)
        {
            throw new ProtocolException("Records attribute of present-response PDU is null");
        }

        if (recordsType.which != Records_type.responserecords_CID)
        {
            // TODO: care about diagnostic records
            throw new ProtocolException("Present-response PDU does not contain response records (maybe diagnostic info)");
        }

        this.records = new ArrayList<Record>(this.numOfRecords);

        for (NamePlusRecord_type namePlusRecordType : (List<NamePlusRecord_type>) recordsType.o)
        {
            for (RecordDecoder decoder : this.association.getRecordDecoders())
            {
                if (decoder.decodes(namePlusRecordType))
                {
                    try
                    {
                        this.records.add(decoder.decode(namePlusRecordType));

                        break;
                    }
                    catch (RecordFormatException e)
                    {
                        throw new ProtocolException("Record format error while parsing present-response PDU", e);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.cassandra.transport.ProtocolException

            int remaining = in.readInt();
            return new PagingState(pk, cn, remaining);
        }
        catch (IOException e)
        {
            throw new ProtocolException("Invalid value for the paging state");
        }
    }
View Full Code Here

Examples of org.apache.commons.httpclient.ProtocolException

        long contentLength = getRequestContentLength();

        if ((contentLength == CONTENT_LENGTH_CHUNKED)
         && getEffectiveVersion().lessEquals(HttpVersion.HTTP_1_0)) {
            throw new ProtocolException(
                "Chunked transfer encoding not allowed for " +
                getEffectiveVersion().toString());
        }
       
        this.requestEntity = generateRequestEntity();
        if (requestEntity == null) {
            LOG.debug("Request body is empty");
            return true;
        }

        if ((this.repeatCount > 0) && !requestEntity.isRepeatable()) {
            throw new ProtocolException(
                "Unbuffered entity enclosing request can not be repeated.");
        }

        this.repeatCount++;
View Full Code Here

Examples of org.apache.geronimo.network.protocol.ProtocolException

                Object opaque = popSynchronization.beforePop(streamInputStream);
                msg = (Msg) streamInputStream.readObject();
                popSynchronization.afterPop(streamInputStream, msg, opaque);
            }
        } catch (ClassNotFoundException e) {
            throw new ProtocolException(e);
        } catch (IOException e) {
            throw new ProtocolException(e);
        }
        out.push(msg);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.