The sample WEBSERVE HTTP server included with Xb2.NET also provides SOAP services. In order to execute a SOAP service, WEBSERVE.EXE must be running. If the server is not running, do this:
The SOAP services can be executed by initiating a request from a SOAP client. A sample SOAP client application SOAPEXEC.EXE is included with Xb2.NET and can be started by clicking here. Alternatively, these tests can also be executed from your web browser by using the generic SOAP Message Builder applet from soapclient.com. NOTE: The generic SOAP client applet can only connect to the server if the server has an external IP address. Proceed as follows:
SOAP Action | Description | SOAP Envelope |
---|---|---|
GetDateTime | Return current server date and time to remote SOAP client. |
<?xml version="1.0" ?> <env:Envelope xmlns:env="http://www.w3.org/2001/06/soap-envelope"> <env:Body> <m:GetDateTime env:encodingStyle="http://www.w3.org/2001/06/soap-encoding" xmlns:m="http://xb2.net/soap"> </m:GetDateTime> </env:Body> </env:Envelope> |
SaveMessage | Save a text message on server. Message is saved in file SOAPLOG.TXT |
<?xml version="1.0" ?> <env:Envelope xmlns:env="http://www.w3.org/2001/06/soap-envelope"> <env:Body> <m:SaveMessage env:encodingStyle="http://www.w3.org/2001/06/soap-encoding" xmlns:m="http://xb2.net/soap"> <UserName>Peter Parker</UserName> <Message>Here comes the spider man</Message> </m:SaveMessage> </env:Body> </env:Envelope> |
EchoAll | Echo back all parameters. The sample envelope on the right contains a 3 element integer array. |
<?xml version="1.0" ?> <env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAPEnc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Body> <m:EchoAll env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:m="http://xb2.net/soap"> <inputIntegerArray SOAPEnc:arrayType="xsd:int[3]" xsi:type="SOAPEnc:Array"> <xsd:int xsi:type="xsd:int">1</xsd:int> <xsd:int xsi:type="xsd:int">2</xsd:int> <xsd:int xsi:type="xsd:int">1234</xsd:int> </inputIntegerArray> </m:EchoAll> </env:Body> </env:Envelope> |