开发者

PHP alternative for MSSOAP.SoapClient30 in ASP.NET

开发者 https://www.devze.com 2023-01-01 17:49 出处:网络
Can somebody help me with this - I need some tips or code to connect to wsdl service, send XML request and than print response on client side. I only have primer written in ASP.NET and need PHP altern

Can somebody help me with this - I need some tips or code to connect to wsdl service, send XML request and than print response on client side. I only have primer written in ASP.NET and need PHP alternative:

function doXMLRequest(Xmltext)
    Set oSOAP = Ser开发者_StackOverflowver.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

Thanks in advance! :)


Using SOAPClient class

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

if you want a function where SomeSOAPFunction is an argument of the function :

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

It should work

0

精彩评论

暂无评论...
验证码 换一张
取 消