Mani" <Ma**@discussions.microsoft.comwrote in message
news:0C**********************************@microsof t.com...
Hi,
I have a webservice which uses a c# Dll,This Dll is a C# class library
which
contain few class[Class One, Class Two] .
I am able to see the class when in the Web service but when i create a
stubb
class of the webservice using wsdl.exe then these classes are not
exposed.Both the class are public.
I tried for a while and found that if I use these class(one and two) as
the
parameter in the WebMethods the web service and generate the Stubb class
then
these class are exposed.
For ex::
[WebMethod(EnableSession = true)]
public string GetClass(One one)
{
return ;
}
//Method1
This is one way but is there any other way of exposing the class without
exposing in the WebMethod?
What do you want to do with the class on the client if you don't want to
send it to the web service or receive it from the web service?
A web service isn't a class library. It is a way to perform particular
operations on particular kinds of data, expressed in XML and described in
XML.
Also, please be aware that even if your client referred to the same C# DLL
as the Web Service does, the two would not be able to communicate directly
using classes in the C# DLL. The client and server are very strongly
separated in the case of Web Services, and they only communicate via XML,
XML Schema and WSDL. One thing they cannot communicate is the identity of
classes. Therefore, class "ClassLibrary.Class1" on the client and class
"ClassLibrary.Class1" on the server, are two totally different and unrelated
classes.
I hope that's not too discouraging. Please provide more detail of what
you're trying to accomplish, and maybe we'll be of more help.
--
John Saunders [MVP]