Best Way to Retrieve XML From Remote Class?

J

Jim Bayers

What's the best way to retrive xml from a remote class?

Here's my situation. All the servers are running Win2003. There's a
web server on Public. There's a sql server on Campus. The only access
we have to Campus is through Secure.

-----------------
| Campus |
-----------------
|
-----------------
| Secure |
-----------------
|
-----------------
| Public |
-----------------

Somebody pointed me to a msdn article

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dnnetsec/html/SecNetHT15.asp

And I've got that up and running. Right now, I can access the remote
class on Secure through a web service running on Secure. Our net nazi
won't let us put a web server on Secure.

What we want is the user to enter in a few variables on a form on
Public's webserver, send the variables to Secure, have the remote object
on Secure query the database on Campus and then send the data back to
the Public.

What's the best way? Can I pass a dataset?
 
K

Ken Kolda

Is it a web service that's running on Secure or a Windows Service that's
running and hosting a remoted object? A .NET web service generally runs
under IIS but you indicated that Secure doesn't have a web server (plus, the
article you posted is about creating a Windows Service, not a Web Service).

If you're using a Windows Service to host an object using remoting, then
passing a DataSet from the service to the client is certainly acceptable.
Your remote object would look something like:

public class RemoteObject : MarshalByRefObject
{
public DataSet GetSomeData(int someParam, string anotherParam)
{
// Get the data from the database and return the data set
}
}

The main issue you have to watch out for is that the DataSet is fairly
inefficient when it comes to being serialized/deserialized, so if you're
passing large amounts of data or making lots of calls, you may want to
consider either an alternate representation or one of the pieces of code out
there to improve the performance of the DataSet:

http://objectsharp.com/Blogs/datasetfaq/archive/2004/06/10/614.aspx

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top