Package javax.ws.rs

Examples of javax.ws.rs.ProcessingException


                        MessageObserver observer = exchange.get(MessageObserver.class);
                        observer.onMessage(inMessage);
                        return;
                    }
                } catch (IOException ex) {
                    throw new ProcessingException(ex);
                }
            }
        }
    }
View Full Code Here


           
            writer = (MessageBodyWriter<Object>)ProviderFactory.getInstance(m)
                .createMessageBodyWriter(entityCls, entityType, entityAnns, entityMt, m);
            if (writer == null) {
                String errorMessage = JAXRSUtils.logMessageHandlerProblem("NO_MSG_WRITER", entityCls, entityMt);
                throw new ProcessingException(errorMessage);
            }
        }
       
        HttpUtils.convertHeaderValuesToString(headers, true);
       
View Full Code Here

            reader = ProviderFactory.getInstance(m)
                .createMessageBodyReader(entityCls, entityType, entityAnns, entityMt, m);
        }
        if (reader == null) {
            String errorMessage = JAXRSUtils.logMessageHandlerProblem("NO_MSG_READER", entityCls, entityMt);
            throw new ProcessingException(errorMessage);
        }
       
       
        return reader.readFrom(entityCls, entityType, entityAnns, entityMt,
                               new HttpHeadersImpl(m).getRequestHeaders(),
View Full Code Here

        }
        if (stringEntity != null) {
            try {
                return new ByteArrayInputStream(stringEntity.getBytes("UTF-8"));
            } catch (Exception ex) {
                throw new ProcessingException(ex);
            }
        } else {
            return null;
        }
    }
View Full Code Here

                sb.append("Basic ");
                try {
                    String data = consumer.getKey() + ":" + consumer.getSecret();
                    sb.append(Base64Utility.encode(data.getBytes("UTF-8")));
                } catch (Exception ex) {
                    throw new ProcessingException(ex);
                }
                accessTokenService.header("Authorization", sb.toString());
            } else {
                form.param(OAuthConstants.CLIENT_ID, consumer.getKey());
                if (consumer.getSecret() != null) {
View Full Code Here

            MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
            String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
            String macKey = token.getParameters().get(OAuthConstants.MAC_TOKEN_KEY);
            sb.append(macAuthData.toAuthorizationHeader(macAlgo, macKey));
        } else {
            throw new ProcessingException(new OAuthServiceException("Unsupported token type"));
        }
       
    }
View Full Code Here

            new org.apache.cxf.common.i18n.Message(name,
                                                   BUNDLE,
                                                   m.getDeclaringClass().getName(),
                                                   m.getName());
        LOG.severe(errorMsg.toString());
        throw new ProcessingException(errorMsg.toString());
    }
View Full Code Here

                    sb.append(OAuth.percentEncode(entry.getValue())).append('"');
                }
            }
            return sb.toString();
        } catch (Exception ex) {
            throw new ProcessingException(ex);
        }
    }
View Full Code Here

        String str = IOUtils.readStringFromStream(is).trim();
        if (str.length() == 0) {
            return Collections.emptyMap();
        }
        if (!str.startsWith("{") || !str.endsWith("}")) {
            throw new ProcessingException("JSON Sequence is broken");
        }
        Map<String, String> map = new LinkedHashMap<String, String>();
       
        str = str.substring(1, str.length() - 1).trim();
        String[] jsonPairs = str.split(",");
View Full Code Here

            || actualEx instanceof IOException
                && outMessage.getExchange().get("client.redirect.exception") != null) {
            if (actualEx instanceof ProcessingException) {
                throw ex;
            } else if (actualEx != null) {
                throw new ProcessingException(actualEx);
            } else if (!outMessage.getExchange().isOneWay() || cfg.isResponseExpectedForOneway()) {
                waitForResponseCode(outMessage.getExchange());
            }
        }
    }
View Full Code Here

TOP

Related Classes of javax.ws.rs.ProcessingException

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.