Respected Madam,

Tried adding "<property name="NO_ENTITY_BODY" scope="axis2"
action="remove"/>".

But still got the same error. Plus the rest service i am using is not
returning empty response, tested it.

<?xml version="1.0" encoding="UTF-8"?>
<api context="/cache" name="cacheAPI" xmlns="http://ws.apache.org/ns/synapse
">
    <resource methods="POST GET" uri-template="/headerapi/*">
        <inSequence>
            <log>
                <property name="Cache_Flow" value="Inside Cache Flow
............................."/>
            </log>

            <cache collector="false"
hashGenerator="org.wso2.carbon.mediator.cache.digest.REQUESTHASHGenerator"
id="cache-sample" maxMessageSize="100000000" scope="per-host"
timeout="5000">
                <onCacheHit/>
                <implementation maxSize="1000" type="memory"/>
            </cache>

            <log>
                <property name="CacheFinder" value="After Cache Finder
******************"/>
            </log>
            <property name="uri.var.agreementId" scope="default"
type="STRING" value="1392"/>
            <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
            <call description="">
                <endpoint key="AgreementEP1"/>
            </call>
            <log description="">
                <property name="Call_Mediator" value="After Call Mediator
*********************"/>
            </log>
            <property name="RESPONSE" scope="default" type="STRING"
value="true"/>
            <log level="full">
                <property name="msg" value="Direct Response"/>
            </log>

            <cache collector="true" scope="per-host"/>

            <respond/>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </resource>
</api>

With Regards,
Aditya


On Wed, Apr 4, 2018 at 4:16 PM, Thivya Mahenthirarasa <[email protected]>
wrote:

> Hi Adiya,
>
> According to the logs, you are receiving 202 accepted success code, that
> means  the response cached for the Endpoint might returning an empty body.
>
>  Could you please add the following property before cache mediator in
> order to return the body from the cache to the Endpoint.
>
>
>  <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
>
>
> Try out the solution and let us know whether you could able to sort out the 
> exception
>
>
>
> Regards,
>
> Thivya
>
>
> On Wed, Apr 4, 2018 at 3:58 PM, aditya shivankar <
> [email protected]> wrote:
>
>> Respected Sir/Madam,
>>
>> Below is my api :
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <api context="/cache" name="cacheAPI" xmlns="http://ws.apache.org/ns
>> /synapse">
>>     <resource methods="POST GET" uri-template="/headerapi/*">
>>         <inSequence>
>>             <log>
>>                 <property name="Cache_Flow" value="Inside Cache Flow
>> ............................."/>
>>             </log>
>>
>>             <cache collector="false" hashGenerator="org.wso2.carbon
>> .mediator.cache.digest.REQUESTHASHGenerator" id="cache-sample"
>> maxMessageSize="100000000" scope="per-host" timeout="5000">
>>                 <onCacheHit/>
>>                 <implementation maxSize="1000" type="memory"/>
>>             </cache>
>>
>>             <log>
>>                 <property name="CacheFinder" value="After Cache Finder
>> ******************"/>
>>             </log>
>>             <property name="uri.var.agreementId" scope="default"
>> type="STRING" value="1392"/>
>>             <call description="">
>>                 <endpoint key="AgreementEP1"/>
>>             </call>
>>             <log description="">
>>                 <property name="Call_Mediator" value="After Call Mediator
>> *********************"/>
>>             </log>
>>             <property name="RESPONSE" scope="default" type="STRING"
>> value="true"/>
>>             <log level="full">
>>                 <property name="msg" value="Direct Response"/>
>>             </log>
>>
>>             <cache collector="true" scope="per-host"/>
>>
>>             <respond/>
>>         </inSequence>
>>         <outSequence/>
>>         <faultSequence/>
>>     </resource>
>> </api>
>>
>> and my endpoint :
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <endpoint name="AgreementEP1" xmlns="http://ws.apache.org/ns/synapse";>
>>     <http method="get" uri-template="I used my Project rest service url
>> here so did not mention"/>
>> </endpoint>
>>
>>
>> Getting below error :
>>
>> ERROR - CacheMediator Error setting response envelope from cache :
>> mediation.cache_key
>> javax.xml.soap.SOAPException: org.apache.axiom.om.OMException: SOAP
>> message MUST NOT contain Processing Instructions(PI)
>>
>> Please find logs attached.
>>
>> With Regards,
>> Aditya
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Thivya Mahenthirarasa*
>
> *Software Engineer -Support Team | WSO2*
>
>
> *Email: [email protected] <[email protected]>*
>
> *Mobile: +94766461966 <http://wso2.com/signature>*
> *Web: http://wso2.com <http://wso2.com>*
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to