logo       

Re: sending more then one packet: msg#00038

php.nusoap.general

Subject: Re: sending more then one packet

What do you mean by "packet"? Do you literally mean that the request must be
sent in exactly 2 TCP/IP packets? That is a truly bizarre requirement that
sounds like poor coding on the server. I think this would be a challenging
requirement for most SOAP client implementations.

Here is my suggestion for modifying NuSOAP's soap_transport_http class to work
with this server.

1. In buildPayload, comment out the last line

$this->outgoing_payload .= $data;

This will mean the $this->outgoing_payload will only have the HTTP headers.

2. In sendRequest, you will see the following code

if(!fputs($this->fp, $this->outgoing_payload,
strlen($this->outgoing_payload))) {
$this->setError('couldn\'t write message data to socket');
$this->debug('couldn\'t write message data to socket');
return false;
}
$this->debug('wrote data to socket, length = ' .
strlen($this->outgoing_payload));

After that, add the following

fflush($this->fp);
if(!fputs($this->fp, $data, strlen($data))) {
$this->setError('couldn\'t write message data to socket');
$this->debug('couldn\'t write message data to socket');
return false;
}
$this->debug('wrote data to socket, length = ' . strlen($data));

This will make NuSOAP write the data to the socket in 2 separate writes. The
underlying TCP/IP implementation is free to coalesce these 2 writes into a
single packet, but most of the time with most implementations, it will be sent
as two packets.

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: "Bishop, Ryan" <Ryan.Bishop@xxxxxxxxxx>
To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, May 06, 2004 4:42 PM
Subject: [Nusoap-general] sending more then one packet


hello,

im sending my SOAP request all in one packet, however the SOAP server needs
it to be in two packets. one for the header, ie. POST /4DSOAP/
HTTP/1.0User-Agent: NuSOAP/0.6.7 (1.75)Host: Content-Type: text/xml;
charset=ISO-8859-1Content-Length: 538

and another packet for the <SOAP -ENV code...

anyone know how or have to split this into two packets to get a result back
using nusoap ?

thanks for any help

Ryan


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
Nusoap-general mailing list
Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/nusoap-general



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3


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

News | FAQ | advertise