我有.net web service
,提供多个methods
和public classes
。
我想在php中使用这些类。
我该怎么办?
这是我的网络服务:http://10.2.3.74/AdaptorRepeater/BillPatientService.asmx?WSDL
例如,我希望访问AdmissionVO类及其属性
$client = new soapclient('http://10.2.3.74/AdaptorRepeater/BillPatientService.asmx?WSDL');
$header = new SoapHeader('http://sepas.behdasht.gov.ir/','HeaderMessageVO',$HeaderMessageVO,false);
$client->__setSoapHeaders($header);
$send = $client->SavePatientBillSecure($params);
我想举例如:
$client->AdmissionVO->MedicalRecordNumber = '1234';
答案 0 :(得分:0)
使用SOAP调用您可以访问任何Dot.Net Web服务 您需要具有Dot net Web服务WSDL路径 现在
<?php
//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");
//instantiate the SOAP client
$client = new SoapClient("http://example.com/dotnet.asmx?WSDL");
echo $client->GetAllContactNames()->GetAllContactNamesResult;
//...optional additional code goes here...
?>