473,686 Members | 3,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Repost: Our web service design for a process flow needs to be mor

I am re-posting this message as originially it did not get a single
response.. Any ideas?

--------------

I am trying to come up with a good design for a web service that has some
user logic and business processes involved. Here a small sample of the
process flow:
---
Client Get's User Input for field 1...
This information is validated. If invalid.. more information is required
Client Get's user Input for field 2....
This information is validated. If invalid.. more information is required
Client Get's user Input for field 3...
At this point the information is autoatically validated to be correct
because we cannot yet find a match in our system so we put all of this
information in.
---

I was having trouble deciding how to set this up as web services. Of course
because I do not want the web service to have to maintain state (ie: maintain
the value of field 1 between calls), so far I have come up with the following
idea.
Three methods in the webservice...
AddItem1(string field1)
AddItem2(string field1, string field2)
AddItem3(string field1, string field2, string field3)
each of these web methods would have a return value that is a complex type
with 2 elements (bool Success, bool CanContinue)
When the client calls AddItem1 and passes in 1 parameter the webservice will
try and validate it. If validated... the web service will add the record to
the database and everything is fine...Success= True...
The client app looks at the returned XML and see's Success=True so it knows
that the record was inserted and not to ask the user for any more details.
If Success=False then the client knows that the record was not added and to
ask for more details and then call AddItem2 web method and so on.... Likewise
if the CanContinue element ever returns false... the client will know that
the item was not added and not to attempt to call AddItem2 or AddItem3
because the value passed is not acceptable and will never be entered into the
database.
It seems to be a cheesy way of incorporating this kind of business flow. It
also is very inefficent as 3 web service calls are required in some cases
jsut to insert the data. Each web service call will do it's own validation
and return a success and cancontinue element. Of course I could incorporate
caching a dataset in a session variable to minimize hits on the database but
this is a real time mission critical application where I need to validate
passed in data with data where data additions occure every minute...
I am up for suggestions on improving this process.....
One more thing... I have included XML comments for all the public web
methods, but they do not appear on the wsdl when looking at the methods. How
can I document this so that when a subscriber goes to the site they can see
in clear exactly how to use these methods (by calling AddItem1 .. looking at
the return value... then maybe having to call AddItem2)...
-D

Aug 15 '06 #1
1 1109
Maybe I missed something, but I don't understand why I am not getting a
response here. It has been over 2 business days...and this is a repost from
a few weeks ago that went unanswered.

Please advise...

"D-Someone" wrote:
I am re-posting this message as originially it did not get a single
response.. Any ideas?

--------------

I am trying to come up with a good design for a web service that has some
user logic and business processes involved. Here a small sample of the
process flow:
---
Client Get's User Input for field 1...
This information is validated. If invalid.. more information is required
Client Get's user Input for field 2....
This information is validated. If invalid.. more information is required
Client Get's user Input for field 3...
At this point the information is autoatically validated to be correct
because we cannot yet find a match in our system so we put all of this
information in.
---

I was having trouble deciding how to set this up as web services. Of course
because I do not want the web service to have to maintain state (ie: maintain
the value of field 1 between calls), so far I have come up with the following
idea.
Three methods in the webservice...
AddItem1(string field1)
AddItem2(string field1, string field2)
AddItem3(string field1, string field2, string field3)
each of these web methods would have a return value that is a complex type
with 2 elements (bool Success, bool CanContinue)
When the client calls AddItem1 and passes in 1 parameter the webservice will
try and validate it. If validated... the web service will add the record to
the database and everything is fine...Success= True...
The client app looks at the returned XML and see's Success=True so it knows
that the record was inserted and not to ask the user for any more details.
If Success=False then the client knows that the record was not added and to
ask for more details and then call AddItem2 web method and so on.... Likewise
if the CanContinue element ever returns false... the client will know that
the item was not added and not to attempt to call AddItem2 or AddItem3
because the value passed is not acceptable and will never be entered into the
database.
It seems to be a cheesy way of incorporating this kind of business flow. It
also is very inefficent as 3 web service calls are required in some cases
jsut to insert the data. Each web service call will do it's own validation
and return a success and cancontinue element. Of course I could incorporate
caching a dataset in a session variable to minimize hits on the database but
this is a real time mission critical application where I need to validate
passed in data with data where data additions occure every minute...
I am up for suggestions on improving this process.....
One more thing... I have included XML comments for all the public web
methods, but they do not appear on the wsdl when looking at the methods. How
can I document this so that when a subscriber goes to the site they can see
in clear exactly how to use these methods (by calling AddItem1 .. looking at
the return value... then maybe having to call AddItem2)...
-D
Aug 18 '06 #2

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

