PHP SOAP 发送XML
Posted Champion-水龙果
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP SOAP 发送XML相关的知识,希望对你有一定的参考价值。
<?php $xmldata = <<<EOT <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <MOLECULES FORMAT="smi"> <MOLECULE>C1CCCCC1</MOLECULE> </MOLECULES> </soapenv:Body> </soapenv:Envelope> EOT; $wsdl = ‘http://www.vcclab.org/web/services/ALOGPS?wsdl‘; try{ $client = new SoapClient($wsdl); $result = $client->__doRequest($xmldata,$wsdl,‘getAlogpsResults‘,1,0);//发送xml必须使用__doRequest print_r($result); }catch (SoapFault $e){ echo $e->getMessage(); }catch(Exception $e){ echo $e->getMessage(); }
转载:http://blog.51cto.com/liuzan/1683947
以上是关于PHP SOAP 发送XML的主要内容,如果未能解决你的问题,请参考以下文章