473,246 Members | 1,460 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,246 software developers and data experts.

Help Me....WebServices 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 : WebServiceRequestor

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 1555
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
"Polymorphism" 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
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...
4
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)...
1
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...
1
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...
2
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#...
3
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...
2
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...
10
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...
10
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...
4
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...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.