HighTechTalks DotNet Forums  

Data table parameter in web services.

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Data table parameter in web services. in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Prem Kumar
 
Posts: n/a

Default Data table parameter in web services. - 06-08-2006 , 01:32 AM






Hi

I understand .NET 2.0 says data table is xml serializable and serializable
in general. I am facing some issues in using data table as an input parameter
in web services.

I am able to create a web service having a data table as input parmeter in
one of the web method, it does list it in IE, when i browse the asmx file,
but somehow am not able to consume this in the client. When i am coding, the
method definition intellisense does not represent the argument as data table,
but as something else.

Can somebody help me out, by sending some samples which has data table as
input paramter in a web method ? / Give me ideas on how to go about this ?

Prem

Reply With Quote
  #2  
Old   
Vijay Pandey
 
Posts: n/a

Default RE: Data table parameter in web services. - 06-12-2006 , 06:15 AM






Check method deffinition in the proxy class that you generate. See what it
actually returns. If it is not a datatable, it should be an object. Try
converting it to a datatable. It shud work.

I have used dataset as parameter in webservices, there is no reason why
DataTable will not work.

"Prem Kumar" wrote:

Quote:
Hi

I understand .NET 2.0 says data table is xml serializable and serializable
in general. I am facing some issues in using data table as an input parameter
in web services.

I am able to create a web service having a data table as input parmeter in
one of the web method, it does list it in IE, when i browse the asmx file,
but somehow am not able to consume this in the client. When i am coding, the
method definition intellisense does not represent the argument as data table,
but as something else.

Can somebody help me out, by sending some samples which has data table as
input paramter in a web method ? / Give me ideas on how to go about this ?

Prem

Reply With Quote
  #3  
Old   
francoisdt
 
Posts: n/a

Default Re: Data table parameter in web services. - 06-12-2006 , 07:32 AM



Can I use this method of passing a data table as parameter to
make a generic web method and pass a list of parameters
with a data table instead of fixed in out parameters?

What I like to do.:
============
Write a software that will call web services dynamically
depends upon settings save upon database.


So the webservice call is not hard-coded but for example
I have a user interface that let a user pick and choose
which web service to use on a set of data.
Save the settings and then when user clicks on a button
the code in the button will read the "action'" that must be
taken upon the data from database and then the name of
web service and url and parms will be read from dynamically and
populated dynamically. So no web service is hard coded.


In such a way one can have a user interface displaying data
and when user clicks a button it will execute the webservice
'action'" that is linked to the button.


The code in the button will just read from database table which
webservice
to execute and this string as a generic procdure that will execute the
web wervice.
This way limitless webservices can be executed instead of hard coded
references and proxies that need to be recompiled

Vijay Pandey wrote:
Quote:
Check method deffinition in the proxy class that you generate. See what it
actually returns. If it is not a datatable, it should be an object. Try
converting it to a datatable. It shud work.

I have used dataset as parameter in webservices, there is no reason why
DataTable will not work.

"Prem Kumar" wrote:

Hi

I understand .NET 2.0 says data table is xml serializable and serializable
in general. I am facing some issues in using data table as an input parameter
in web services.

I am able to create a web service having a data table as input parmeter in
one of the web method, it does list it in IE, when i browse the asmx file,
but somehow am not able to consume this in the client. When i am coding, the
method definition intellisense does not represent the argument as data table,
but as something else.

Can somebody help me out, by sending some samples which has data table as
input paramter in a web method ? / Give me ideas on how to go about this ?

Prem


Reply With Quote
  #4  
Old   
Vijay Pandey
 
Posts: n/a

Default Re: Data table parameter in web services. - 06-21-2006 , 12:50 AM



Better you use xml document as parameter, you have to decide what are
different possible inputs and in what format they will be supplied.

"francoisdt" wrote:

Quote:
Can I use this method of passing a data table as parameter to
make a generic web method and pass a list of parameters
with a data table instead of fixed in out parameters?

What I like to do.:
============
Write a software that will call web services dynamically
depends upon settings save upon database.


So the webservice call is not hard-coded but for example
I have a user interface that let a user pick and choose
which web service to use on a set of data.
Save the settings and then when user clicks on a button
the code in the button will read the "action'" that must be
taken upon the data from database and then the name of
web service and url and parms will be read from dynamically and
populated dynamically. So no web service is hard coded.


In such a way one can have a user interface displaying data
and when user clicks a button it will execute the webservice
'action'" that is linked to the button.


The code in the button will just read from database table which
webservice
to execute and this string as a generic procdure that will execute the
web wervice.
This way limitless webservices can be executed instead of hard coded
references and proxies that need to be recompiled

Vijay Pandey wrote:
Check method deffinition in the proxy class that you generate. See what it
actually returns. If it is not a datatable, it should be an object. Try
converting it to a datatable. It shud work.

I have used dataset as parameter in webservices, there is no reason why
DataTable will not work.

"Prem Kumar" wrote:

Hi

I understand .NET 2.0 says data table is xml serializable and serializable
in general. I am facing some issues in using data table as an input parameter
in web services.

I am able to create a web service having a data table as input parmeter in
one of the web method, it does list it in IE, when i browse the asmx file,
but somehow am not able to consume this in the client. When i am coding, the
method definition intellisense does not represent the argument as data table,
but as something else.

Can somebody help me out, by sending some samples which has data table as
input paramter in a web method ? / Give me ideas on how to go about this ?

Prem



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.