I figured it out myself.
Created a proxy page which takes the parameters and redirects the content to the localhost:1049 port and then sends the response.
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack) {
Response.Clear();
Response.ContentType = "text/xml; charset=UTF-8";
var client = new WebClient();
string data = client.DownloadString("http://localhost:1049/checkDocument?data=i%20eat%20a%20apple");
Response.Write(data);
Response.Flush();
Response.End();
}
}