I have the following php code which acts as proxy to my http server
slavePref.php
<?php
$url = 'http://xyzdei/IPDWSRest/Service1.svc/getServerUtil';
$callback = $_GET["callback"];
echo($callback . "(");
header('Content-Type: application/json; charset=utf8');
echo(file_get_contents($url . '/' . $_GET["poolingServer"], $_GET["serverPID"]));
echo (")");
?>
The webservice hosted on IIS has the following contract
[OperationContract]
[FaultContract(typeof(ExceptionOnIPDWS))]
[WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest, UriTemplate = "getServerUtil/{poolingServer}&{serverPID}", ResponseFormat = WebMessageFormat.Json, Method = "GET")]
//Status getServerUtil(string poolingServer,string serverPID, ref string oCreateResult);
string getServerUtil(string poolingServer, string serverPID);
From the browser I am trying to call the uri as
http://:1136/slavePerf.php?poolingServer=thunderw7dei&serverPID=23456
However the request is failing with the following message
>
Notice: Undefined index: callback in C:\Users\xom\Documents\My Web
> Sites\EmptySite2\slavePerf.php on line 4 ( Warning:
> file_get_contents(http://xomw764dei/IPDWSRest/Service1.svc/getServerUtil/thunderw7dei):
> failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in
> C:\Users\xom\Documents\My Web Sites\EmptySite2\slavePerf.php on line 8
> )
. I think I am not passing the arguments correctly