Fog Creek Software
Discussion Board




Some help required (technical problem).

Before you lash out at me, let me explain. This is not homework. This is just a pass time experimentation I am doing, squeezing some time to hone my own skills in between the load of work that I have.

I was reading an article on SOAP implemented with XMLHTTPRequest object instead of the WSDL generator that comes with the SOAP Toolkit. I set out to write the code that the author of the article listed in his article, but with my own alteration.

Its a Web Service I am trying to make, a really simple one that calculates tax amount on a sales value and returns the tax amount to the client.

A VB 6 client has a textbox for getting the Sales amount from the user, and when the user types the sales amount and tabs out of the textbox, the VB 6 app connects to a Web Service (ASP listener) at the other end providing it the Sales amount. The ASP page gets the sales amount, takes a constant tax rate of say 4% and calculates the tax amount. It then returns both, the tax rate and the tax amount to the VB client which displays the two amounts on the form.

The code is attached here.
http://www.codeguru.com/forum/showthread.php?s=&threadid=279155

I still haven't got responses. I'd be grateful if someone out of you can help.

I partially know what the problem is. The ASP Request Object does not get anything. And since I am not that familiar with ASP as in I know about the objects in ASP and their purpose, but have not written ASP apps, I feel that it lacks as an event-based architecture (I could be wrong but thats what I have felt till now that I have known ASP).

Sathyaish Chakravarthy
Wednesday, January 14, 2004

Look at an asp reference and print out both the query string array and the Post body (Request.TotalBytes or some variation of it)

Li-fan Chen
Wednesday, January 14, 2004

I did insert a debug statement to see what the server returns. The server returns no XML text. Instead it returns a blank HTML document with the HTML, HEAD and BODY tags blank. This, I guess, is because when I start the server, the Request Object's QueryString is blank and so it does not even enter my If construct and thus creates a blank HTML document.

As far as I understand, as soon as I load the ASP page, the code in the ASP page is executed. Here, I feel the need for an event based execution which I dont get. At this time itself, the ASP page's Request Object is evaluated as blank and the if construct is escaped.

If I could make my ASP code run based on the receipt of the request, it would work I guess. Or may be I dont know fully. I am just guessing.

Sathyaish Chakravarthy
Wednesday, January 14, 2004

*  Recent Topics

*  Fog Creek Home