Call an IIS Web Service without the .asmx extension

前端 未结 4 1108
逝去的感伤
逝去的感伤 2020-12-10 20:48

I have written a .NET web Service that is to be consumed by a client outside of my control (my server is a simulator for a live server written in PHP). The web service work

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 21:04

    In php you have to call the wsdl only, you don't need the asxm or that kind of stupid things that .net do.

    one simple example

    $wsdl = "http://domain/wsdlfile.wsdl"; //url to wsdl 
    $client = new SoapClient($wsdl,array('trace' => 1,'encoding' => 'UTF-8','exceptions' => 0)); 
    $Return = $client->callfunction();
    echo htmlspecialchars($client->__getLastResponse());
    

    that's all.

提交回复
热议问题