I was speaking about the network connection where the request has to go
through a proxy connection. This requires parameters to be set on the
connection (or socket) object.
The error that im getting occurs when i read an exception thrown by a
service (exception not related to hessian) found in the response from the
server. So i think the error would be the way i read the response to
hessian. Below is my code for doing that:

 if (status == HttpURLConnection.HTTP_OK) {
// Read reply
   Hessian2Input input =
     new Hessian2Input(httpMethod.getResponseBodyAsStream());
   input.startReply(); // Error occurs here if response contains an
exception
   Object obj = input.getReplyFault();
   if (obj == null) {
     obj = input.readObject();
   }
   input.completeReply ();
   if (obj instanceof Throwable) {
     throw (Throwable) obj;
   } else {
     return obj;
   }
 } else {
   System.out.println(httpMethod.getResponseBodyAsString());
 }


- ian


On 6/29/07, Ben Hood <[EMAIL PROTECTED]> wrote:

On 6/28/07, ian tabangay <[EMAIL PROTECTED]> wrote:
> Hi Ben. Using the Proxy limits my ability to add headers into my
connection
> and handle authentications that is not limited to basic. Configuring the
> connection that passes thru a proxy server is also a concern for the
client
> application i am creating.

Not sure I quite understand what you mean by proxy server. I was
talking about the client proxy in caucho's hessian lib that provides a
high level interface to the protocol. If you need a lower level
interface, I suggest in your circumstance to do the following:

OuputStream os = ...... this is the stream from your _custom_ http
connection
HessianOutput output = new HessianOutput(os);
output.call(method, args);
os.flush();

HTH,

Ben

_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to