Re: How to deliver Binary Data from SOAP Server to SOAP Client

From: Date: Mon, 18 Oct 2004 10:33:36 +0000
Subject: Re: How to deliver Binary Data from SOAP Server to SOAP Client
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14946@lists.php.net to get a copy of this message
Hi, thanks for the emails, but there are no further responses necessary. It works :) Stefan "Stefan Kisker" <stefan@kisker.de> schrieb im Newsbeitrag news:20041017102219.44521.qmail@pb1.pair.com... > Hi, > > ich try to send XML-Data combined with Binary-Files in just one procedure > call, but it will not work. > So this is what i tried: > > The (shortened) public function of the Web Service: > > function doJob($id,$helper,$classname) { > $obj = $this->factory($classname); // just a factory method > $obj->id = $id; > $obj->helper = $helper; > $this->array = $obj->doJob(); > return $this->array; > } > > Building the array with the binary files: > ... > for (){ > ... > $file = new > SOAP_Attachment($filename,"application/octet-stream",$root.$documents["dir". > [$i]."/".$documents["file"][$i]); > $files[] = $file; > ... > } > ... > The return statement: > > $array['xml'] = $xml; > $array['files'] = $files; > return $array; > > In the soap_fault object i can see that the files have been attached, but > not in the right way. I think the result ist not wellformed. Even > SOAP_Attachment->serialize() has the same result. > I think, transfering binary data has to be a common problem, but i just > found articles about sending attachments to the SOAP server via > SOAP_Attachment. > > Thanks in advance, > > Stefan

« previous php.pear.general (#14946) next »