C
Chris Fink
I am receiving an HTTP status 500 error with the validateXMLFragment
webservice below. I have no way of finding out what specifically is
happening since the debug point in the catch is never being hit. Any
recommendations on where to look?
[WebMethod]
public string validateXMLFragment(string fragment)
{
//return "test";
try
{
bool _isValid = true;
string errorMsg = string.Empty;
XMLValidator xmlVal = new XMLValidator(fragment);
if (!xmlVal.Validate())
{
_isValid = false;
ArrayList errors = xmlVal.Errors;
errorMsg = errors[0].ToString();
}
}
catch (Exception ex)
{
Context.Response.Write(ex.Message.ToString());
}
//string xmlResponse = @"<?xml version='1.0'?><xmlvalidationrequest><xml>" +
fragment + "</xml><status>" + _isValid.ToString() +
"</status><errormessage>" + errorMsg +
"<errormessage></xmlvalidationrequest>";
//return xmlResponse;
return "abc";
}
[WebMethod]
public string Test (string msg)
{
return msg;
}
webservice below. I have no way of finding out what specifically is
happening since the debug point in the catch is never being hit. Any
recommendations on where to look?
[WebMethod]
public string validateXMLFragment(string fragment)
{
//return "test";
try
{
bool _isValid = true;
string errorMsg = string.Empty;
XMLValidator xmlVal = new XMLValidator(fragment);
if (!xmlVal.Validate())
{
_isValid = false;
ArrayList errors = xmlVal.Errors;
errorMsg = errors[0].ToString();
}
}
catch (Exception ex)
{
Context.Response.Write(ex.Message.ToString());
}
//string xmlResponse = @"<?xml version='1.0'?><xmlvalidationrequest><xml>" +
fragment + "</xml><status>" + _isValid.ToString() +
"</status><errormessage>" + errorMsg +
"<errormessage></xmlvalidationrequest>";
//return xmlResponse;
return "abc";
}
[WebMethod]
public string Test (string msg)
{
return msg;
}