DEMO 1: "Hello World!"
The simplest example you can imagine (but maybe not the most fanciful...):
» Show / hide sample source code
DEMO 2: using parameters
Passing parameters to the Web Service:
» Show / hide sample source code
DEMO 3: using .NET framework core classes
Using a date as return type (.NET "DateTime" automatically converted to JavaScript "Date")
» Show / hide sample source code
DEMO 4: void methods
Calling a void method with a long response-time (while waiting for the response an orange box is displayed):
Please wait...

» Show / hide sample source code
DEMO 5: Exceptions
Handling exceptions:
» Show / hide sample source code
DEMO 6: sync calls
Syncronous call example: server response is delayed 5 seconds using "Wait" method (see demo No. 4). Please note that browser is stuck until response is received:
» Show / hide sample source code
DEMO 7: using custom entities (classes)
Leaving the textbox empty, the web method will return a null; entering any value a User object with random property values will be returned:
» Show / hide sample source code
DEMO 8: arrays
Using custom entity arrays. The web method returns an array with 4 User objects (see demo No. 7)
» Show / hide sample source code
DEMO 9: ICollection
Custom entity collection (System.Collections.ICollection). The web method returns a UserList object, typed collection of User (see demo No. 7) with 3 elements.
» Show / hide sample source code
DEMO 10: practical usage
Fill options with AJAX:
» Show / hide sample source code
DEMO 11: Using the SOAP response (xml)
How to use the SOAP response (XmlDocument) in callback method.
In this example we show only the Xml in an alertbox, but you can - for example - transform the SOAP response using a stylesheet (XSL).
» Show / hide sample source code