I think this will be intresting in the future when HTTP servers will be
used for other things than just web pages serving.
First thing i can think of is XML-RPC and SOAP technologie . Maybe this
is something for a future release of the ASP framework ?

        greetings,
        luc

Joshua Chamas wrote:
> 
> I have an ASP version which incorporates this patch for reading
> non-form POST data.  Let me know if you all want it.
> 
> --Josh
> 
> Luc Willems wrote:
> >
> > the result of $Response-> is also empty.
> >
> > i had a look into the Apache::ASP source code and found this :
> > (line 843)
> >
> >             $self->{content} = $r->content();
> >             tie(*STDIN, 'Apache::ASP::Request', $self)
> >               if defined($self->{content});
> >
> > this means that it's comming from $r->content() which i think is a
> > apache object.
> > (what the tie does , i don't know )
> > so looking further in the apache module i found that
> >
> > sub content {
> >     my($r) = @_;
> >     my $ct = $r->header_in("Content-type") || "";
> >     return unless $ct eq "application/x-www-form-urlencoded";
> >     my $buff;
> >     $r->read($buff, $r->header_in("Content-length"));
> >     parse_args(wantarray, $buff);
> > }
> >
> > it seems that the "Content-type" must be
> > "application/x-www-form-urlencoded" before we can get anything out of
> > the content() routine from mod_perl :-(
> >
> > So i tried  this
> >
> > #Get posted XML query
> > $len = $Request->{TotalBytes};
> > $Request->{asp}->{r}->read($i,$len);
> >
> > this will work always without taking into acount the content-type ,
> > which is text/xml
> >
> > I don't know if there is any problem with doing it this way ?
> >
> > If anybody has a clue on this , let me know .
> >
> >         greetings,
> >         luc
> >
> > Brendan McKenna wrote:
> > >
> > > Hi,
> > >
> > >         The 156 bytes are your data.  Since you're using Perl, you should be
> > > able to access your data using $Response->content;
> > >
> > >                                                         Brendan
> > > :
> > > :       hello ,
> > > :
> > > :
> > > : i'm working on a project that involves some XML-RPC system. The idea is
> > > : to POST a XML to a ASP script which will than process this
> > > : and return a XML back to the client.
> > > :
> > > : To do that a send sommething like this (output from ethereal dump) :
> > > :
> > > : POST /cp-bin/rc2.asp HTTP/1.0
> > > : Host: linux
> > > : User-Agent: libwww-perl/5.36
> > > : Content-Length: 156
> > > : Content-Type: text/xml
> > > :
> > > : <?xml version="1.0"?>
> > > : <methodCall>
> > > : <methodName>examples.getStateName</methodName>
> > > : <params>
> > > : <param><value><i4>1</i4></value></param>
> > > : </params>
> > > : </methodCall>
> > > :
> > > : The problem now is , that in the asp script i get a Totalbytes of 156
> > > : bytes but the content string is empty ?
> > > :
> > > : #Get posted XML query
> > > : my $len = $Request->{TotalBytes};
> > > : my $i   = $Request->BinaryRead($len);
> > > :
> > > : #log input query
> > > : $Response->Debug("recieved $len bytes");
> > > : $Response->Debug("data [$i]");
> > > :
> > > : Does anybody has a clue where the 156 bytes are ???
> > > :
> > > :               thanks
> > > :       luc willems
> > > :
> > > : ---------------------------------------------------------------------
> > > : To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > : For additional commands, e-mail: [EMAIL PROTECTED]
> > > :
> > >
> > > --
> > > Brendan McKenna
> > > Technical Director                      Phone: +353-(0)61-338177 x4143
> > > W3 Services Ltd.                          Fax: +353-(0)61-338065
> > > Innovation Centre                       Email: [EMAIL PROTECTED]
> > > National Technological Park
> > > Limerick
> > > Ireland

Reply via email to