Hi All,
I need to populate a cache from the response of a ServiceCallout. but I don’t have any particular KeyFragment ref in the response body so I have given response header (content-Type) as populate cache key reference .
<KeyFragment ref="customresponse.header.Content-Type"/>
<PopulateCache name='xxxx'>
<DisplayName>Populate Cache 1</DisplayName>
<Properties/>
<CacheKey>
<Prefix/>
<KeyFragment ref="customresponse.header.Content-Type"/>
</CacheKey>
<CacheResource>crtpack</CacheResource>
<Scope>Application</Scope>
<ExpirySettings>
<TimeoutInSec>3600</TimeoutInSec>
</ExpirySettings>
<Source>crtId_val</Source>
</PopulateCache>
crtId_val is the variable which value needs to be cached.
crtpack is the cache name .
customresponse is the name of the variable that holds the response from the prior ServiceCallout. and I am getting following error message:
{
"fault": {
"faultstring": "java.lang.String cannot be cast to com.apigee.entities.info.EnvironmentInfo",
"detail": {
"errorcode": "Internal Server Error"
}
}
}
Can anyone suggest some way to resolve this issue?
Thanks