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
精彩评论