You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ben Anderson <be...@gmail.com> on 2005/03/25 13:43:15 UTC

posting xml

Hi,
What's the easiest way to post xml?  Right now I'm using the jakarta
common's httpclient api.  It looks like maybe the cinclude transformer
might do it, but I can't nail down exactly how.  I see that you can
post parameters as key/value pairs, but that's not what we want.  If
the cinclude doesn't do it, is there another way?
Thanks,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: posting xml

Posted by Leszek Gawron <lg...@apache.org>.
Ben Anderson wrote:
> well, I guess we could...  I orginally steered away from that idea
> because it seemed that required the xml to be http encoded.  Is that
> true?  I also don't see why we would want the parameter, when it
> doesn't actually mean anything.  The way we're doing it is closer to
> the way soap works.  Whether that's good or bad - I don't know.  This
> is also an external api, so we will be providing the server only.  It
> seems more standard to me to just tell the client to post the xml as
> the request content instead of as a parameter value, but we're not
> locked into this.

I am posting xmls the same way you do - with httpclient. There are 
several advantages over sending xml as form field:

- smaller requests - with forms everything has to be encoded
- you may post bigger documents as you can read them on the server side 
from stream instead of parsing everything into a String.

-- 
Leszek Gawron                                                 MobileBox
lgawron@apache.org                              http://www.mobilebox.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: posting xml

Posted by Ben Anderson <be...@gmail.com>.
well, I guess we could...  I orginally steered away from that idea
because it seemed that required the xml to be http encoded.  Is that
true?  I also don't see why we would want the parameter, when it
doesn't actually mean anything.  The way we're doing it is closer to
the way soap works.  Whether that's good or bad - I don't know.  This
is also an external api, so we will be providing the server only.  It
seems more standard to me to just tell the client to post the xml as
the request content instead of as a parameter value, but we're not
locked into this.
-Ben


On Fri, 25 Mar 2005 07:41:33 -0600, Lars Huttar <la...@sil.org> wrote:
> Ben Anderson wrote:
> 
> >Hi,
> >What's the easiest way to post xml?  Right now I'm using the jakarta
> >common's httpclient api.  It looks like maybe the cinclude transformer
> >might do it, but I can't nail down exactly how.  I see that you can
> >post parameters as key/value pairs, but that's not what we want.  If
> >the cinclude doesn't do it, is there another way?
> >Thanks,
> >Ben
> >
> >
> Why not just post your XML as the value of one of the key/pairs (using
> cinclude)?
> Can you be more specific about what your constraints are?
> 
> Regards,
> Lars
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: posting xml

Posted by Lars Huttar <la...@sil.org>.
Ben Anderson wrote:

>Hi,
>What's the easiest way to post xml?  Right now I'm using the jakarta
>common's httpclient api.  It looks like maybe the cinclude transformer
>might do it, but I can't nail down exactly how.  I see that you can
>post parameters as key/value pairs, but that's not what we want.  If
>the cinclude doesn't do it, is there another way?
>Thanks,
>Ben
>  
>
Why not just post your XML as the value of one of the key/pairs (using 
cinclude)?
Can you be more specific about what your constraints are?

Regards,
Lars


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org