logo       

Re: HTTP_RAW_POST_DATA Strangeness: msg#00075

php.nusoap.general

Subject: Re: HTTP_RAW_POST_DATA Strangeness

You are correct: service($data) does not care where the $data comes from. That
means, for instance, that it is possible to write a test harness that calls
service with $data read from a file.

For an HTTP GET, service ignores $data and returns the WSDL or the
documentation page. For an HTTP POST, service assumes it is handling a SOAP
call, so $data must be a SOAP envelope. It is your job to provide service with
that SOAP envelope. Normally, the body of the HTTP POST is the envelope, which
is why programmers typically use $HTTP_RAW_POST_DATA. If your PHP
configuration prevents you from using $HTTP_RAW_POST_DATA, you must find an
alternative way to get the data that service needs.

If you are using PHP 4.3.0 or later, you can use the php://input stream.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Subs" <subs@xxxxxxxxxxxxxxxxxxxxxxxx>
To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, April 21, 2004 6:00 PM
Subject: [Nusoap-general] HTTP_RAW_POST_DATA Strangeness


Hello,

I am having a strange problem that seems to be based on a setting in
php.ini: always_populate_raw_post_data=On vs Off

If this value is not set to On (which I have no control over at a shared
hosting server) the following code will produce a valid WSDL, but when the
service is called it faults with 'xml was empty, didn't parse'.

Works if always_populate_raw_post_data=On:
$server->service($HTTP_RAW_POST_DATA);

Generates correct WSDL for service.php?wsdl:
$server->service($_POST); // generates above fault when called though

Only way it works with =Off:
$HTTP_RAW_POST_DATA = @$HTTP_RAW_POST_DATA ? $HTTP_RAW_POST_DATA : $_POST;
$server->service($HTTP_RAW_POST_DATA);

I can't see where the service($data) would care where the $data came
from in nusoap.php (nor anywhere else $HTTP_RAW_POST_DATA is referenced).

This is with latest CVS nusoap.php v 1.72,
John



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Nusoap-general mailing list
Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/nusoap-general



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise