SOAP
[ class tree: SOAP ] [ index: SOAP ] [ all elements ]

Source for file attachment.php

Documentation is available at attachment.php

  1. <?php
  2. /**
  3.  * @category Web Services
  4.  * @package SOAP
  5.  */
  6.  
  7. require_once("SOAP/Client.php");
  8. require_once("SOAP/test/test.utility.php");
  9. require_once("SOAP/Value.php");
  10.  
  11. $filename 'attachment.php';
  12. $v =  new SOAP_Attachment('test','text/plain',$filename);
  13. $methodValue = new SOAP_Value('testattach''Struct'array($v));
  14.  
  15. $client = new SOAP_Client('mailto:user@domain.com');
  16. # calling with mime
  17. $resp $client->call('echoMimeAttachment',array($v),
  18.                 array('attachments'=>'Mime',
  19.                 'namespace'=>'http://soapinterop.org/',
  20.                 'from'=>'user@domain.com',
  21.                 'host'=>'smtp.domain.com'));
  22. print $client->wire."\n\n\n";
  23. print_r($resp);
  24.  
  25. # calling with DIME
  26. $resp $client->call('echoMimeAttachment',array($v));
  27. # DIME has null spaces, change them so we can see the wire
  28. $wire str_replace("\0",'*',$client->wire);
  29. print $wire."\n\n\n";
  30. print_r($resp);
  31. ?>

Documentation generated on Mon, 04 Aug 2008 20:00:08 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.