void   
setEntity<http://www.restlet.org/documentation/2.0/jse/api/org/restlet/Message.html#setEntity(java.lang.String,%20org.restlet.data.MediaType)>(String<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true>
 value, 
MediaType<http://www.restlet.org/documentation/2.0/jse/api/org/restlet/data/MediaType.html>
 mediaType)
          Sets a textual entity.


Paul Morris

On Sep 1, 2012, at 6:35 PM, "Stephen More" 
<stephen.m...@gmail.com<mailto:stephen.m...@gmail.com>> wrote:

I have a ServerResource that has:

throw new org.restlet.resource.ResourceException( 
org.restlet.data.Status.CLIENT_ERROR_BAD_REQUEST, "CompanyId required" );

My client will:

catch( org.restlet.resource.ResourceException re )
{
 org.restlet.data.Status status = re.getStatus();
 log.error( "Error: " + status.getDescription() );
}
finally
{
 org.restlet.representation.Representation entity = cr.getResponseEntity();
 if( entity != null )
 {
     entity.release();
 }
}



How can I get the client to see the error message of: "CompanyId required" ? 
The only output the client is seeing is "Bad Request". I am using version 2.0.15

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3002847
This message and any included attachments are intended only for the addressee. 
The information contained in this message is confidential and may constitute 
proprietary or non-public information under international, federal, or state 
laws. Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3002864

Reply via email to