NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
dmitri,can you help me?


Joined: 28 Sep 2006
Posts: 13
Reply with quote
client:
<?
$header = '<MMS:TransactionId soapenv:mustUnderstand="0" xmlns:MMS="http://www.xieheng.com/xiehengmms">1157962952812</MMS:TransactionId>
<MMS:Auth soapenv:mustUnderstand="0" xmlns:MMS="http://www.xieheng.com/xiehengmms">
<MMS:AuthName>liusong</MMS:AuthName>
<MMS:AuthPassword>111111</MMS:AuthPassword>
</MMS:Auth>';
$body = '<MMS:Title xmlns:MMS="http://www.xieheng.com/xiehengmms">happy new year</MMS:Title>
<MMS:Phone xmlns:MMS="http://www.xieheng.com/xiehengmms">135654418888</MMS:Phone>';

$client = new soapclientmime();
$client->soapclient('http://127.0.0.1:8082/mms/soapserver.php');
$msg = $client->serializeEnvelope($body,$header);
$client->addAttachment("","e:/newycnow/admin/mms/test.jpg","image/gif",false);
print_r($client->requestAttachments);
print_r($client->requestData);
$client->send($msg,'www.xieheng.com/mms');
?>
server:
<?
$soap = new nusoapservermime();
$soap->parse_request($HTTP_RAW_POST_DATA);
$httpHeaders = $soap->headers;//http header
$soap->parseRequest($httpHeaders,$HTTP_RAW_POST_DATA);
$attachment = $soap->getAttachments();
$attachment = serialize($attachment);
write_to_file($HTTP_RAW_POST_DATA,'e:/newycnow/admin/mms/data.txt');
write_to_file($attachment,'e:/newycnow/admin/mms/data.txt');
$soap->service($HTTP_RAW_POST_DATA);
?>

question:
why I can not send the Attachments and receive the Attachments?thank you!
View user's profileFind all posts by macrovanSend private messageVisit poster's websiteMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
$client->soapclient('http://127.0.0.1:8082/mms/soapserver.php');

This will not work. You need a filename containing or URL pointing to WSDL. Fortunately nusoap will generate it for you if you call this script with WSDL argument. So it may look like:
$client->soapclient('http://127.0.0.1:8082/mms/soapserver.php?WSDL', 'wsdl');
Also, if you use another default namespace (http://www.xieheng.com/xiehengmms) you'd specify it in appropriate argument to serializeEnvelope() as well.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
dmitri,can you help me?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic