...
To receive JSON responses from DSS, the httpContentNegotiation
property should be enabled in the axis2.xml
and axis2_client.xml
files which that are stored in the <DSS_HOME>/repository/conf
directory. Note that this setting (JSON content negotiation) cannot be enabled as the default setting. After content negotiation is enabled, you must send requests to the server by adding “Accept:Application/json
” to the request header, and as a result, DSS will return the response in JSON format.
...
- Open the
axis2.xml
file stored in the<DSS_HOME>/repository/conf/axis2
directory. Add
<parameter name=“httpContentNegotiation”>true</parameter>
to the list of parameters. Note that this parameter is not available by default in theaxis2.xml
file and requires to be added manually.Code Block <axisconfig name="AxisJava2.0"> <!-- ================================================= --> <!-- Globally engaged modules --> <!-- ================================================= --> <module ref="addressing"/> <!-- ================================================= --> <!-- Parameters --> <!-- ================================================= --> <parameter name="hotdeployment">true</parameter> <parameter name="hotupdate">true</parameter> <parameter name="enableMTOM" locked="false">optional</parameter> <parameter name="cacheAttachments">true</parameter> <parameter name="attachmentDIR">work/mtom</parameter> <parameter name="sizeThreshold">4000</parameter> <parameter name=“httpContentNegotiation”>true</parameter> <parameter name=“EnableChildFirstClassLoading”>${childfirstCL}</parameter>
...
- Open the axis2_client.xml file stored in the
<DSS_HOME>/repository/conf/axis2
directory. Set the 'content negotiation' parameter to True. Note that this parameter is already available in the
axis2_client.xml
and it is only required to be enabled.Code Block <axisconfig name="AxisJava2.0"> <!-- ================================================= --> <!-- Parameters --> <!-- ================================================= --> <parameter name="hotdeployment">true</parameter> <parameter name="hotupdate">false</parameter> <parameter name="enableMTOM">false</parameter> <!-- commons-http-client defaultMaxConnPerHost --> <parameter name="defaultMaxConnPerHost">500</parameter> <!-- commons-http-client maxTotalConnections --> <parameter name="maxTotalConnections">15000</parameter> <!--If turned on with use the Accept header of the request to determine the contentType of the response--> <parameter name=“httpContentNegotiation">True</parameter>
...