MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/2/cwd/proc/3/cwd/usr/share/doc/cpanel-php54-SOAP-0.13.0/example/attachment.php
<?php
/**
 * @category Web Services
 * @package SOAP
 */

require_once("SOAP/Client.php");
require_once("SOAP/test/test.utility.php");
require_once("SOAP/Value.php");

$filename = 'attachment.php';
$v =  new SOAP_Attachment('test','text/plain',$filename);
$methodValue = new SOAP_Value('testattach', 'Struct', array($v));

$client = new SOAP_Client('mailto:user@domain.com');
# calling with mime
$resp = $client->call('echoMimeAttachment',array($v),
                array('attachments'=>'Mime',
                'namespace'=>'http://soapinterop.org/',
                'from'=>'user@domain.com',
                'host'=>'smtp.domain.com'));
print $client->wire."\n\n\n";
print_r($resp);

# calling with DIME
$resp = $client->call('echoMimeAttachment',array($v));
# DIME has null spaces, change them so we can see the wire
$wire = str_replace("\0",'*',$client->wire);
print $wire."\n\n\n";
print_r($resp);
?>