Skip to main content
Omnitracs Knowledge Base

Application Specific Errors

A very wide range of error conditions may arise from both socket issues as well as XML and web service engine issues. These are discussed in other topics in this section.

If no socket errors, XML errors, or web service engine errors arise, application-specific errors are also possible. An application-specific error assumes that the web service request was transmitted successfully over the socket, and has made it through the XML parser and the web service engine on the server side. The application code has received the web service request and begun to act on the request.

Application-specific errors are by far the most numerous, because they are solely dependent on the application programmer. Each individual web service may return any number of application-specific errors to the client.

As a generic example, consider a "SendMessage" web service, which will send a message into the syetem, destined for a specific vehicle. Application-specific errors can vary widely, including:

  • You do not have permission to perform this action
  • Vehicle Id is missing
  • No payload provided
  • Payload too large

 

WSExceptions

 

All EIP web services will return application-specific errors via a "WSException" mechanism. A class of exception named WSException is defined. This class of exception will only convey application-specific errors, and will be used to convey nothing else.

For more sophisticated client platforms such as .NET, receiving this class of exception will generate an instance of a WSException class in C#, which can then be "caught" and handled using C# language tools.

The following is an example of an application-specific error which may arise during a call to the Get Outgoing Messages web service. If you look at the list of exceptions at the bottom of the Get Outgoing Messages page, you will see the exception below defined in the list.

<soapenv:Body>

  <soapenv:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

    <faultcode xmlns:baseEip="http://base.data.eip.omnitracs.com/1.0">baseEip:WSException</faultcode>

    <faultstring>WSException: 1001: Unable to get outgoing messages. Cannot request more than 2 outgoing messages when request for Service Id of SCAN.</faultstring>

    <detail encodingStyle=""> <baseEip:WSException xmlns:baseEip="http://base.data.eip.omnitracs.com/1.0">

      <message>1001: Unable to get outgoing messages. Cannot request more than 2 outgoing messages when request for Service Id of SCAN.</message> </baseEip:WSException>

    </detail>

  </soapenv:Fault>

</soapenv:Body>

  • Was this article helpful?