Trying to get SOAP_Attachment to Delphi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, All.

I've read the messages here about sending Attachments to Delphi, and I've made Dave's "adjustments" to the appropriate files, but I still can't get this thing to work.

In Delphi I'm looking for the return value to be "TSoapAttachment". It seems to want to be a "TByteDynArray". Here's my server code to generate the wsdl:

    $this->__dispatch_map['getXML'] = array(
              'in'=>array(),
              'out'=>array('response' => 'base64Binary')
              );

If I change 'base64Binary' to 'TSoapAttachment' (cheating, I know), Delphi presents the correct return value but I get an error when I click the button to load the file.

Here's my actual method:

function getXML(){
 $cm_path = "/home/httpd/httpdocs/services/";
 $cm_file = "test.xml";

if (file_exists($cm_path.$cm_file)){
return new SOAP_Attachment('Response','application/binary',$cm_path.$cm_file);
}
else {
return new SOAP_Value('return', 'application/binary', false);
}
}



Which part am I screwing up? If it helps, here's my client side in Delphi:


procedure TForm1.Button1Click(Sender: TObject);
var
   Intrf : CV3_Web_ServicePort;
   xmlDoc : TXMLDocument;
   myStream : TStream;
   myAttachment : TSOAPAttachment;

begin
   Intrf := GetCV3_Web_ServicePort(False, '');
   try
      myAttachment := Intrf.getXML;
   except
      on E : Exception do
         ShowMessage(E.Message);
   end;
   myStream := myAttachment.SourceStream;
   xmlDoc := TXMLDocument.Create(nil);
   xmlDoc.LoadFromStream(myStream);
   ListBox1.Items.AddStrings(xmlDoc.XML);
end;


Any help is much, much appreciated!


Thanks,
Blake <raltgaither@yahoo.com>

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux