473,668 Members | 2,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help Me....WebServic es Question

Hi guys, i'm trying to build a web service.......

is there such thing as polymorphism in web services? i mean could i
have two web services of the same name but different arguments such
that i could construct the following use case

Actor : WebServiceReque stor

1. The use case begins when the web service is called with either a
flight number and a date or a date, time, departure and destination or
a date, destination and departure only as arguments.

2. If a flight number and date is supplied as arguments
2.1 If the flight specified exists on that date
2.1.1 The service returns the departure details of the flight (date
time, airport, gate number, flight number)
3. If a date, time, departure and destination airports are supplied as
arguments
3.1 If a flight with the specified details is found
3.1.1 The service returns the departure details of the flight (date
time, airport, gate number, flight number).
4. If a date, destination airport and departure airport is supplied as
arguments
4.1 If flights of the specified description exist on the specified
date
4.1.1 The service returns a list of departure details for those
flights.
5. The use case terminates.

or do i really need to split the above use case up into 3 (one for
step 2, one for 3 and one for 4), each for one of three different web
service.
Also, how do i get my web service to indicate error? Furthermore, how
do i get my web service to indicate different kinds of errors? i guess
my main question is.......... can i use exceptions with web services?

Finally,
Can i use API classes such as Date and Time with web services ??
Thank you very much.

Liza
Jul 20 '05 #1
1 1576
On 23 Aug 2003 09:21:02 -0700, li*******@yahoo .co.uk (Liza) wrote:
Hi guys, i'm trying to build a web service.......
What's the background here ? Are you a student, or are you trying to
build a live service ?
is there such thing as polymorphism in web services?
What's a "web service" ? In the geneal case, then of course there is
- "web service" is a broad term, could mean anything, could
incorporate anything you build into it.

A better question is "Is it appropriate to build polymorphism into a
web service built out of SOAP / built using WebSphere"

i mean could i have two web services of the same name but different arguments
"Polymorphi sm" can be defined to mean almost anything. A single entry
point behaves differently, depending on some data item. At the crudest
level, this is "passing a logic flag into a procedure". At the deepest
level, it's a full-blown OO solution with virtual methods.

Now the OO view starts to require an object. And an object often
brings with it notions of state. Now state is a bad thing in a web
service, so be very careful about going down this route. How does a
web service recognise the "type" of the call ? How persistent is this
typed object ? Has its existence become more important than the
procedural nature of the service ?

There's a school of thought that sees web services as a means to
transmitting Java objects from place to place. I don't really hold
with this style...

such that i could construct the following use case
If you're building polymorphic use cases, then look at the scope and
detail of the use cases. You should be able to build n+1 use cases,
one for the overall case, and one each for each of the polymorphic
variants.

If you can't describe these use cases, then question whether it's
appropriate to build the interface this way. If there isn't a way to
write the generic use case, then is this really appropriate to be a
polymorphic methor, or is it simply separate methods ?

Also, how do i get my web service to indicate error?
This is all described in the SOAP docs.
Furthermore, how
do i get my web service to indicate different kinds of errors?
There are two broad levels of error. "The web service broke" and "The
application underlying the web service broke". SOAP has quite
different ways to report these.

The first of these should never happen. So when they do, you're
allowed to have the client go a little wild. This should be
predictable, but you're allowed to do things like lose data and stop
the booking process.

The second of these should be near seamless to the user. They will
happen from time to time, and they should be handled in as
non-disruptive way as possible.

Having said that, the two categories at the two levels don't map
exactly. "Should never happen" isn't always just a SOAP error. "Web
server a little busy, retrying in 5 seconds" shouldn't be fatal.

i guess
my main question is.......... can i use exceptions with web services?
What's an exception ? It's a GOTO statement - a sudden break in the
flow of program execution. Now a web service is a modular program; it
has one entry point and one exit point - so you _must_ still continue
to that same exit point (perhaps returning a SOAP error). There can be
no "exception" that pervades the WS interface, because the concept is
basically meaningless (or at least undescribed).

