JavaScript SOAP Client - DEMO

DEMO 1: "Hello World!"

The simplest example you can imagine (but maybe not the most fanciful...):


DEMO 2: Using parameters (base)

Passing parameters to the Web Service (see also DEMO 12):


DEMO 3: Using .NET framework core classes

Using a date as return type (.NET "DateTime" automatically converted to JavaScript "Date")


DEMO 4: Void methods

Calling a void method with a long response-time (while waiting for the response an orange box is displayed):


Handling exceptions:


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:


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:


DEMO 8: Arrays

Using custom entity arrays. The web method returns an array with 4 User objects (see demo No. 7)


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.


DEMO 10: Practical usage

Fill options with AJAX:


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).


DEMO 12: Using parameters (advanced)

Passing complex parameters to the Web Service

Example #1: string, int, float, bool, Date

Example #2: string[]

Example #3: int[]

Example #4: User (custom object)

Example #5: User[] (custom object list)