IBM Support

IV87984: REST API RESPONSE IS IN XML FORMAT BUT RESPONSE HEADER STATES CONTENT-TYPE: TEXT/PLAIN

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When using the REST API the acknowledgement message that is
    returned by the API is in XML format but the header states
    Content-Type: text/plain.
    The Customer's application that receives the acknowledgement is
    not able to understand the message because the Content-Type
    field wrongly describes it as being in text/plain format.
    Customer is requesting that the header should describe the
    format of the response message from the API as Content-Type:
    application/xml
    PERFORMANCE ISSUE:  no
    STEPS TO REPRODUCE:
    1. Create new object structure ZZCURRENCY with object CURRENCY
    2. Create enterprise service ZZCURRENCY_CREATE,
    operation=Create,
    object structure=ZZCURRENCY
    3. Create external system ZZCURRENCY, endpoint=mxflatfile,
    Enterprise
    Services=ZZCURRENCY_CREATE
    4. Create web service from Enterprise Service
    ZZCURRENCY_ZZCURRENCY_CREATE
    5. Generate schema/xml
    6. deploy to product web service container
    Call REST API to create new currency code:
    Post:
    POST
    http://nc9053114100.tivlab.austin.ibm.com/meaweb/es/ZZCURRENCY/Z
    ZCURRENCY_CREATE HTTP/1.1
    Accept-Encoding: gzip,deflate
    Content-Type: text/xml
    Content-Length: 315
    Host: nc9053114100.tivlab.austin.ibm.com
    Connection: Keep-Alive
    User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
    <?xml version="1.0" encoding="UTF-8"?>
    <CreateZZCURRENCY xmlns="http://www.ibm.com/maximo" event="0">
    <ZZCURRENCYSet>
      <CURRENCY action="Query">
       <ACTIVE >true</ACTIVE>
       <CURRENCYCODE >XYZ</CURRENCYCODE>
       <DESCRIPTION >test XYZ currency code</DESCRIPTION>
      </CURRENCY>
    </ZZCURRENCYSet>
    </CreateZZCURRENCY>
    Response
    HTTP/1.1 200 OK
    Date: Mon, 15 Aug 2016 10:23:31 GMT
    X-Powered-By: Servlet/3.0
    Keep-Alive: timeout=10, max=100
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/plain; charset=UTF-8
    Content-Language: en-US
    <?xml version="1.0" encoding="UTF-8"?><CreateZZCURRENCYResponse
    xmlns="http://www.ibm.com/maximo"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    creationDateTime="2016-08-15T06:23:31-04:00" transLanguage="EN"
    baseLanguage="EN"
    messageID="2104110.1471256611959735412"><CURRENCYMboKeySet><CURR
    ENCY><CURRENCYCODE>XYZ</CURRENCYCODE></CURRENCY></CURRENCYMboKey
    Set></CreateZZCURRENCYResponse>
    CURRENT ERRONEOUS RESULT:
    Content-Type: text/plain; charset=UTF-8
    EXPECTED RESULT:
    Content-Type: text/xml or Content-Type: application/xml
    ADDITIONAL INFO:
    ENVIRONMENT:
    - SCCD: reported on 7.5.1.0, also occurs on 7.6.0.1
    - TPAE: reported on 7.5.0.4, also occurs on 7.6.0.3
    - OS  : N/A
    - DB  : N/A
    - Base Language: N/A
    - Additional Language: N/A
    - Browser:  N/A
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All Maximo Users using REST API and expecting a response     *
    * header other than text/plain                                 *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * REST API RESPONSE IS IN XML FORMAT BUT RESPONSE HEADER       *
    * STATES  CONTENT-TYPE: TEXT/PLAIN                             *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to latest release                                    *
    ****************************************************************
    

Problem conclusion

  • REST API response header states content-type: text/plain or
    whatever content type is in the Accept header once
    mxe.int.entservicerespcontenttype is toggled to 1
    
    The fix for this APAR is contained in the following maintenance
    package:
    	 | release\fix pack | Fix Pack Release 7.6.0.6 TPAE
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV87984

  • Reported component name

    CONTROL DESK/SC

  • Reported component ID

    5725E2400

  • Reported release

    750

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-08-15

  • Closed date

    2016-10-07

  • Last modified date

    2016-10-07

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • MAXIMO
    

Fix information

  • Fixed component name

    ADMINISTRATION

  • Fixed component ID

    5724R46A1

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCHPP5","label":"System Related"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"750","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
07 October 2016