source: branches/version-2_11-dev/data/module/SOAP/example/attachment.php @ 21410

Revision 21410, 879 bytes checked in by Seasoft, 12 years ago (diff)

2.12系へマイルストーン変更となったチケット分を差し戻し
r21326 #1536
r21325 #1528
r21324 #1547,#1546
r21323 #1546
r21322 #1543
r21321 #1536
r21320 #1536
r21319 #1544
r21318 #1521,#1522
r21317 #1431

  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2require_once("SOAP/Client.php");
3require_once("SOAP/test/test.utility.php");
4require_once("SOAP/Value.php");
5
6$filename = 'attachment.php';
7$v =  new SOAP_Attachment('test','text/plain',$filename);
8$methodValue = new SOAP_Value('testattach', 'Struct', array($v));
9
10$client = new SOAP_Client('mailto:user@domain.com');
11# calling with mime
12$resp = $client->call('echoMimeAttachment',array($v),
13                array('attachments'=>'Mime',
14                'namespace'=>'http://soapinterop.org/',
15                'from'=>'user@domain.com',
16                'host'=>'smtp.domain.com'));
17print $client->wire."\n\n\n";
18print_r($resp);
19
20# calling with DIME
21$resp = $client->call('echoMimeAttachment',array($v));
22# DIME has null spaces, change them so we can see the wire
23$wire = str_replace("\0",'*',$client->wire);
24print $wire."\n\n\n";
25print_r($resp);
26?>
Note: See TracBrowser for help on using the repository browser.