Re: how to postback to a different URL than the one making the request?

vidals <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Organization http://groups.google.com
Message-ID <[email protected]>
On May 31, 4:00 pm, [email protected] (Ted Behling) wrote:
> Hi,
>
> To get a useful answer, you're going to have to break down your problem
> a bit more clearly.  LWP has nothing to do with XML, specifically.  All
> it does it make HTTP requests (usually GET or POST).  When you say "send
> data", are you talking about making a POST request, or replying to an
> incoming request?  The latter would not use LWP at all.  If you were to
> perhaps reply with a list of the exact steps required by your algorithm,
> we could probably point you in the right direction.
>
> Ted Behling
>
> -----Original Message-----
> From: vidals [mailto:[email protected]]
> Sent: Thursday, May 31, 2007 4:32 PM
> To: [email protected]; [email protected]
> Subject: how to postback to a different URL than the one making the
>
> request?
>
> I'm writing an XML function that will listen for requests for data and
> then respond with the data. Simple enough; however, the data needs to be
> sent to the URL specified in the request. For example, the resultant
> data may needed bywww.123.comone time andwww.abc.comanother time.
>
> I use LWP all the time for requesting web pages, but can somebody
> provide some guidance as to how LWP can be used to send data? I'm
> confused.
>
> Thanks!
>
> RE: how to postback to a different URL than the one making the request?

You're right perhaps, I'm not thinking about my problem correctly. I'm
going to receive a request that is in XML format, like so:

<?xml version="1.0"?>
<!DOCTYPE RankRequest [
<!ELEMENT RankRequest (authorization,request,response)>
<!ELEMENT authorization (authtoken,guid,postbackurl)>
<!ELEMENT request (engines,release,keywords)>
<!ELEMENT response (result)+>
<!ELEMENT authtoken (#PCDATA)>
<!ELEMENT guid (#PCDATA)>
<!ELEMENT postbackurl (#PCDATA)>
<!ELEMENT engines (engine)+>
<!ELEMENT release (title,body)>
<!ELEMENT keywords (keyword)+>
<!ELEMENT result (engine,keyword,errorcode,datetime,pagerank,html)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ELEMENT errorcode (#PCDATA)>
<!ELEMENT datetime (#PCDATA)>
<!ELEMENT pagerank (#PCDATA)>
<!ELEMENT html (#PCDATA)>
<!ELEMENT engine (#PCDATA)>
<!ELEMENT keyword (#PCDATA)>
]>
<RankRequest>
	<authorization>
		<authtoken>sampletoken</authtoken>
		<guid>sampleguid</guid>
		<postbackurl>sample.url.com</postbackurl>
	</authorization>

The postbackurl, sample.url.com is where I need to send the data and
I'm not sure how to do this. I thought lwp would come to the rescue
since I am so use to using it, but perhaps my thinking is in error and
LWP is not the right solution here?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.