|
Re: Trying to retrieve a binary VoiceMail Message: msg#00068php.nusoap.general
Wow, an array of byte? What a waste of bandwidth. They should be doing base64. The only thing that leaps out at me is $recnum = count($message); for ($i=0; $i<= $recnum; $i++) { $content .= $message[$i]; } which should have $i < $recnum. 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: "Blaine Lang" <blaine@xxxxxxxxxxxxx> To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, April 20, 2004 2:57 PM Subject: [Nusoap-general] Trying to retrieve a binary VoiceMail Message I am retreiveing a voicemail message to my client and am getting a sucessful completion from the call but have not been able to actually play the message which is supposed to be a .WAV file. I suspect the problem is still with my code and how I am creating the file and was hoping for some ideas. The WSDL for the message response is this: <message name="PortalVoiceMail_getVoiceMailMessageResponse"> <part name="result" type="xsd2:ArrayOfByte"> <documentation>byte array, binary, encoded representation of the VM message</documentation> </part> </message> I can echo out the result of $message from the call and see that it is an array. Albeit a very large array even for a 2 sec voice message. I have also tried to add the base64_decode in case this was needed - just shooting in the dark on that one. The file is open in binary mode. I could have used a foreach to go through the array but figured I had to go through the array and assemble the message, then write it to the file. Extract of my code: $message = $this->_performAPICall('_portalVoiceMailSOAPID','getVoiceMailMessage',$parms); $file = fopen("C:/logs/message$id.wav","wb"); $content = ''; $recnum = count($message); for ($i=0; $i<= $recnum; $i++) { $content .= $message[$i]; } //$vm = base64_decode($content); fwrite($file,$content); fclose($file); ------------------------------------------------------- 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> |
|---|---|---|
| Previous by Date: | Trying to retrieve a binary VoiceMail Message: 00068, Blaine Lang |
|---|---|
| Next by Date: | Re: Nusoap-general digest, Vol 1 #514 - 2 msgs: 00068, Stefan Sammut |
| Previous by Thread: | Trying to retrieve a binary VoiceMail Messagei: 00068, Blaine Lang |
| Next by Thread: | Re: Nusoap-general digest, Vol 1 #514 - 2 msgs: 00068, Stefan Sammut |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |