Hi Aditya,

Could you please elaborate more about the response sent by the backend?
What kind of message type does it send?

Thanks,
Thishani

On Wed, Apr 4, 2018 at 4:26 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

> 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 <thi...@wso2.com>
> 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 <
>> shivankar.adit...@gmail.com> 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
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Thivya Mahenthirarasa*
>>
>> *Software Engineer -Support Team | WSO2*
>>
>>
>> *Email: thi...@wso2.com <thi...@wso2.com>*
>>
>> *Mobile: +94766461966 <http://wso2.com/signature>*
>> *Web: http://wso2.com <http://wso2.com>*
>>
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Regards,

*Thishani Lucas*
*Software Engineer*
*WSO2 Lanka (Private) Limited**: http://wso2.com <http://wso2.com/>*
*lean.enterprise.middle-ware*

*Tel: +94 77 2556931 *

*LinkedIn: https://www.linkedin.com/in/thishani-lucas/
<https://www.linkedin.com/in/thishani-lucas/>*

<http://wso2.com/signature>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to