|Syntactic Confectionery Delight|
Re: HTTP Post of XML databy dorko (Parson)
|on Nov 14, 2007 at 03:37 UTC||Need Help??|
UPDATE: The original post was modified between the time I started writing and the time I posted this response. I'm sure my response looks odd now, so all bets are off on my response making any kind of sense.
From the docs for XML::Writer, the OUTPUT parameter of an XML::Writer object must be either an "object blessed into IO::Handle or one of its subclasses (such as IO::File), or a reference to a string." I'm pretty sure that $browser->post('http://localhost:8180/automanager/request') is neither of those.
Plus, from the SYNOPSIS section of the XML::Writer docs, I'm pretty sure all you've done is created an object. It takes a bit more to actually create XML. This untested snippet is modified from the synopsis of the XML::Writer docs:
If you then POST $output to your URL, I think that will do what you want. You'll need to specify $object as the Content of the POST (See the REQUEST METHODS section of the LWP::UserAgent docs. I remember having to use HTTP::Request::Common to build the request, but I don't remember why I needed to do that at the moment.)
All this is from a quick read of the docs and from memory so it could all be way off base, but I think it at least points you in the right directions.
-- Yeah, I'm a Delt.