I'm not opposed to using the existing validate mediator.

But won't it avoid building the message one extra time by using a class
mediator?

On Wed, Mar 14, 2018 at 11:05 PM, Megala Uthayakumar <[email protected]>
wrote:

> Hi Sivaramya,
>
> We decided to go for a class mediator without using existing validate
> mediator to avoid building the message. However, on a second thought, if we
> add the class mediator inside the insequence of the resource as below,
>
> *   <resource methods="POST" url-mapping="/order" faultSequence="fault">*
> *      <inSequence>*
> *         <class name ="org.wso2.carbon.apimgt.JsonshemaValidator"/>*
> *         <property name="api.ut.backendRequestTime"*
> *                   expression="get-property('SYSTEM_TIME')"/>*
>
>
> AFAIK in synapse level, it will check whether there are any mediators in
> the in-sequence that is content-aware. If it is content-aware, in synapse
> level relevant message will be build before starting the in-Sequence. In
> that case, since we are using the property mediator in insequence, which is
> content-aware, regardless of whether our class mediator is content-aware or
> not, the relevant message will be built. In that case, main reason for
> creating a custom class mediator is invalidated. So how are we going to
> handle this?
>
> If we are ok to build the message before JsonSchemaValidation, can't we
> use the existing validate mediator itself? WDYT?
>
> Thanks.
>
> Regards,
> Megala
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Shazni Nazeer

Mob : +94 777737331
LinkedIn : http://lk.linkedin.com/in/shazninazeer

Blogs :

https://medium.com/@mshazninazeer
http://shazninazeer.blogspot.com

<http://wso2.com/signature>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to