Yes like most things in our business the solution will be obvious and dumb
after it is found.
The web service is called correctly from an .aspx page with ...
this.lblCount.Text = service.count( "test.counter" );
... where "service" is a web service proxy containing one method that is
"count( )".
My HTML/JavaScript/AJAX call to the service is installed on
micron.tlanet.net and is currently throwing an error 500 and it looks like
...
function Send( )
{
var frm = document.forms[0] ;
queryString = encodeURIComponent( frm.elements[0].value );
Request( "POST",
"
http://micron.tlanet.net/Service/CountService.asmx?op=count", true );
return ;
}
function Request( reqType, url, async )
{
if ( window.XMLHttpRequest )
request = new XMLHttpRequest( );
else if ( window.ActiveXObject )
{
request = new ActiveXObject( "Msxml2.XMLHTTP" );
if ( ! request )
request = new ActiveXObject( "Microsoft.XMLHTTP" );
}
if ( request )
{
request.onreadystatechange = Response ;
request.open( reqType, url, async );
request.setRequestHeader( "Content-Type",
"application/x-www-form-urlencoded; charset=UTF-8" );
request.overrideMimeType( "text/XML" );
request.send( "arbitrary_string" );
}
else
alert( "Browser does not support all application features." );
return ;
}
function Response( )
{
if ( request.readyState == 4 )
{
if ( request.status == 200 )
{
alert( request.responseText );
stylizeDiv( getDocInfo( request.responseXML ), document.getElementById(
"docDisplay" ) );
}
else
alert( "Request Status = " + request.status + " = " + request.statusText
);
}
return ;
}
If you see the obvious solution to my dumb mistake, pleas point it out. (My
current assumption is that "url/method" is incorrectly specified.)
_______________________________________________
Thom Little
www.tlanet.net Thom Little Associates, Ltd.