473,379 Members | 1,533 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,379 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 1561
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.