Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

A collection of zero or more PwsMessage structures is included in the response of every PWS web service request. If the RequestStatus of the request is "OkWithWarnings" or "Fail", this will contain one or more warning and/or error messages. It may also contain (even when Status is Ok) informational messagesstructure that contains the complete information of a web service error. It consists of an error code, an error number and error text. This structure is used by various services that operate on a set of items in such a fashion where some of the items may fail to be processed without causing the entire operation to fail. For example, when saving time cards, one or more time cards may fail to save while others are saved. In these cases, this structure is included in the web service response to provide details on the specific error that occurred for each failed item.

Format

Panel
titlePwsMessagePwsErrorDetail
  • PwsMessagePwsErrorDetail
    • AdditionalErrorText: String
    • ErrorCode: String
    • ErrorNumber: Int32
    • ErrorText: StringType: MessageType
    • ReferenceId1: Int32
    • ReferenceId2: Int32


Elements

Element

Data Type

Required?

Default

Description

Sample Data

AdditionalErrorText

ErrorCode

String

n/a

n/a

This string may contain additional details about the error or warning, depending on the specific condition.

ErrorCode

String

n/a

n/a

This is a mnemonic error code associated with the message

AtLeastOneItemNotFound

ErrorNumber

Int32

n/a

n/a

The error number associated with the message

105

ErrorText

String

n/a

n/a

The error text associated with the message

At least one requested item was not found. The remaining items, if any, were returned.

Type

MessageType

n/a

n/a

The error type associated with the message. The possible values, in increasing order of severity, are Information, Warning or Error.

Warning

ReferenceId1

ReferenceId2

Int32n/an/aIn some cases these reference ids are used to correlate error message to specific items specified in the web service inputs (for example, these are used to correlate errors to time cards or time off cards specified as inputs to PwsSaveTimeCardsAndRto). The meaning of each value is specific to the particular context

 The code of the web service error.

DescriptionRequiredForSaveProjectIssue

ErrorNumber

Int32

 The number of the web service error.

 84018

ErrorText

String

 The text message of the web service error.

Description is required.

Usage Example(s)


Code Block
languagexml
titleExample 01 - Warning
collapsetrue
				              <b:PwsMessage>
                  <b:AdditionalErrorText i:nil="true"/>
                  <b:ErrorCode>AtLeastOneItemNotFound</b:ErrorCode>
                  <b:ErrorNumber>105</b:ErrorNumber>
                  <b:ErrorText>At least one requested item was not found. The remaining items, if any, were returned.</b:ErrorText><a:ErrorDetail xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
                     <b:Type>Warning<ErrorCode>DescriptionRequiredForSaveProjectIssue</b:Type>ErrorCode>
                  <b:ReferenceId1 i:nil="true"/>
                  <b:ReferenceId2 i:nil="true"/>
               </b:PwsMessage>

Code Block
languagexml
titleExample 02 - Error
collapsetrue
 ErrorNumber>84018</b:ErrorNumber>
              <PwsMessage>                  <AdditionalErrorText>Error 10004: InvalidSessionTicket</AdditionalErrorText>
                 <ErrorCode>InvalidSessionTicket</ErrorCode>
                 <ErrorNumber>10004</ErrorNumber>
                 <ErrorText>The specified session ticket is invalid. Please verify you are issuing this request against the correct instance of Projector.</ErrorText>
<b:ErrorText>Description is required.</b:ErrorText>
                <Type>Error</Type>
                 <ReferenceId1 i:nil="true"/>
                 <ReferenceId2 i:nil="true"/>
   </a:ErrorDetail>             </PwsMessage>