tags:

views:

123

answers:

1

Hello,

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 = 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

Thanks in advance! :)

+1  A: 

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

Serty Oan
Thanks, finaly I figured out that 'XMLReq' is SOAP function. :)
sasa