@Test public void faultNotAllowed() throws Exception { thrown.expectError(ErrorCodes.X_INTERNAL_ERROR); ProxyMessageDecoder decoder = createDecoder(MimeTypes.TEXT_XML); decoder.parse(null); assertNull(callback.getMessage()); }
public void parse(InputStream is) throws Exception { LOG.trace("parse()"); String baseContentType = HttpFields.valueParameters(contentType, null); if (faultAllowed && baseContentType.equalsIgnoreCase(TEXT_XML)) { parseFault(is); } else if (baseContentType.equalsIgnoreCase(MULTIPART_MIXED)) { parseMultipart(is); } else { throw new CodedException(X_INVALID_CONTENT_TYPE, "Invalid content type: %s", baseContentType); } }
ProxyMessageDecoder { public void parse(InputStream is) throws Exception { LOG.trace("parse()"); String baseContentType = HttpFields.valueParameters(contentType, null); if (faultAllowed && baseContentType.equalsIgnoreCase(TEXT_XML)) { parseFault(is); } else if (baseContentType.equalsIgnoreCase(MULTIPART_MIXED)) { parseMultipart(is); } else { throw new CodedException(X_INVALID_CONTENT_TYPE, "Invalid content type: %s", baseContentType); } } }
ProxyMessageDecoder { public void parse(InputStream is) throws Exception { LOG.trace("parse()"); String baseContentType = HttpFields.valueParameters(contentType, null); if (faultAllowed && baseContentType.equalsIgnoreCase(TEXT_XML)) { parseFault(is); } else if (baseContentType.equalsIgnoreCase(MULTIPART_MIXED)) { parseMultipart(is); } else { throw new CodedException(X_INVALID_CONTENT_TYPE, "Invalid content type: %s", baseContentType); } } ProxyMessageDecoder(ProxyMessageConsumer callback,
                               String contentType, String hashAlgoId);  ProxyMessageDecoder(ProxyMessageConsumer callback,
                               String contentType, boolean faultAllowed, String hashAlgoId); }
ProxyMessageDecoder { public void parse(InputStream is) throws Exception { LOG.trace("parse()"); String baseContentType = HttpFields.valueParameters(contentType, null); if (faultAllowed && baseContentType.equalsIgnoreCase(TEXT_XML)) { parseFault(is); } else if (baseContentType.equalsIgnoreCase(MULTIPART_MIXED)) { parseMultipart(is); } else { throw new CodedException(X_INVALID_CONTENT_TYPE, "Invalid content type: %s", baseContentType); } } ProxyMessageDecoder(ProxyMessageConsumer callback,
                               String contentType, String hashAlgoId);  ProxyMessageDecoder(ProxyMessageConsumer callback,
                               String contentType, boolean faultAllowed, String hashAlgoId); void parse(InputStream is); void verify(ClientId sender, SignatureData signatureData); int getAttachmentCount(); }
ProxyMessageDecoder { public void parse(InputStream is) throws Exception { LOG.trace("parse()"); String baseContentType = HttpFields.valueParameters(contentType, null); if (faultAllowed && baseContentType.equalsIgnoreCase(TEXT_XML)) { parseFault(is); } else if (baseContentType.equalsIgnoreCase(MULTIPART_MIXED)) { parseMultipart(is); } else { throw new CodedException(X_INVALID_CONTENT_TYPE, "Invalid content type: %s", baseContentType); } } ProxyMessageDecoder(ProxyMessageConsumer callback,
                               String contentType, String hashAlgoId);  ProxyMessageDecoder(ProxyMessageConsumer callback,
                               String contentType, boolean faultAllowed, String hashAlgoId); void parse(InputStream is); void verify(ClientId sender, SignatureData signatureData); int getAttachmentCount();  }