O$: Web Service Server to return custom Faults
Nick Renders
omnis1 at arcict.com
Mon Mar 9 12:18:42 EDT 2015
Hi Rob,
Thanks for the tip!
I already implemented messages and soft errors in my XML schemas, I
guess I can use that to return any error.
I have also been playing around with the Omnis error handler commands,
but they don't seem to apply to the WS Faults.
Cheers,
Nick
On 9 Mar 2015, at 11:53, RM research wrote:
> Nick,
>
> 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
>
> Rob
>
>> 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 4.3.2.1.
>>
>> Best regards,
>>
>> Nick Renders
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list