Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 14th, 2007, 04:03 AM
Authorized User
 
Join Date: Jan 2007
Location: Islamabad, Punjab, Pakistan.
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aliirfan84
Default How to pass data ??

I want to send a bulk of data to and from webserver through the use of webservice. I don't know how to send it, mean as dataset object or xml and how to use them. Dataset object can become very heavy as it contains alot of data. Can i searlize data in dataset?? If no then how to serailize (make packets) of big XML file so that i can reduce communication overload.


__________________
Regards,
Ali Irfan
Reply With Quote
  #2 (permalink)  
Old March 15th, 2007, 11:59 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

You can pass XML or DataSet as a parameter for the web method.

Code:
[WebMethod]
public DataSet MyMethod(XmlDocument MyXML)
{
     DataSet DS = new DataSet();
     // Your Processing Here

     return DS;
}
Regards
Ganesh
http://ganeshprof.blogspot.com
Find your solution here...
Reply With Quote
  #3 (permalink)  
Old March 16th, 2007, 04:52 AM
Authorized User
 
Join Date: Jan 2007
Location: Islamabad, Punjab, Pakistan.
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aliirfan84
Default

Thanks.
      Please tell me whether should I pass XML file or DatSet. Mean which is lighter.
Thanks

Reply With Quote
  #4 (permalink)  
Old March 20th, 2007, 11:40 AM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i guess using XML wil be a good option as the dataset is heavy in itself and contains lot of information in it.

Reply With Quote
  #5 (permalink)  
Old August 1st, 2007, 06:38 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are going to send alot of data try using XML objects as instead
of datasets.
Datasets are very verbose e.g they contain a lot of data about schema, datatypes, relations, constraints e.t.c.

XML objects outperfom Datasets where large amounts of data are involved. The only downside to XML objects is that they involve a lot more coding.
Also the transmission of datasets exposes dataset schema to hackers especially where no encryption is used.

for my web services i try and avoid transmitting Datasets whenever possible

www.xhydra.com
Reply With Quote
  #6 (permalink)  
Old August 1st, 2007, 08:00 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Quote:
quote:Originally posted by nyasha_c
 Also the transmission of datasets exposes dataset schema to hackers especially where no encryption is used.

Web service data is transmitted as XML (last I checked). XML is essentially self-describing. I can more or less infer the schema of the data by looking *at* the data. Presuming a web service transmission is not happening on a secure connection such that I could see the data being sent, how is a dataset any more exposed than any other data format? True, the inclusion of the dataset schema makes it easier to see what the data types are, but it's not really that hard to figure out the data type of a value. And if someone wants to use the data, hiding the schema isn't going to hide the data.

-Peter
Reply With Quote
  #7 (permalink)  
Old August 1st, 2007, 04:27 PM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 reply to planoie
What I am talking about is the database schema.

A serialized dataset reveals a lot about the DATABASE schema.
A serialized Xml object however does not descride the database schema but the object that was serialized

www.xhydra.com
Reply With Quote
  #8 (permalink)  
Old August 1st, 2007, 09:42 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The schema in the dataset only reveals the schema of the dataset's data, not the schema of the data source. There's no way to know that a dataset came from a database engine, XML, or a text file. It's just a dataset. My point is that the xml of a dataset without the schema is nearly as revealing as the schema of it itself.

-Peter
Reply With Quote
  #9 (permalink)  
Old August 2nd, 2007, 08:57 AM
Authorized User
 
Join Date: Jul 2006
Location: DongYing, , China.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abeen
Default

I think pass xml data is ok !

============================================
  Success grows out of struggles to overcome difficulties.
Email:abeen8298@gmail.com
============================================
Reply With Quote
  #10 (permalink)  
Old August 4th, 2007, 11:02 AM
Registered User
 
Join Date: Aug 2007
Location: Mumbai, MS, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dtkubal
Default

I want to put one caution down here, the SOAP had default size of 4 MB so it may be possible that you get some error while xfering data is file is < 4 MB (Which we encounter while development where we sync to database using webservice).

In that case you need to add following lines in web.config of your webservice.


<system.web>

<httpRuntime maxRequestLength="10000" useFullyQualifiedRedirectUrl="true" executionTimeout="10000"/>

</system.web>

Where Parameters are :

1. maxRequestLength (This parameter assigns max size of SOAP in this case I set it to 10 MB)

2. executionTimeout = 10000 (Time out in Seconds)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to pass data directly into datareport . baburam VB How-To 1 May 23rd, 2006 03:43 AM
how to pass the data from dataset to CR? zouky Crystal Reports 0 November 8th, 2004 02:49 AM
How to pass bulk data(dataset) between webpages jaisonkmathews ADO.NET 10 October 3rd, 2004 02:08 PM
How to pass bulk data(dataset) between webpages jaisonkmathews General .NET 4 September 17th, 2004 09:29 AM



All times are GMT -4. The time now is 05:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.