Re: DataTable returned from a Web Service



Most of my clients are .NET, in fact one is a VB6 client and I was able to convert a DataTable within a DataSet to a classic ADO Recordset and works perfectly. I come from a DCOM background so passing a .NET object is not a big fuzz for me. I know for a SOA type web service passing proprietary objects is no-no, but in my circumstance it's a benefit.

Anyway I wanted to avoid having to pass a DataSet and instead pass a DataTable since I think is a lighter payload than a DataSet and I will be using only single tables or joined queries. Funny thing is that with my VB6 client I can use the web service function that returns a DataTable but not my 'new' .Net clients.

Thanks anyway.
Javier

John Saunders wrote:
"jsoques" <jsoques@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:C0720B2F-95CD-45EB-831A-E81D7BC47ABF@xxxxxxxxxxxxxxxx
Hello, I created a Web Service using .Net 2.0 that has a function that
returns a DataTable. I can test the function from the web page when I access
the .asmx from a browser on localhost and it works. I can also test the
function using VB6 and the xmlhttp activex object. The problem I have now is
when using VS 2005 or VB.Net 2005 Express and creating a web references is
that the proxy created doesn't map the function as returning a DataTable
instead returns some other type of object named xxxxResult where xxxx is the
name of the web service function. I have another function that returns a
DataSet that works perfectly with the web reference although I'd rather use a
DataTable since I won't need all the functionality that a DataSet brings.
Anyone have the same problem and found a solution?

Unless all of the clients of your web service are using .NET, then you should not be trying to transfer .NET objects to and from your web service.

John


.



Relevant Pages

  • Re: How do Large Scale Web Service Applications Maintain Session State?
    ... cache these profiles on the server in order to increase performance. ... which is something different than stateful Web Service classes. ... We do pass a session token as ... Having systems deployed through web services allows clients to access via ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Underlying Connection Was Closed Error
    ... I'm working with remote clients that ... Yeah, Microsoft Network Monitor 3.1, works fine even on Vista) ... a web service on IIS 6.0 via SSL and using X509 Client Certificates. ... ....If Not userProxy Is Nothing Then ...
    (microsoft.public.dotnet.framework.webservices)
  • Need advice on security setup
    ... Business Services layer will be implemented as XML Web Services. ... There will be several "clients" to the service layer. ... I need to authenticate each request to my services layer, ... credentials in the web service request, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Web service Performance
    ... clients are using it to synchronize some datas from clients database to ... server database, so they are calling web service methods very often. ... everything is restarting and queries response are going ...
    (microsoft.public.dotnet.framework.webservices)
  • web service wrapper for vb6 clients
    ... use via COM and exposes some of the web service methods. ... if the web method returns a simple custom object (no ... top-level object from the vb6 client. ...
    (microsoft.public.dotnet.framework.webservices)