Similar topics

0
2152
by: Jeff Levinson [mcsd] | last post by:
I'm an architect for a very large fortune 100 company and we still struggle with the best balance. However, I use a couple of simple guidelines that have worked very well for me in almost all cases (there have been some times when I've lived to regret some decisions). Use case work flows are the bread and butter of the documentation and all others flow from them. Each of the high-level processes needs to be broken down into lower level...
2
3575
by: Juan Manuel Alegría B. | last post by:
Hi group I have been making a windows service to execute an external application. I use a timer control, I can execute the application but does't appear as a normal windows, just I see it in the windows task manager as a local service. I think it must appear as a normal process. Someone knows about it or has any idea? Juan Manuel Alegria B. Jalisco, México.
1
5792
by: Bucky Pollard | last post by:
I have a web service that needs to create a batch file and call it (since there are no APIs for the functionality I am looking for). I am using the Process and ProcessStartInfo objects. When I try to call the batch file, it just returns with a return code of 1. When I call cmd.exe, and pass the batch file as a parameter it hangs. After much frustration and aggrevation, I found that CMD IS in fact running, but it is running under the context...
0
901
by: BergRD | last post by:
For some odd reason my original post was double posted then removed from the forums. Odd happenings but wanted to re-post incase no one saw the original, thanks :D > Salutations! > > New to the forums but have gotten many an idea from lurking over the past few months but alas it's time to begin positing; posting to a problem I cannot seem to resolve. This is a long description but my hopes are the more information the better someone...
2
6891
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app (which is the UI used to adjust the actions taken by, and the schedule of the service), then a privileged user thread should be used in the UI - no service required. But... "A windows service enables the creation of long-running executable
0
1047
by: sham | last post by:
Hi to all, Sorry for the repost. I asked this question about 2 weeks ago and I have had no reply. I tried on the IIS group, but still no luck. Basically, we have a web service that has now been re-written using Asp.net. The old web service calls were made using : http://MyCompany/soap/NewsService (i.e. without any extension). What I need to do is "redirect" http://MyCompany/soap/NewsService to
4
21729
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a webserver to see if service A needs to be updated. What service B does if it sees their is an update for service A is to download a new copy of the service A executable, stop service A, replace the executable with the new copy, and start service B...
0
1192
by: =?Utf-8?B?Q3JhaWcgRGFuaWVs?= | last post by:
I have a design dilemma here and I’m looking for suggestions. My requirements pretty much dictate I have to build a Windows Service (program needs to be running all the time), and I’ve chosen a Web Service specifically with both a Windows Forms or WPF client and also a Silverlight web client. For the sake of brevity, suffice to say that I need to render images within this service process to be consumed by the clients. The problem...
0
1495
by: Hhamid63 | last post by:
Hi my freinds, I'm in a critical situation and really need someone to help me. I am a student of electrical engineering and my thesis title is as follow: "design a QOS-aware web service composition algorithm in a service-oriented environment". Here comes the problem. I designed an algorithm for this issue but I have no idea: 1. How can I simulate my algorithm? 2. How can i get some real web services for making a service repository?
0
8581
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8514
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
8932
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...
0
8778
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...
0
7598
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
6439
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
5795
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
4528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.