473,408 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

PSEUDO WEB SERVICES CALLING OTHER SERVICES

Hello All,

I have a project where I am being asked to expose some functionality
to a customer via a web-service-like interface. This service will be
written in Classic ASP, and will take a number of parameters, process
some logic,and then return some information to the consumer. I've now
built a number of these services (Following something of a RESTful
approach), and the next one I need to build happens to require some
information which is already provided by another service.

The problem is that this doesn't appear to work, and I can't for the
life of me figure out why. Here's a description.

Service A adds some specific information to the system.
Service B adds some general information to the system.

So, when A is called, B is also executed.

Except that this doesn't happen. When B is called directly, it fires
off instantly, does its stuff, and returns its data block. But when A
is called, all is well until I get the point where I 'call' B via
MSXML2.ServerXMLHTTP Send(). At this point, Service A just hangs
indefinitely.

It appears to be some kind of threading issue, like B is waiting to
execute until A is finished running, but A won't finish until B
returns. At least thats how it looks to me, I'm sure the real answer
could be something completely different.

Can this even be done in Classic ASP ? I can't think of any reason
why this general pattern shouldn't be used, but after spending the
better part of a week trying out dozens of failed solutions, I'm
beginning to have doubts!

Thanks for any insight you are able to shed on this situation.

Brian

Oct 31 '07 #1
2 1838
"brian.ackermann" <br*************@gmail.comwrote in message
news:11**********************@d55g2000hsg.googlegr oups.com...
Hello All,

I have a project where I am being asked to expose some functionality
to a customer via a web-service-like interface. This service will be
written in Classic ASP, and will take a number of parameters, process
some logic,and then return some information to the consumer. I've now
built a number of these services (Following something of a RESTful
approach), and the next one I need to build happens to require some
information which is already provided by another service.

The problem is that this doesn't appear to work, and I can't for the
life of me figure out why. Here's a description.

Service A adds some specific information to the system.
Service B adds some general information to the system.

So, when A is called, B is also executed.

Except that this doesn't happen. When B is called directly, it fires
off instantly, does its stuff, and returns its data block. But when A
is called, all is well until I get the point where I 'call' B via
MSXML2.ServerXMLHTTP Send(). At this point, Service A just hangs
indefinitely.

It appears to be some kind of threading issue, like B is waiting to
execute until A is finished running, but A won't finish until B
returns. At least thats how it looks to me, I'm sure the real answer
could be something completely different.

Can this even be done in Classic ASP ? I can't think of any reason
why this general pattern shouldn't be used, but after spending the
better part of a week trying out dozens of failed solutions, I'm
beginning to have doubts!

Thanks for any insight you are able to shed on this situation.
Could you post stripped down versions the code for
"Service A" and "Service B" that isolate your problem?
Oct 31 '07 #2
"brian.ackermann" wrote:
Hello All,

I have a project where I am being asked to expose some functionality
to a customer via a web-service-like interface. This service will be
written in Classic ASP, and will take a number of parameters, process
some logic,and then return some information to the consumer. I've now
built a number of these services (Following something of a RESTful
approach), and the next one I need to build happens to require some
information which is already provided by another service.

The problem is that this doesn't appear to work, and I can't for the
life of me figure out why. Here's a description.

Service A adds some specific information to the system.
Service B adds some general information to the system.

So, when A is called, B is also executed.

Except that this doesn't happen. When B is called directly, it fires
off instantly, does its stuff, and returns its data block. But when A
is called, all is well until I get the point where I 'call' B via
MSXML2.ServerXMLHTTP Send(). At this point, Service A just hangs
indefinitely.

It appears to be some kind of threading issue, like B is waiting to
execute until A is finished running, but A won't finish until B
returns. At least thats how it looks to me, I'm sure the real answer
could be something completely different.

Can this even be done in Classic ASP ? I can't think of any reason
why this general pattern shouldn't be used, but after spending the
better part of a week trying out dozens of failed solutions, I'm
beginning to have doubts!

Thanks for any insight you are able to shed on this situation.
Most likely you have ASP Debugging turned on. This limits ASP to one
thread. Hence your analysis is essentially correct the second request is
queued waiting for the first to complete but since the first is waiting for
the second to return you have a deadlock.

Turning off debugging will give ASP 25 threads per process by default.
However if your customer(s) hit pages like this heavily its possible to have
these deadlocks occur in your production environment.

A better approach is to create two ASP include files each containing a Class
whose job it is to create the XML for Service A and B.

Now create an accessor page for service B which includes the service B class
page. This page retrieves an XML DOM from the service B class and dumps it
to the response. Be sure to set ContentType and CharSet correctly:-

Response.ContentType = "text/xml"
Response.CharSet = "UTF-8"
oXMLDOM.save Response

Create an accessor page for service A which includes both the service A and
the service B class pages. Use the service B class to create your base XML,
pass the base XML to service class A to specialise then send the resulting
DOM as before.

--
Anthony Jones - MVP ASP/ASP.NET
Nov 1 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

70
by: Ben Pfaff | last post by:
One issue that comes up fairly often around here is the poor quality of the pseudo-random number generators supplied with many C implementations. As a result, we have to recommend things like...
26
by: Mr Newbie | last post by:
What do I need to run a web service on my PC ? I know I need the .NET Framework, but do I need IIS Running ?
7
by: Stu | last post by:
Hi, I have a web service which returns a record set and works well integrated with an asp dot net page. However if I decided to develop a unix app will i be able to read the dataset as it is...
1
by: Robert Strickland | last post by:
We are developing a several web applications that use 'services' that perform key business functions for our applications. These same 'services' are avaible to paying clients through web services. ...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
4
by: Nuno | last post by:
Hello, I'm trying to call some web services only using javascript from a html page. I succeeded on doind this in IE with the use of the behavior:url(webservice.htc); (technique founded in the...
3
by: Blasting Cap | last post by:
I'm using VS 2005, SQL 2005 reporting services. SQL reporting services is working, and I have it both on my local computer, as well as on a server. I've created a report in the SQL Business...
5
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
This code works fine in Windows Application. In Windows Application, I am able to zip the image files properly and it totally contains 900MB My problem is the same code which I used in my Windows...
4
by: k3pp0 | last post by:
Hey. I've got a very basic newbie question, I hope you can understand me. Sorry for asking it, first of all. I see a lot of sites (e.g. communities) with a url-structure like this:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.