Hi Isuru,

Property name is "aggregated_response" and the value is following.

* <ns:Information xmlns:ns="abc.com <http://abc.com/>" />*

So message is getting added to above element as a child.

Thanks.

On Mon, Oct 3, 2016 at 10:17 PM, Isuru Haththotuwa <isu...@wso2.com> wrote:

> Hi,
>
> $subject. The relevant in and out sequences are at [1]. Here, I expect the
> aggregated response to be in a root element element named
> 'aggregated_response'. But the actual response has the root element as
> 'Information' [2]. This is APIM 1.10, synapse version is 2.1.5.wso2v2. Any
> idea why this is happening?
>
> [1].
>       <inSequence>
>         <class name="test.mediator.SimpleClassMediator"/>
>          <filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
>             <then>
>                <property name="api.ut.backendRequestTime"
>                          expression="get-property('SYSTEM_TIME')"/>
>                <send>
>                   <endpoint>
>                      <recipientlist>
>                          <endpoints value="{get-property('
> ENDPOINT_LIST')}"/>
>                      </recipientlist>
>                   </endpoint>
>                </send>
>             </then>
>             <else>
>                <send>
>                   <endpoint name="admin--abc_APIsandboxEndpoint_0">
>                      <http uri-template="http://
> demo4404222.mockable.io/test/hello"/>
>                   </endpoint>
>                </send>
>             </else>
>          </filter>
>       </inSequence>
>       <outSequence>
>           <class name="org.wso2.carbon.apimgt.usage.publisher.
> APIMgtResponseHandler"/>
>
>
> * <property name="aggregated_response" scope="default">
> <ns:Information xmlns:ns="abc.com <http://abc.com>" />
> </property>*
>           <aggregate>
>              <completeCondition>
>                 <messageCount max="2" min="2"/>
>              </completeCondition>
>             * <onComplete expression="$body/*[1]"
> enclosingElementProperty="aggregated_response">*
>                 <send/>
>              </onComplete>
>          </aggregate>
>       </outSequence>
>
> [2].
> {
>   "Information": [
>     {
>       "msg": "hello world!"
>     },
>     {
>       "msg": "new Hello World!!"
>     }
>   ]
> }
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
>


-- 
*Isuru Udana*
Technical Lead
WSO2 Inc.; http://wso2.com
email: isu...@wso2.com cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to