Dun*_*unc 0 php c# web-services asmx
我有一个.Net Web服务,它有一个接受我作为参数编写的接口的方法.我们称这个接口为ICustomer.
你会如何从PHP调用这个方法?
方法定义是
[WebMethod]
public string RegisterCustomer(ICustomer customer)
{
...
}
Run Code Online (Sandbox Code Playgroud)
您可以在PHP上创建一个StdClass,其属性与.NET中的相同.
例如:
<?php
$object = new stdClass();
$object->Name = "Test";
$object->LastName = "More tests";
$object->AnotherAttribute = "Abc";
...
$client = new SoapClient($url);
$client->__soapCall("MethodName", array('parameters' => array('customer' => $object));
...
?>
Run Code Online (Sandbox Code Playgroud)
如果我理解你的问题,那就是这个.
| 归档时间: |
|
| 查看次数: |
2311 次 |
| 最近记录: |