473,799 Members | 3,006 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 1045
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
1214
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...
2
1870
by: Heinz Ketchup | last post by:
Hello, I'm looking to bounce ideas off of anyone, since mainly the idea of using Multiple Virtual Inheritance seems rather nutty. I chalk it up to my lack of C++ Experience. Here is my scenario... I have 5 Derived Classes I have 3 Base Classes
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
9688
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
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
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...
0
9079
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...
0
5467
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
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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

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.