users@jaxb.java.net

RE: marshal to an Output Stream which is derived from an urlConnection

From: ray_lukas <ray_lukas_at_comcast.net>
Date: Sat, 22 Jan 2005 08:44:45 -0500

Thanks man. I will dig through this.. Thanks ray

-----Original Message-----
From: Kohsuke Kawaguchi [mailto:Kohsuke.Kawaguchi_at_Sun.COM]
Sent: Friday, January 21, 2005 7:59 PM
To: users_at_jaxb.dev.java.net
Subject: Re: marshal to an Output Stream which is derived from an
urlConnection

ray_lukas wrote:
> It is my understanding that JAXB can marshal to an Output Stream which is
> derived from an urlConnection. Is this correct?

I think you mean an OutputStream returned from URLConnection. Yes.

> Here is the code which I
> think should work. Certainly it marshals the ClientConfiguartion object to
> the fileOutPutStream. But not to the urlOutPutStream. Can anyone see why?
I
> have been using JAXB for quite some time and it is great, but I have to
get
> this working because I can not have these files sit on the client
machines.

Given that the data marshals to a File just fine, I'd suspect an
operator error on the usage of URLConnection.

Perhaps this article
(http://www.javaworld.com/javaworld/jw-03-2001/jw-0323-traps.html)
helps? In particular, look at BadURLPost1.java in the middle of the
first page.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net