Custom Events in Web Services

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have created a class with custom events.
The delegate for the event is created before the class is declared.
This event works fine when deployed locally.
I convertied the Class into a Web Service, by adding the appropriate
[WebMethod()] and [WebService()] attributes.

When I try to build the Project, I get an error stating the the delegate has
no constructor.

Is there any special attribute I need to apply to the delegate, to make it
work?
Is there any Reference material for declaring delegates and events in
WebServices?
Any help would be appreciated.

Thanks in Advance,
Darshan
 
You probably need to include some code. What part of the project is
failing? Is it the delegate definition that is failing to compile, or
an attempt to use the delegate?

Are you intending to delcare an event that will be consumed by your web
service clients? That they will automatically be notified when
something happens on the server? I don't think that is going to work,
you may have to re-think your design.

Joshua Flanagan
http://flimflan.com/blog
 
Thanks for replying,
I found out from the knowledge base that
delegates and events don't work across a Web Service and a Windows App. I am
experimenting with TcpListener and TcpClient classes instead.

"In this world of complex technology to bring things together, the solution
often lies in simpler/primitive concepts."

Darshan

Joshua Flanagan said:
You probably need to include some code. What part of the project is
failing? Is it the delegate definition that is failing to compile, or
an attempt to use the delegate?

Are you intending to delcare an event that will be consumed by your web
service clients? That they will automatically be notified when
something happens on the server? I don't think that is going to work,
you may have to re-think your design.

Joshua Flanagan
http://flimflan.com/blog

Darshan said:
Hello,
I have created a class with custom events.
The delegate for the event is created before the class is declared.
This event works fine when deployed locally.
I convertied the Class into a Web Service, by adding the appropriate
[WebMethod()] and [WebService()] attributes.

When I try to build the Project, I get an error stating the the delegate has
no constructor.

Is there any special attribute I need to apply to the delegate, to make it
work?
Is there any Reference material for declaring delegates and events in
WebServices?
Any help would be appreciated.

Thanks in Advance,
Darshan
 
Back
Top