Web Services is meant to be used mainly to communicate between generic client programs (Non-Etere software) and Etere's database; this is possible due to the use of standardized XML files, as explained before; thus, if a program wants to consult the Etere's database or execute a procedure on it, it must send an XML file according to the Etere's predefined models, once Web Services receipt the requests, will perform it based on the parameters specified on the XML file, and finally will return another XML file containing the requested information.
The following is a sample SOAP 1.1 request and response for the "GetAssetById" operation:
1. The Non-Etere program sends an XML file to request the execution of an operation:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetAssetById xmlns="http://www.etere.com/EtereWSApi">
<_user>string</_user>
<_pwd>string</_pwd>
<_idAsset>string</_idAsset>
</GetAssetById>
</soap:Body>
</soap:Envelope>
Legend:
2.The WebServices server attempt to execute the requested operation in the database, returning a response through an XML file:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetAssetByIdResponse xmlns="http://www.etere.com/EtereWSApi"> <GetAssetByIdResult>string</GetAssetByIdResult>
</GetAssetByIdResponse>
</soap:Body>
</soap:Envelope>
Legend:
WARNING: The exact syntax for automatic operation requests can be easily consulted through a web browser, as explained in the next chapter.