ASP.NET中MSSOAP.SoapClient30的PHP替代方案

时间:2010-06-02 12:01:40

标签: php asp.net soap

有人可以帮我解决这个问题 - 我需要一些技巧或代码来连接到wsdl服务,发送XML请求,而不是在客户端打印响应。我只有用ASP.NET编写的入门书,需要PHP替代方案:

function doXMLRequest(Xmltext)
    Set oSOAP = Server.CreateObject("MSSOAP.SoapClient30")
    oSOAP.ClientProperty("ServerHTTPRequest") = True
    oSOAP.mssoapinit sys_xmlservice, "", "", ""
    oSOAP.ConnectorProperty("Timeout") = 600000
    myXMLResponse = oSOAP.XMLReq(XmlText)
    doXMLRequest=myXMLResponse
    set oSOAP=nothing
end function

提前致谢! :)

1 个答案:

答案 0 :(得分:3)

使用SOAPClient类

$client = new SoapClient();
$response = $client->SomeSOAPFunction($args);

如果你想要一个函数,其中SomeSOAPFunction是函数的参数:

function xml($fct) {
 $client = new SoapClient();
 $response = $client->{$fct}($args);
}

应该有效