O$: Web Service Server to return custom Faults

RM research robertmostyn99 at gmail.com
Mon Mar 9 06:53:12 EDT 2015


When I write web services I implement this rule:
Every call has at least the same two parameters to return
- serviceCode
- serviceMessage
then you add any further parameters - the application specific parameters

This way you always have some values to return curfew / authorisation / application error information.  Very important for web services because there is no other means of communication.

serviceCode = 1 is my standard “method executed without exception” value

everything else you make up to suit your protocol / programming standards


> On Mon9 Mar 2015, at 8:13, Nick Renders <omnis1 at arcict.com> wrote:
> Hi List,
> I am dabbling around with the Omnis Web Service Server and was wondering if it is possible to return my own Fault XMLs?
> I know the Server does its own error handling and will return something like:
> <?xml version="1.0" encoding="UTF-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>    <soap:Body>
>        <soap:Fault>
>            <faultcode>soap:Client</faultcode>
>            <faultstring>Invalid year in date/dateTime value (DATETIME) (reported from Omnis server)</faultstring>
>        </soap:Fault>
>    </soap:Body>
> </soap:Envelope>
> I am not looking to override that per se, but I would like to perform some extra checks and show a Fault XML if necessary.
> Can I do this from my Remote Task or is there perhaps a different way to return custom Fault codes?
> I am using Omnis Studio
> Best regards,
> Nick Renders
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com

More information about the omnisdev-en mailing list