000034216 - RSA Identity Governance and Lifecycle RESTful web service response: java.lang.IllegalStateException

Document created by RSA Customer Support Employee on Mar 22, 2017
Version 1Show Document
  • View in full screen mode

Article Content

Article Number000034216
Applies ToRSA Product Set: Identity Management and Governance
RSA Version/Condition: 6.9.1
Platform (Other): Linux
IssueWhen configuring an Access Fulfillment Express (AFX) Connector for RESTful Web Services, the Add Application Role to Account capability has the following default Request Header settings:
Default Configuration


  

Headers


  

  

Name


  

Content Type


  

Accept


  

  

Value


  

application/xml


  

Accept


  

However, when AFX is processing the response from the RESTful Web Service, a message with the following properties and error message may be returned.
Message properties:
INVOCATION scoped properties:
INBOUND scoped properties:
Connection=false
Content-Length=389
Content-Type=application/xml; charset=UTF-8
Date=Wed, 12 Oct 2016 03:20:21 GMT
Keep-Alive=false

The below error may be logged during parsing of the http web service response:
<Response timestamp="2016-10-12T14:20:36.035+11:00">
<status>
<code>2</code>
<brief>Failure - Error processing RESTful web service response</brief>
<detailed>Error processing RESTful web service response: java.lang.IllegalStateException: Expected application/xml but received application/xml; charset=UTF-8</detailed>
</status>
</Response>
CauseThe RESTful Web Wervice is providing a Content Type of: application/xml; charset=UTF-8, but the expected value is just: application/xml.
To enable AFX DEBUG, please review the following articles:
When AFX DEBUG is enabled, the following messages may also be returned in the Connector log:
2016-10-12 09:23:45.675 [DEBUG] org.mule.module.scripting.transformer.ScriptTransformer:125 - Object after transform: Error processing RESTful web service response: java.lang.IllegalStateException: Expected application/xml but received application/xml; charset=UTF-8 
2016-10-12 09:23:45.703 [WARN] org.mule.transport.jms.JmsMessageUtils:269 - Header: Content-Type is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1). It will cause problems in your and other applications. Please update your application code to correct this. Mule renamed it to Content_Type


NOTE


For AFX version 7.0.1 and above, the Connector logs are located in the $AVEKSA_HOME/AFX/esb/logs directory, and have the following prefix;
  • esb.AFX-INIT.log
  • esb.AFX-CONN-<connector name>.log 
  • esb.AFX-SETTINGS-<connector name>.log
For AFX versions 7.0.0 and 6.9, the Connector logs are located in the $AVEKSA_HOME/AFX/mule/logs directory, and have the following prefix;
  • mule-ee.log
  • mule.AFX-CONN-<connector name>.log
  • mule.AFX-SETTINGS-<connector name>.log 
ResolutionSo that it meets the JMS specification (sec. 3.5.1, 3.8.1.1), the RESTful Web Service needs to send:
 
Content-Type=application/xml
 

instead of:
Content-Type=application/xml; charset=UTF-8
 

This is in accordance with the message:

org.mule.transport.jms.JmsMessageUtils:269 - Header: Content-Type is not compliant with JMS specification (sec. 3.5.1, 3.8.1.1).
It will cause problems in your and other applications.
Please update your application code to correct this.
Mule renamed it to Content_Type

WorkaroundIt may not be possible to correct the Content-Type being sent by the RESTful Web Service.  In this situation, RSA Identity Governance and Lifecycle allows the expected Content-Type to be adjusted.
To resolve the problem, update the Request Header Content-Type in the Connector Capabilities, so that is matches what is being sent by the RESTful Web Service; for example,

set Content-Type to: application/xml; charset=UTF-8

Attachments

    Outcomes