473,546 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is the convention for returning .NET only data types from web service

Hi:

What would be some standard convention to follow when writing web services
for return types for .NET only data types? I initially wrote my web service
that returns some XML as System.XML.XMLD ocument and some lists as
System.Data.Dat asets. I realized this would be precluding any non-.NET apps
from using it.

Is it generally considered OK to have web services take and return data
types that are .NET only? Doesn't it negate the idea of web services in
general of being platform independent?

Has anyone dealt with this type of issue?

Thanks
Nov 21 '05 #1
2 1468

"Tarren" <no*****@thanky ou.com> wrote in message
news:eA******** ******@TK2MSFTN GP10.phx.gbl...
Hi:

What would be some standard convention to follow when writing web services
for return types for .NET only data types? I initially wrote my web service that returns some XML as System.XML.XMLD ocument and some lists as
System.Data.Dat asets. I realized this would be precluding any non-.NET apps from using it.
Returning an XmlDocument is fine as far as interoperabilit y goes. An
XmlDocument serializes itself as plain XML so the client can read the
response using the usual XML techniques. With an XmlDocument, you are not
tying yourself to .NET.

A DataSet, on the other hand, is problematic from non-.NET-client's point of
view (for more information on this, read
http://msdn.microsoft.com/library/de...e02112003.asp).
Is it generally considered OK to have web services take and return data
types that are .NET only? Doesn't it negate the idea of web services in
general of being platform independent?


It does negate the idea of platform independency, but it really depends
entirely on your specs. Is interoperabilit y a requirement now or in the
future? If so, don't return .NET-only types. If interoperabilit y is not a
requirement, then .NET Remoting might be more appropriate for your needs.

Regards,
Sami
Nov 21 '05 #2
thanks for the response - very helpful
"Sami Vaaraniemi" <sa**********@p leasejippii.fi> wrote in message
news:u$******** ******@TK2MSFTN GP12.phx.gbl...

"Tarren" <no*****@thanky ou.com> wrote in message
news:eA******** ******@TK2MSFTN GP10.phx.gbl...
Hi:

What would be some standard convention to follow when writing web
services
for return types for .NET only data types? I initially wrote my web

service
that returns some XML as System.XML.XMLD ocument and some lists as
System.Data.Dat asets. I realized this would be precluding any non-.NET

apps
from using it.


Returning an XmlDocument is fine as far as interoperabilit y goes. An
XmlDocument serializes itself as plain XML so the client can read the
response using the usual XML techniques. With an XmlDocument, you are not
tying yourself to .NET.

A DataSet, on the other hand, is problematic from non-.NET-client's point
of
view (for more information on this, read
http://msdn.microsoft.com/library/de...e02112003.asp).
Is it generally considered OK to have web services take and return data
types that are .NET only? Doesn't it negate the idea of web services in
general of being platform independent?


It does negate the idea of platform independency, but it really depends
entirely on your specs. Is interoperabilit y a requirement now or in the
future? If so, don't return .NET-only types. If interoperabilit y is not a
requirement, then .NET Remoting might be more appropriate for your needs.

Regards,
Sami

Nov 21 '05 #3

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

Similar topics

0
990
by: Demetri | last post by:
I have 2 web services. Web service "Main" and a Web Service "Proxy". I also have a shared libary of complex types. The "Proxy" web service simply calles methods of the "Main" web service. When I invoke a method in the "Main" web service directly it returns an xml document that lists all the "type" information of each element and they...
2
1671
by: matthias_k | last post by:
Hello, I'm wondering if returning const references to a class member is generally faster than returning a copy of the object. Consider this code: class A { std::string data; public:
51
4461
by: jacob navia | last post by:
I would like to add at the beginning of the C tutorial I am writing a short blurb about what "types" are. I came up with the following text. Please can you comment? Did I miss something? Is there something wrong in there? -------------------------------------------------------------------- Types A type is a definition for a sequence of...
0
1297
by: Demetri | last post by:
I have 2 web services. Web service "Main" and a Web Service "Proxy". I also have a shared libary of complex types. The "Proxy" web service simply calles methods of the "Main" web service. When I invoke a method in the "Main" web service directly it returns an xml document that lists all the "type" information of each element and they...
1
5535
by: J. Askey | last post by:
I am implementing a web service and thought it may be a good idea to return a more complex class (which I have called 'ServiceResponse') in order to wrap the original return value along with two other properties... bool error; string lastError; My whole class looks like this... using System;
669
25603
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic paper written on this subject. On the Expressive Power of Programming Languages, by Matthias Felleisen, 1990....
5
4962
by: Jim Murphy | last post by:
In creating a C# web service, I am having trouble returning a DataTable object as the result of a web method. I have no problem returning native types like string or int, but cannot return a .NET DataTable object. The problem occurs when I try to compile the client side C# application (it complains about the DataTable type not being...
2
1566
by: David++ | last post by:
Hello list, I have built a project in VS2005 which includes a Web Service Web Site. On this server there is a Database. I have used the DataSet designer to link to this database and VS2005 has created Table Adapters which connect to the database and return the table data. My DataSet is called DatabaseDataSet. My WebMethod for returning data...
5
8987
by: jennwilson | last post by:
Using Access 2000 - I have a query that is suppose to return the records from table within specified time range and find matching data from another table . Table houses Clinician name, location and rate information Table houses Clinician name, location and number of units for each type of service rendered on each day. The two tables are...
0
7504
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, well explore What is ONU, What Is Router, ONU & Routers main...
0
7947
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...
1
7461
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...
0
6026
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3491
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...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
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
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
747
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...

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.