Finally,
Can i use API classes such as Date and Time with web services ??


You can use anything you like "with" web services. You shouldn't pass
anything _through_ the interface though, unless you can map it onto
something clean and describable in XML Schema.

Jul 20 '05 #2

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

Similar topics

0
1722
by: Erik P. Vinther | last post by:
Hi This might be slightly OT, but I couldn't find a better NG for this question The question is regarding versioning of webservices. A webservice end point URL basically consists of a base company URL and a webservice name, e.g… webservices.MyCompany.com/MyService we want to be able to host several versions of a particular webservice at the same time, so we want the version id to be part of the end point URL. This is consistent...
4
2426
by: Benne Smith | last post by:
In our company, i have three servers; 1) a development server (mine only - here i make daily changes and test my stuff) 2) a test server (for the users to test milestone builds - changes weekly) 3) production server (for when a new build is fully tested, and stable) The problem is that the connectionstring in the web.config, should be replaced with something else, for each of the enviroments.
1
1500
by: Diffident | last post by:
Hello Guys, I have a question with regards to the efficiency and best practices in .NET framework. We are currently using Webservices as normal classes. The way we are invoking methods in these Webservices is by instantiating objects of these Webservices and not by adding web references to these services... My question is "Would there be any performance or efficiency overhead, if we
1
1355
by: Jinashe | last post by:
what do i need to enable accessing of webservices from a clients PC i'm hosting some webservices from my server in VB.NET. i've got some client windows applications done in VB.NET. what have i got to install on the clients PC to be able to access these webservices?? Will just the .NET Framework suffice??? Or do i have to install SOAP?? note - the OS of the client can be win98, win2K, win3000, winXP
2
1753
by: news.microsoft.com | last post by:
I have been looking around at the documentation and have come across a lot about how to create webservices and consume them. I have a fairly large 3 tier application with a ton of classes in c# that are currently being used by the website. Is there a quick/ rad tool that can take a c# class and generate a webservice proxy/asmx file? Any suggestions that does not involve writing the guts of the code from scratch :) would be really...
3
1576
by: Chris Calzaretta | last post by:
Hello Working with system.threading.thread Ok I have an windows user control. It has 3 thread on it thread 1 uploaded files types a thread 2 upload files types b thread 3 upload files types c this all happens at same time Works great
2
1971
by: Antuane | last post by:
any one have any idea how transactions could be enabled in webservices. i.e., suppose i've got 2 methods - one to add a contact, & the other to set some miscellaneous details for the contact, in a webservice. Now the client uses the above two methods & if the client is happy with the return values of the above two methdos, ONLY then are the changes made on the server to be commited. (there'd be three other methods, begin-transaction,...
10
14845
by: Mae Lim | last post by:
Dear all, I'm new to C# WebServices. I compile the WebService project it return no errors "Build: 1 succeeded, 0 failed, 0 skipped". Basically I have 2 WebMethod, when I try to invoke the first method it is working fine. Then when I try to invoke the second method it return me an error, Just In-Time Debugging, with error message "An exception 'System.StackOverflowException' has occurred in WebServices"
10
10570
by: smarty | last post by:
Hi, I have written a WSE in vis studio 2005 as and produced a dll that I can use in other projects by including the following in the web.config. <webservices> <soapextensiontypes> <add type="traceextension, simpleModule" priority="1" group="high"/> </soapExtensionTypes> </webservices>
4
1322
by: John Sitka | last post by:
Hi, sorry for a crosspost but that other news group was showing last post was a week ago so I guess it dosen't see much use... I'm about to start a solution and I'm curious about the approach of a webservices project. Should the objects be represented in classes such as... public class Orders (ie Orders.cs) within a project and then have the service be in a class like OrdersService.asmx public class OrdersService :...
0
8378
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
8890
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8577
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
8653
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6206
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
5677
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
4202
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
4376
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2786
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.