Skip to content

Warn - XML Tag Name Warning

The Warn facility in XML Services displays SERNET messages in the SERPRINT data set that describe tag name errors in XML Services requests.

When XML Services processes a request, an unrecognized tag name is ignored, and processing continues with the next tag.

If the data for that tag is critical to the execution of the request, the request fails and an error message based on the effect of the missing data is displayed in the response. If the data is not critical to the execution of the request, the request is executed without the data, and no error message is displayed. However, the result might not be the desired result.

The Warn facility helps you detect syntax errors in an XML Services request that may effect the response.

Warn Tag Name Error Examples

This section shows two examples of how the Warn facility alerts you to syntax errors in an XML Services message. These examples were executed in XML Services prototyping tool XMLSERV.

Example 1: Failed Request

In this example, the <applName> tag is misspelled, and since application is required to find any approval entities, the request fails. The response tells you that the request failed, but it does not describe the tag name error. The tag name error is described in a SERPRINT message.

REQUEST

...

<?xml version="1.0"?>
<service name="APPROVER">
    <scope name="APL">
        <message name="LIST">
            <header>
                <subsys>5</subsys>
                <test> </test>
                <warn>Y</warn>
                <product>CMN</product>
            </header>
            <request>
                <approverListType>1</approverListType>
                <xxxxName>ACTP</applName>
                <approverEntity>OPS </approverEntity>
            </request>
        </message>
    </scope>
</service>

RESULT

...

<?xml version="1.0"?>
<service name="APPROVER">
    <scope name="APL">
        <message name="LIST">
            <response> <statusMessage>CMN8490I - package name was not specified.</ statusMessage>
                <statusReturnCode>08</statusReturnCode>
                <statusReasonCode>8490</statusReasonCode>
            </response>
        </message>
    </scope>
</service>

SERPRINT MESSAGES

...

SER8209I Logon accepted for user USER239; Local CCSID=00037 
SER8414W Unrecognized tag in request for user USER239, tag: xxxxName, 
service: APPROVER, scope: APL, message: LIST
SER2005I CMN Detach user USER239: TCA=1718D000 ASID=00B1

...

Example 2: Successful Request With Error

In this example, tag <yyyyyyyyEntity> is invalid and ignored, but since there is only one unplanned approver for this application, the result looks valid. However, the message in SERPRINT reveals the tag name error.

REQUEST

...

<?xml version="1.0"?>
<service name="APPROVER">
    <scope name="APL">
        <message name="LIST">
            <header>
                <subsys>5</subsys>
                <test> </test>
                <warn>Y</warn>
                <product>CMN</product>
            </header>
            <request>
                <approverListType>1</approverListType>
                <applName>ACTP</applName>
                <yyyyyyyyEntity>OPS </approverEntity>
            </request>
        </message>
    </scope>
</service>

RESULT

...

<?xml version="1.0"?>
<service name="APPROVER">
    <scope name="APL">
        <message name="LIST">
            <result>
                <approverListType>1</approverListType>
                <applName>ACTP</applName>
                <approverEntity>OPS</approverEntity>
                <approverDesc>OPERATIONS SUPERVISOR</approverDesc>
                <approvalOrder>00</approvalOrder>
                <notification>
                    <notifierType>1</notifierType>
                    <userList>USER239</userList>
                </notification>
            </result>
            <response> 
                <statusMessage>CMN8700I - LIST Approver service completed</ statusMessage>
                <statusReturnCode>00</statusReturnCode>
                <statusReasonCode>8700</statusReasonCode>
            </response>
        </message>
    </scope>
</service>

SERPRINT MESSAGES

...

SER8209I Logon accepted for user USER239; Local CCSID=00037 
SER8414W Unrecognized tag in request for user USER239, tag: yyyyyyyyEntity,
service: APPROVER, scope: APL, message: LIST
SER2005I CMN Detach user USER239: TCA=1718D000 ASID=00B1

...

Enabling XML Tag Name Error Warning

There are three methods for turning on the Warn facility of XML Services:

  • <warn> tag in an XML Services message header

  • WARN keyword option for SERNET

  • WARN modify command

<warn> Tag in an XML Services Message Header

When you set the tag in a request to Y, the Warn facility is active for that request when it is executed. The Warn facility is not invoked for other requests unless they are also coded with the tag set to Y.

Example:

<warn>Y</warn>

Setting the tag to N has no effect.

WARN Keyword Option for SERNET

The Warn facility can be turned on for all XML Services messages executed on a server by including the SERNET keyword option WARN in the parameters input to the started task when it is initiated.

Examples:

    WARN
    WARN(YES)

The WARN keyword option is described in the ChangeMan ZMF Installation Guide in the appendix titled "SERNET Keyword Options." Methods to input SERNET keyword options to a SERNET started task are described in topic "Passing Parameters to SERNET" in the same book.

WARN Modify Command

The Warn facility can be toggled on and off for all XML Services messages executed on a server by issuing the WARN modify command through the operator console.

Examples:

Command: /F SERT5,WARN,YES

SERPRINT Messages:

SER0850I Operator command: WARN,YES
SER0960I XML syntax warning has been turned on

Command: /F SERT5,WARN,NO

SERPRINT Messages:

SER0850I Operator command: WARN,NO
SER0959I XML syntax warning has been turned off

Hierarchy of Warn Facility Controls

The hierarchy of Warn facility controls is:

  1. <warn\>Y</warn\> in an XML Services request

  2. WARN modify command

  3. WARN keyword option.

The WARN keyword option turns the Warn facility on for all XML Service requests.

The WARN modify commands toggles the Warn facility on or off, overriding the WARN keyword option.

<warn\>Y</warn\> in an XML Services request turns on the Warn facility for that request only, regardless of the status of the WARN keyword option or WARN modify command.

<warn\>N</warn\> in an XML Services request has no effect.