SOAP Examples and Hints
This section contains some general hints and examples for various client-side platforms.
PHP SOAP Client
$soapSession = new SoapClient("http:/host/ewws/KBName/EWServiceAPIv2?wsdl", array("exceptions" => false, "location"=>"https://host/ewws/KBName/EWServiceAPIv2")); $sess_id = $soapSession->EWlogin("KBName","user","password","en"); echo "$sess_id\n"; $ids = $soapSession->EWSelectFromTable($sess_id, "case", "1=1"); print_r($ids); $map = $soapSession->EWRead($sess_id, "case", 521); print_r($map);
SoapUI
When using generic methods a specific descendant of the EWWSBaseUserObject structure needs to be passed. This is achieved by adding the xsi:type specialization to the tags defining the structure in the method call parameters.
<soapenv:Envelope xmlns:soapenv="https://schemas.xmlsoap.org/soap/envelope/" xmlns:tsc="https://KBname.api.ws.agiloft.com" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header/> <soapenv:Body> <tsc:EWCreate> <String_1>d57d</String_1> <String_2>case</String_2> <EWWSBaseUserObject_3 xsi:type="tsc:WSCase"> <summary>Example 1</summary> </EWWSBaseUserObject_3> </tsc:EWCreate> </soapenv:Body> </soapenv:Envelope>
IIS Integration
If you are integrating
Agiloft with Microsoft Internet Information Services (IIS), please modify the web.config file of the IIS to include the <httpErrors existingResponse="PassThrough" />
tag:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpErrors existingResponse="PassThrough" /> </system.webServer> </configuration>
This will allow proper system exceptions to pass through the IIS API, rather than the default IIS errors. Explanation on the other available values is given at https://stackoverflow.com/questions/31040671/what-does-existingresponse-passthrough-mean-in-iis
Related articles