如何使用Mime附件发送和Soap请求?
现在我用
创建一个Soap_Attachment$att = new SOAP_Attachment('contentID', $_FILES['uploaded_file']['type'] . '; charset=utf-8', $_FILES['uploaded_file']['tmp_name'])
但如何将此附件附加到我的请求中?我的要求是例如
$result = $soapClient->call('saveEmployeeXmlData', array(
'id' => 'a-key',
'key' => '12456865456845',
'data' => $xml
), $options);
谢谢!
答案 0 :(得分:1)
您可以尝试以下
$soapClient->getProxy ();
$soapClient->setOpt ( 'Mime', true );
$soapClient->saveEmployeeXmlData ( array (
'id' => 'a-key',
'key' => '12456865456845',
'data' => $att
) );