467,883 Members | 1,309 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,883 developers. It's quick & easy.

convert a Class Library to web service

can i convert a Class Library to be share in the internet as a web service
i what thet all my classes in the Class Library will be shared
Nov 23 '05 #1
  • viewed: 3216
Share:
3 Replies
Derive a class from the classes, and override the methods, and attribute
them as WebMethod.

Something like:
public class MyWebClass: WebService, MyBaseClass
{

[WebMethod]
public override int MyMethod()
{
return base.MyMethod();
}
}

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"convert a Class Library to web service" <convert a Class Library to web
se*****@discussions.microsoft.com> wrote in message
news:73**********************************@microsof t.com...
can i convert a Class Library to be share in the internet as a web service
i what thet all my classes in the Class Library will be shared

Nov 23 '05 #2
May be i might have misunderstood but, Seems the MyWebClass is deriving from
multiple classes , which will not compile.

"Manohar Kamath" wrote:
Derive a class from the classes, and override the methods, and attribute
them as WebMethod.

Something like:
public class MyWebClass: WebService, MyBaseClass
{

[WebMethod]
public override int MyMethod()
{
return base.MyMethod();
}
}

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"convert a Class Library to web service" <convert a Class Library to web
se*****@discussions.microsoft.com> wrote in message
news:73**********************************@microsof t.com...
can i convert a Class Library to be share in the internet as a web service
i what thet all my classes in the Class Library will be shared


Nov 23 '05 #3
gil
i do that by putting the class library in a virtual sub directory bin
and define in the web.config

<system.runtime.remoting>
<application>
<service>
<wellknown
mode="SingleCall" objectUri="DASefer.soap"
type="MyNameSpace.MyClass,AssemblyName"/>
</service>
<channels>
<channel ref="http"/>
</channels>
</application>
</system.runtime.remoting>
but i have a problem in classes that return a dataSet
when i try to add the web refernce to that class i have the error:
error: Unable to import WebService/Schema. Unable to import binding
'DAKoreBinding' from namespace
'http://schemas.microsoft.com/clr/nsassem/SeferDAccess/SeferDAccess%2C%20Version%3D1.0.1934.18680%2C%20Cu lture%3Dneutral%2C%20PublicKeyToken%3Dnull'.
Unable to import operation 'KoreDetails'. The datatype 'DataSet' is missing.

are any one know what i do rong???


"convert a Class Library to web service" wrote:
can i convert a Class Library to be share in the internet as a web service
i what thet all my classes in the Class Library will be shared

Nov 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Miguel Ferreira via .NET 247 | last post: by
reply views Thread by russell.lane | last post: by
7 posts views Thread by Peter Bradley | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.