* is available. A real application would need to parse
* the body (as HTML or XML, depending on e.getContentType())
* and display it nicely.
*/
StringBuffer message = new StringBuffer("Response code:");
ServiceErrors errors = new ServiceErrors(e);
if (e.getHttpErrorCodeOverride() > 0) {
message.append(" ");
message.append(e.getHttpErrorCodeOverride());
}
message.append(" ");
message.append(e.getMessage());
System.err.println(message);
List<? extends ServiceError> allErrors = errors.getAllErrors();
for (ServiceError error: allErrors) {
String field = error.getField();
StringBuffer buffer = new StringBuffer();
buffer.append(" ");
if (field != null) {