473,799 Members | 3,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help - multiple web service methods map to a single implementation?

We are starting to setup some Web Services to provide our customers
with a way to programatically interact with our application, and some
of our customers have slightly different requirements in the structure,
format, and representation of the results for common requests. Of
course, we have to comply with their formats, but it seems to be a bit
of overkill to have multiple implementation methods and/or data objects
that represent the different data representation needs when the data
content itself is the same. Is there a standard approach in .NET Web
Services to provide multiple client-facing web service methods that
(somehow) internally map to a single data representation and
implementation method using XSLT or something? If not, is there a
pattern to follow that would hopefully reduce some of the duplication
of effort and error-prone code in mapping different data object
representations ?

Thanks in advance

Mar 1 '06 #1
2 1214
Hi jjouett!

This is the sort of thing that BizTalk does in it's sleep. Granted, it may
be overkill for your particular situation, so here's a bespoke way to do it.

Firstly, you need to decide exactly how different the schemas for the
incoming data are going to be. If they're vastly different, I'd advise
setting up your webservice to take the entire XML document in as a string.
From there, you would have some sort of logic to work out which schema the
document should conform to. You might be able to do this by IP or by making
the sender provide credentials to the webservice.

For each different schema, you'll need an XSLT to map back to your internal
schema.

Load the string into an XMLDocument and process to your internal schema
using the XSLT.

Unfortunately, by using this method, you're losing a lot of your type-safety
as the WSDL won't reflect the underlying datatype requirements (due to the
xml being received as a string).

HTH,

Adam

--
Adam May
Sydney, Australia
MCSD.Net
"jjouett" wrote:
We are starting to setup some Web Services to provide our customers
with a way to programatically interact with our application, and some
of our customers have slightly different requirements in the structure,
format, and representation of the results for common requests. Of
course, we have to comply with their formats, but it seems to be a bit
of overkill to have multiple implementation methods and/or data objects
that represent the different data representation needs when the data
content itself is the same. Is there a standard approach in .NET Web
Services to provide multiple client-facing web service methods that
(somehow) internally map to a single data representation and
implementation method using XSLT or something? If not, is there a
pattern to follow that would hopefully reduce some of the duplication
of effort and error-prone code in mapping different data object
representations ?

Thanks in advance

Mar 1 '06 #2
Thanks for the quick reply. I have considered this type of approach,
but I was really hoping that there would be a solution that would
preserve the datatypes in the interface. If anyone else has
suggestions, I would be very grateful.

Thanks

Mar 1 '06 #3

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

Similar topics

6
1808
by: Code4u | last post by:
I need to design data storage classes and operators for an image processing system that must support a range of basic data types of different lengths i.e. float, int, char, double. I have a template class that stores the data. The problem with this design is the inability to treat image data generically- I have a set of specialized classes with no connection. I'm considering deriving all ImageData<T> classes from a image data abstract base...
6
4449
by: Quiet Man | last post by:
Hi all, I'm designing a fairly simple service that will run on W2K/SP4 and W2K3 servers. It's job is to be a very specialized database server that listens on a given IP address / TCP port and handles multiple connections. Client programs will make a connection and pass text strings to the service, which will then return a value for each of the strings. It's unlikely the service will ever have more than 100 simultaneous connections and...
29
4667
by: MAHESH MANDHARE | last post by:
Hi , Can Anyone explain me exactly why multiple inheritance not used in java and c# thanks, Mahesh -- Have A Good Day, Mahesh, Maheshmandhare@yahoo.co.in
6
5001
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing for long running reports. When the processing is complete it uses crystal reports to load a template file, populate it, and then export it to a PDF. It works fine so far....
2
1045
by: jjouett | last post by:
We are starting to setup some Web Services to provide our customers with a way to programatically interact with our application, and some of our customers have slightly different requirements in the structure, format, and representation of the results for common requests. Of course, we have to comply with their formats, but it seems to be a bit of overkill to have multiple implementation methods and/or data objects that represent the...
0
5577
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
6
3992
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public string UID; public string PWD; }
7
6316
by: jtbjurstrom | last post by:
Bear with me because we are new to WCF and have been going through documentation and samples trying to absorb as much as possible in a short amount of time. Any suggestions would be much appreciated. We would of course rather start off on the right path instead of learning later that there's a much better and easier solution, but get stuck with our original implementation. We are working on designing a client server solution using WCF...
11
2251
by: John | last post by:
Hi All, Although C# has Generics, it still does not support the generic programming paradigm. Multiple inheritance is required to support real generic programming. Here is a simple design pattern to illustrate this. Problem: I need to expose two lists of objects from a high-level class. I would like to expose these lists as read-only, but require write access internally.
0
9546
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
10491
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...
0
10268
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
10247
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
10031
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
7571
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...
1
4146
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
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
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.