[英]how to access .net webservice classes with php?
我有一个.net web service
,它提供了多种methods
和public classes
。 我想在php中使用这些类。 我该怎么做?
这是我的Web服务: http://10.2.3.74/AdaptorRepeater/BillPatientService.asmx?WSDL
: 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';
使用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...
?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.