I have one web service created in asp.net and published in iis 5.1 .Now i want to call this web service from php environment. Actually my web service get one string as a parameter and return the same string .But all the time, the returned string is empty or null.I could not able to send string value from php to asp.net web service...
This is my web service created in asp.net
namespace PRS_WS
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class prs_point : System.Web.Services.WebService
{
[WebMethod]
public string testAssignment(string inputData)
{
return inputData;
}
}
}
And, this is my php code for calling the above asp.net web service...
<?php
require_once('nusoap/lib/nusoap.php');
$wsdl="http://localhost/prs_point/prs_point.asmx?WSDL";
$str1="";
$str1="Hello from php";
$client = new soapclient($wsdl,'wsdl');
$result=$client->call('testAssignment',$str1);
foreach($result as $key => $value)
{
echo "<br/>Response ::::: $value";
}
?>
I don't know whether the changes needed in php side or asp.net side?...Please guide me to get out of this issue...