logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: HTTP error: msg#00016

Subject: Re: HTTP error
What the provider is doing is outside the scope of SOAP over HTTP.  You would 
need to hack NuSOAP to support this.

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: "David Matlock" <dmatlock@xxxxxxxxxxxxxxxxx>
To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, March 04, 2005 11:21 AM
Subject: [Nusoap-general] HTTP error


> I am creating an application to work with a clients phone system 
> (Alcatel), and when the script runs, it rings the employee's station, 
> and when he picks up it rings out to the callee.  That is working fine.  
> A function of this system is that you can 'subscribe' to phone events 
> such as busy, ringing, active, etc.  I am receiving an error when I get 
> to this point.
> 
> A brief description of how it works. You login to the system and a 
> session ID is returned.  That session ID is used everywhere for the rest 
> of that session. 
> 
>     Example: $client->call('subscribe',$sessionId);
> 
> The error says: "HTTP Error: socket read of chunk length timed out"
> 
> I am using a provided wsdl file to create a client, and I think I have 
> to create a server from this wsdl as well, but I am having issues with 
> that as well (not sure how to set that up).  That may also be what is 
> causing my HTTP error problem.
> 
> In the API it states:
> 
>     Events subscription - Notification Operation
>     In addition to the traditional behavior of an HTTP server which
>     suits well to the SOAP protocol mapping, the OTS XML-API offers the
>     capability to deliver asynchronous events to the clients. For that
>     purpose, a special /subscribe/ request shall be invoked by the
>     client. The procedure must be the following:
> 
>         * the client shall send its subscribing request on a new
>           permanent HTTP connexion,
>         * the OTS sends its SOAP response using the chunked
>           Transfer_Coding (cf [HTTP] /3.6 Transfer Codings/) in order to
>           deliver the events as a boundless series of chunked packets
>           (the first packet containing the SOAP response and the
>           following the events)
> 
>     Actually, in case of using events subscription, _*there are 2 HTTP
>     connections*_, one for the service invoke and one for the event
>     reception _*per each client session*_.
> 
> As you can see, "the first packet returned is the SOAP response and the 
> following the events".  I can see the SOAP response, I don't see 
> anything after that.
> 
> I know that is a lot and I apologize for that, but I have exhausted my 
> resources for help.  The rep from Alcatel that I am working with does 
> not know how to use this version of the system.  So he is no help.  
> Below will be a short synopsis of my code.  Thank you in advance.
> 
>     *CLIENT*
>     <?
>     require_once("nusoap.php");
>     $client = new soapclient("thewsdl.wsdl",true);
> 
>     /*************** Login ***************/
>     $loginparams = array('loginName'=>'test','password'=>'test');
>     $loginresult = $client->call('login',array('invoke'=>$loginparams));
>     $sessionId = $loginresult['sessionId'];
> 
>     /*************** Subscribe To Events ***************/
>     $subparams = array('sessionId'=>$sessionId);
>     $subresult = $client->call('subscribe',$subparams);
> 
>     /*************** Make Call ***************/
>     $callparams =
>     
> array('sessionId'=>$sessionId,'callee'=>'##########','mode'=>'normal','businessCodeOrPin'=>'','secretCode'=>'');
>     $callresult = $client->call('makeCall',array('invoke'=>$callparams));
> 
>     /*************** Unsubscribe From Events ***************/
>     $unsubparams = array('sessionId'=>$sessionId);
>     $unsubresult = $client->call('unsubscribe',$unsubparams);
> 
>     /*************** Logout ***************/
>     $logoutparams = array('sessionId'=>$sessionId);
>     $logoutresult = $client->call('logout',$logoutparams); ?>
> 
>     *SERVER*
>     <?
>     require_once("nusoap.php");
>     $server = new soap_server("thewsdl.wsdl", true);
> 
>     function e_callState($sessionId, $call){
>         global $server;
>        
>         $session = $sessionId;
>         $callparams = $call[0];
>         $callRef = $callparams['callRef'];
>         $number = $callparams['number'];
>         $name = $callparams['name'];
>         $stateCall = $callparams['state'];
> 
>         $fh = fopen("logfile.txt", "a");
>         printDebug ($fh, "CallRef = ".$callRef);
>         printDebug ($fh, "Name = ".$name);
>         printDebug ($fh, "Number = ".$number);
>         printDebug ($fh, "State = ".$stateCall);
>         printDebug ($fh, "SessionId = ".$session);
>         fclose($fh);
>     }
> 
>     $server->service($HTTP_RAW_POST_DATA); ?>
> 
> 
> 
> 
> 
> 
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click


<Prev in Thread] Current Thread [Next in Thread>