SmartClient Version: v10.1p_2016-02-11/Enterprise Deployment (built 2016-02-11)
Hello, I've got a binary field on a dataSource defined like this (note the encodeInResponse="false"):
and an operationBinding like this:
and a DMI method like this:
previously it was working, but now in the DMI method the ALLEGATO field is null.
If I change the encodeInResponse to true, it works.
But I really need it to false :-)
Hello, I've got a binary field on a dataSource defined like this (note the encodeInResponse="false"):
Code:
<field sqlType="blob" name="ALLEGATO" type="binary" encodeInResponse="false"></field>
Code:
<operationBinding operationType="fetch" operationId="allegatiJpcb2b" serverMethod="allegatiJpcb2b" outputs="ALLEGATO_ID,ALLEGATO,ALLEGATO_FILENAME,ALLEGATO_FILESIZE"> <serverObject lookupStyle="new" className="com.juve.jpcep.cms.LinksDMI"/> </operationBinding>
Code:
public DSResponse allegatiJpcb2b(DSRequest dsRequest) throws Exception { dsRequest.setCriteria("ID_REC", dsRequest.getCriteriaValue("ALLEGATO_ID")); DSResponse dsResponse = dsRequest.execute(); Map dataMap = dsResponse.getDataMap(); Object allegato = dataMap.get("ALLEGATO"); String base64Encode = DataTools.base64Encode((InputStream) allegato); dataMap.put("ALLEGATO", base64Encode); return dsResponse; }
If I change the encodeInResponse to true, it works.
But I really need it to false :-)
Comment