473,378 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

.NET type in Web Service Proxy class

If I create a web service with web methods containing enum types these types
are automatically created in the proxy class when I add a web reference to a
client. Is there a way to automatically generate an enum type in the proxy
class if the type is defined in the web service but not used as a parameter
in any of the web methods?
Nov 21 '05 #1
3 3556
Use the XmlInclude attribute and a wrapper class. For more details, see

http://support.microsoft.com/default...b;en-us;326792

Regards,
Sami

"Paul Janssen" <pa**********@camtronics.com.REMOVE_THIS_PART> wrote in
message news:C4**********************************@microsof t.com...
If I create a web service with web methods containing enum types these types are automatically created in the proxy class when I add a web reference to a client. Is there a way to automatically generate an enum type in the proxy class if the type is defined in the web service but not used as a parameter in any of the web methods?

Nov 21 '05 #2
Hi all,

And If I want this class to be in another assembly, referenced by the web
service?

I mean, in my case, the class should not be in the webservice. Should be
encapsulated in a DDL which is referenced by the Web Service. Any ideas?

"Sami Vaaraniemi" wrote:
Use the XmlInclude attribute and a wrapper class. For more details, see

http://support.microsoft.com/default...b;en-us;326792

Regards,
Sami

"Paul Janssen" <pa**********@camtronics.com.REMOVE_THIS_PART> wrote in
message news:C4**********************************@microsof t.com...
If I create a web service with web methods containing enum types these

types
are automatically created in the proxy class when I add a web reference to

a
client. Is there a way to automatically generate an enum type in the

proxy
class if the type is defined in the web service but not used as a

parameter
in any of the web methods?


Nov 21 '05 #3

MIGUEL,

Pl let me know if u found any solution to this issue. I came across the
same issue that u posted here. I need to know if there is any way to
include the assembly having custom .Net types in the web service proxy
class, instead of redefining those types in the proxy class.

I had this issue fixed by manually deleting such .Net type definitions
and adding a using directive for the custom types assembly. It worked
then but I need this to happen dynamically without any manual changes.

Thanks and any help will be appreciated.

Kris

--
kanthik
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message1164437.html

Nov 23 '05 #4

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

Similar topics

8
by: Joe | last post by:
I have a web service which returns many types (classes) to match the return type. I want to cast the return type to the actual class type. For example: namespace Test { class MyClass { ...
2
by: Demetri | last post by:
I have a class library, lets call it ClassLib, which contains an abstract class, lets call it Entity, that acts as sort of a marker. I have a web service that consumes the ClassLib to make use...
1
by: M DL via .NET 247 | last post by:
Hi all, i have one problem with a method of an xml web service that use a datetime data type input variable, and may be all is caused by international settings. The XML web service (localized...
7
by: John Grandy | last post by:
My ASP.NET Web Service project has a Web Method that returns an array filled with instances of a custom class. The custom class is defined in a Class Library that is included in the web-service...
8
by: andyjgw | last post by:
Hi all, hope someone can help here, I'm really stuck. Reading and googling like mad, to no avail so far... Basically, my problem *seems* to boil down to type conversion: Here's a sample web...
7
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
7
by: =?iso-8859-1?Q?S=F8ren_M._Olesen?= | last post by:
Hi How do I pass a complex type to a webservice?? What I have is a Class 'MyComplexClass' which lives in it's own dll/namespace. I'd like to pass this class to my webmethod: <WebMethod()_...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.