Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all
I trying to call .Net webservice from my PHP code.
The WSDL as below:

XML
 POST /SMCIVRServices.asmx HTTP/1.1
Host: 192.168.100.16
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/CardCheck"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CardCheck xmlns="http://tempuri.org/">
      <CardNumber>string</CardNumber>
    </CardCheck>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CardCheckResponse xmlns="http://tempuri.org/">
      <CardCheckResult>boolean</CardCheckResult>
    </CardCheckResponse>
  </soap:Body>
</soap:Envelope>


and this is my code:

PHP
$wsdl = "http://192.168.100.16:8022/SMCIVRServices.asmx?wsdl";  
$soap_client = new SoapClient($wsdl);   
$CN = array ('CardNumber' => $CardNum);
$response = $soap_client->__soapCall('CardNumber', array( $CardNum => $CN ));



$CardNum Variables have a value that get from input.
I could not connect to webserice.


Any help will be appreciated.
Thanks in advance.
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900