473,769 Members | 5,877 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ServerXM LHTTP 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 1861
"brian.ackerman n" <br************ *@gmail.comwrot e in message
news:11******** **************@ d55g2000hsg.goo glegroups.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.ServerXM LHTTP 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.ackerman n" 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.ServerXM LHTTP 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.Conten tType = "text/xml"
Response.CharSe t = "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
6283
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 using the high-order bits returned by rand() instead of the low-order bits, avoiding using rand() for anything that wants decently random numbers, not using rand() if you want more than approx. UINT_MAX total different sequences, and so on. So I...
26
1905
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
6019
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 or do i need to write the xml as text from the web service and supply a DTD. Also any other pitfalls TIA
1
1250
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. To summarize, we have clients that use our web applications (they need UI) and we have clients that just need the 'services' where they integrate our 'services' with their applications through the web services. We have a single server that houses...
3
5006
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 : >************************************************************************ > <WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _ > Public Function HelloWorld() As > <System.Xml.Serialization.SoapElementAttribute("return")> String
4
2509
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 microsft site) but when i'm going to try this in a diferente browser (firefox for example) the behavior command is not accepted in this browser. So i try to find why and i don't understand, but i found a way of calling web services using the mozila...
3
2900
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 Intelligence development studio that works in that environment. I've uploaded the same report to both the Reporting services on my local computer as well as the server, and can log in to them and run the
5
2294
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 Application, does not work while I run it with Windows services. In my Windows application I am able to zip the whole 900Mb without any problems, but in my windows services I am not able to zip the whole 900Mb. In Windows Services it throws an...
4
3290
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: example.com/users/paul (displaying the user profile of "paul") or example.com/pictures/landscapes/13 (displaying pictures from the category "landscapes", page 13). These are just examples, I hope I didn't confuse you.
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10050
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9999
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8876
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.