473,769 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best way to pass data to a WebService

What is the best way to pass data to a web service.
The client(to send data) has .net environment and also the server on which
the web service is hosted also has the .net environment.

Should I send dataset or an xml which will be created at the client and
parsed at the server, in the web service.

Which will have a better performance.

Thanks,
Anil
Nov 23 '05 #1
2 5673
for the best performance, use with services with TCP, see wise, and if
possible do compression for the data. bear i n mind is not the best for
interoperabilit y. avoid dataset i possible

regards
erymuzuan mustapa
Anil Pundhir wrote:
What is the best way to pass data to a web service.
The client(to send data) has .net environment and also the server on which
the web service is hosted also has the .net environment.

Should I send dataset or an xml which will be created at the client and
parsed at the server, in the web service.

Which will have a better performance.

Thanks,
Anil

Nov 23 '05 #2
If you are using XML on the wire, the choice of data set or custom classes
will not be significantly different. My own preference is to create a
strongly typed, class based interface that is comprised of data types that
readily map between Java, XML Schema data types, and .NET framework. In
general this means stick to string, float, double, int (not integer), and
dateTime. Avoid fancy schema constructs such as group or union - as these
map poorly to object based data representations . Feel free to use
inheritence, but avoid secondary interfaces on your data objects.

The advantage of this approach is that it is more closely mapped to the
application domain, and it avoids the loosely coupled interface that things
like passing strings (which contain XML), XMLDocument/XmlNode etc, or
Object. This aids in reducing the need to help the client side developer
understand what data will be sent/passed and for how long (e.g. contract
stability).

Additionally, avoiding loosely coupled approaches and/or single platform
data types (such as Java HashMaps and .NET datasets) helps you achive the
primary benefit of web services - cross platform interop.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: Best way to pass data to a WebService
thread-index: AcThZETc7RrKgeW 9RqGi37HHwObrnA ==
X-WBNR-Posting-Host: 207.218.111.3
From: =?Utf-8?B?QW5pbCBQdW5 kaGly?= <An*********@di scussions.micro soft.com>
Subject: Best way to pass data to a WebService
Date: Mon, 13 Dec 2004 14:37:04 -0800
Lines: 11
Message-ID: <15************ *************** *******@microso ft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
Path: cpmsftngxa10.ph x.gbl!TK2MSFTNG XA03.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8058
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

What is the best way to pass data to a web service.
The client(to send data) has .net environment and also the server on which
the web service is hosted also has the .net environment.

Should I send dataset or an xml which will be created at the client and
parsed at the server, in the web service.

Which will have a better performance.

Thanks,
Anil

Nov 23 '05 #3

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

Similar topics

2
2414
by: Søren M. Olesen | last post by:
Hi What's best practice for distributing the load between webservices on different computers? What I'd like is for a client to always select the webservice with the least load, I.e. If one is idle then that one should be selected, otherwise one working on a job with less priority than mine should
10
1990
by: Mike Logan | last post by:
I am using the "contract first" design methodology. Contract First is design the WSDL first then design the server and client. However I must design my XSD/XML Schema before anything. I am developing my schema now. I have a version on my schema. However once I start the server side code, how is the server now that the right "complexType" is being passed? What happens if this complexType my web service consumes needs to be...
6
9011
by: placek | last post by:
Hi all. I would like to create two web services: - The first one - ImportData - should take as an input parameter a XML document and return an integer saying if passed XML document was valid and was succesfully processed. - The second one - ExportData - should take as an input parameter an integer an return a XML document. I would like to know if it is possible to do something like that. Do I
1
5096
by: Tarlanim | last post by:
Hi, i'm looking for a way to pass parameter from a HTML-File to a XML-File. In HTML-File i have a reference to XML-File and i want to use the parametre from the HTML-File in XML-File (Parameter from callig HTML instead of "1234567" and "mike" in XML-File) . ******* XML-File <?xml version="1.0" encoding="iso-8859-1" ?> <?xml-stylesheet href="styles_arzt.xsl" type="text/xsl" ?>
2
1426
by: Deecrypt | last post by:
Hi, I'm a newbie to the Web Services topic. I have an ASP.NET website and am trying to send a Dataset from it to a WebService which should insert all the data from this DataSet to an Access database. Also I'm working with untyped datasets. I have read some topics in this newsgroup. One suggested to convert the DataSet to a string using ReadXML, send the string to the WebService, create a new Dataset and read the string back into the...
5
5873
by: Trapulo | last post by:
Hello, I need to send to a webservice a parameter that is a string containing an XML doc. In this xml, a node value came from a byte array (it's an RSA signature). What is the best way to convert the original byte () value to the xml and viceversa? I've tried a lof of way, as encoding.utf8, encoding.unicode, bitconverter, etc, but the only working solution I found is Convert.XXbase64String: writer.WriteElementString("ContentSignature",
14
1904
by: needin4mation | last post by:
I have this in my web service: public XmlDocument GetDataFromDB(string name) { .... do some stuff with name variable..on the database... return the XmlDocument to my datagrid; } Now, in my client default.aspx I have a button that calls this
2
1976
by: adi | last post by:
Hi, I'm developing a webservice and a client application to consume it's services using v1.1 of the framework. I wonder what's the best way to crypt the communication between the webservice and the client. The webservice is a dedicated one, only accessed by my client application and it should stay the same. I can't use WSE because it is not supported by Windows 98 systems and my client application should run on such machines. My...
3
1595
by: Mark B | last post by:
We've got a table with around 50,000 rows. Periodically we want our Outlook Add-in (C#) app to automatically download it as XML for reference look-up use. Is the best way to use write a webservice for this (transferring in XML format) or is there a better way to transfer such a large amount of data?
0
10215
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
10049
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
9996
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,...
1
7410
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
5307
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3964
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
3564
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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.