Thursday, April 19, 2007

SOAP : Asynchronous web service

Had to implement an asynchronous web service which did not need to be real-time so no response was needed.

Had me a bit puzzled until I realised that a web service can return void!

i.e. in ASP:

[WebMethod]
public void webMethod(Some parameter)

compiles and runs no problem.

So what does it return?

The WSDL shows:


s:element name="webMethodResponse"
s:complexType /
/s:element


So it actually returns null!

Enjoy!

No comments: