[prev in list] [next in list] [prev in thread] [next in thread]
List: esb-java-dev
Subject: Re: [Dev] Could not send Long value in ESB 5.0.0 with the payload
From: Yashothara Shanmugarajah <yashothara () wso2 ! com>
Date: 2016-09-29 4:29:19
Message-ID: CAMS2NsmwmpUdnabfR2tDn7LOaHSCY=oN7qh86e+k_D834RcVHA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
parseInt() method gives in Scientific notation. It is the behavior of Rhino
javascript Engine. So followed approach has been used.
[1]
<property name="uri.var.query" value=''/>
<script language="js">
<![CDATA[
//request body param variables
var requesterId = mc.getProperty('uri.var.requesterId');
var query='{';
//query = query.concat(email);
if (requesterId != null && requesterId != ""){
query = query.concat('"'+'requester_id":' +
requesterId+',');
}
query=query.substring(0, query.length-1);
mc.setProperty('uri.var.query', query);
]]>
</script>
<payloadFactory media-type="json">
<format>
$1}
</format>
<args>
<arg expression="$ctx:uri.var.query"/>
</args>
</payloadFactory>
Best Regards,
Yashothara.S
Software Engineer
WSO2
http://wso2.com
https://wso2.com/signature
<https://www.google.com/url?q=https%3A%2F%2Fwso2.com%2Fsignature&sa=D&sntz=1&usg=AFQjCNFqSCK3YQC9g0l53f6yjvsVrxRHXg>
On Thu, Sep 29, 2016 at 7:20 AM, Malaka Silva <malaka@wso2.com> wrote:
> What was the solution?
>
> On Wed, Sep 28, 2016 at 9:36 PM, Yashothara Shanmugarajah <
> yashothara@wso2.com> wrote:
>
> > Yes Malaka. I have resolved this issue today.
> >
> > Best Regards,
> > Yashothara.S
> > Software Engineer
> > WSO2
> > http://wso2.com
> > https://wso2.com/signature
> > <https://www.google.com/url?q=https%3A%2F%2Fwso2.com%2Fsignature&sa=D&sntz=1&usg=AFQjCNFqSCK3YQC9g0l53f6yjvsVrxRHXg>
> >
> > On Wed, Sep 28, 2016 at 8:33 PM, Malaka Silva <malaka@wso2.com> wrote:
> >
> > > Hi Yashothara,
> > >
> > > Is the issues resolved?
> > >
> > > On Wed, Sep 21, 2016 at 12:57 PM, Yashothara Shanmugarajah <
> > > yashothara@wso2.com> wrote:
> > >
> > > > Hi Nuwan,
> > > >
> > > > As it is an Optional Parameter, I need to send through the script
> > > > mediator. So I can't use payload mediator.
> > > >
> > > > Please find this proxy[1]. Here I didn't use connector. Even though I
> > > > am getting in scientific notation.
> > > >
> > > > [1]
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <proxy xmlns="http://ws.apache.org/ns/synapse"
> > > > name="checkConnectorScript"
> > > > startOnLoad="true"
> > > > statistics="disable"
> > > > trace="disable"
> > > > transports="https,http">
> > > > <target>
> > > > <inSequence onError="faultHandlerSeq">
> > > > <property expression="json-eval($.requesterId)"
> > > > name="requesterId"/>
> > > > <log level="custom">
> > > > <property expression="get-property('requesterId')"
> > > > name="121212121212121212121212121212"/>
> > > > </log>
> > > > <payloadFactory media-type="json">
> > > > <format>
> > > > {
> > > >
> > > > }
> > > > </format>
> > > > <args/>
> > > > </payloadFactory>
> > > > <script language="js">payload = mc.getPayloadJSON();
> > > > var requesterId = mc.getProperty('requesterId');
> > > >
> > > > var requesterIdInt = parseInt(mc.getProperty('reque
> > > > sterId'));
> > > > payload["requester_id"] = requesterIdInt;
> > > >
> > > > mc.setPayloadJSON(payload);</script>
> > > > <call>
> > > > <endpoint>
> > > > <http method="POST"
> > > > uri-template="https://wso2yash
> > > > o.freshdesk.com/api/v2/tickets"/>
> > > > </endpoint>
> > > > </call>
> > > > <respond/>
> > > > </inSequence>
> > > > <outSequence>
> > > > <log/>
> > > > </outSequence>
> > > > </target>
> > > > <description/>
> > > > </proxy>
> > > >
> > > >
> > > > Best Regards,
> > > > Yashothara.S
> > > > Software Engineer
> > > > WSO2
> > > > http://wso2.com
> > > > https://wso2.com/signature
> > > > <https://www.google.com/url?q=https%3A%2F%2Fwso2.com%2Fsignature&sa=D&sntz=1&usg=AFQjCNFqSCK3YQC9g0l53f6yjvsVrxRHXg>
> > > >
> > > > On Wed, Sep 21, 2016 at 10:48 AM, Nuwan Pallewela <nuwanp@wso2.com>
> > > > wrote:
> > > >
> > > > > Hi Yashothara,
> > > > >
> > > > > I think this happens due to the use of script mediator. You do not
> > > > > need to use script mediator here. Just use the payload factory mediator to
> > > > > build the payload or use data mapper mediator if you need to do more
> > > > > complex mapping.
> > > > >
> > > > > [1] https://docs.wso2.com/display/ESB481/PayloadFactory+Mediator
> > > > > #PayloadFactoryMediator-Example2:JSON
> > > > >
> > > > > Thanks,
> > > > > Nuwan
> > > > >
> > > > > On Wed, Sep 21, 2016 at 10:33 AM, Yashothara Shanmugarajah <
> > > > > yashothara@wso2.com> wrote:
> > > > >
> > > > > > Please find the template[1] and proxy[2].
> > > > > >
> > > > > > [1]
> > > > > > <template name="createTicket" xmlns="http://ws.apache.org/ns/synapse
> > > > > > ">
> > > > > > <!--Required Parameters-->
> > > > > > <parameter name="requesterId" description="User ID of the
> > > > > > requester."/>
> > > > > > <sequence>
> > > > > > <property name="uri.var.requesterId"
> > > > > > expression="$func:requesterId"/>
> > > > > > <log level="custom">
> > > > > > <property name="909090909090909090909090909"
> > > > > > expression="$ctx:uri.var.requesterId"/>
> > > > > > </log>
> > > > > > <payloadFactory media-type="json">
> > > > > > <format>
> > > > > > {
> > > > > >
> > > > > > }
> > > > > > </format>
> > > > > > <args>
> > > > > >
> > > > > > </args>
> > > > > > </payloadFactory>
> > > > > >
> > > > > > <!-- Constructing payload with optional parameters -->
> > > > > > <script language="js">
> > > > > > <![CDATA[
> > > > > > payload = mc.getPayloadJSON();
> > > > > >
> > > > > > var requesterId = mc.getProperty("uri.var.requesterId");
> > > > > >
> > > > > > if (requesterId != null && requesterId != ""){
> > > > > > var requesterIdInt = parseInt(mc.getProperty("uri.v
> > > > > > ar.requesterId"));
> > > > > > payload["requester_id"] = requesterIdInt;
> > > > > > }
> > > > > >
> > > > > > mc.setPayloadJSON(payload);
> > > > > > ]]>
> > > > > > </script>
> > > > > >
> > > > > > <call>
> > > > > > <endpoint>
> > > > > > <http method="post" uri-template="{uri.var.apiUrl}
> > > > > > /api/v2/tickets"/>
> > > > > > </endpoint>
> > > > > > </call>
> > > > > >
> > > > > > <!-- Remove response custom header information -->
> > > > > > <header name="X-Runtime" scope="transport" action="remove"/>
> > > > > > <header name="X-Powered-By" scope="transport"
> > > > > > action="remove"/>
> > > > > >
> > > > > > </sequence>
> > > > > > </template>
> > > > > >
> > > > > >
> > > > > >
> > > > > > [2] <?xml version="1.0" encoding="UTF-8"?>
> > > > > > <proxy xmlns="http://ws.apache.org/ns/synapse"
> > > > > > name="createTicket"
> > > > > > startOnLoad="true"
> > > > > > statistics="disable"
> > > > > > trace="disable"
> > > > > > transports="https,http">
> > > > > > <target>
> > > > > > <inSequence onError="faultHandlerSeq">
> > > > > > <property expression="json-eval($.apiUrl)" name="apiUrl"/>
> > > > > > <property expression="json-eval($.apiKey)" name="apiKey"/>
> > > > > > <property expression="json-eval($.requesterId)"
> > > > > > name="requesterId"/>
> > > > > > <log level="custom">
> > > > > > <property expression="get-property('requesterId')"
> > > > > > name="121212121212121212121212121212"/>
> > > > > > </log>
> > > > > > <freshdesk.init>
> > > > > > <apiKey>{$ctx:apiKey}</apiKey>
> > > > > > <apiUrl>{$ctx:apiUrl}</apiUrl>
> > > > > > </freshdesk.init>
> > > > > > <freshdesk.createTicket>
> > > > > > <requesterId>{$ctx:requesterId}</requesterId>
> > > > > > </freshdesk.createTicket>
> > > > > > <respond/>
> > > > > > </inSequence>
> > > > > > <outSequence>
> > > > > > <log/>
> > > > > > <send/>
> > > > > > </outSequence>
> > > > > > </target>
> > > > > > <description/>
> > > > > > </proxy>
> > > > > >
> > > > > >
> > > > > > Best Regards,
> > > > > > Yashothara.S
> > > > > > Software Engineer
> > > > > > WSO2
> > > > > > http://wso2.com
> > > > > > https://wso2.com/signature
> > > > > > <https://www.google.com/url?q=https%3A%2F%2Fwso2.com%2Fsignature&sa=D&sntz=1&usg=AFQjCNFqSCK3YQC9g0l53f6yjvsVrxRHXg>
> > > > > >
> > > > > > On Wed, Sep 21, 2016 at 10:20 AM, Malaka Silva <malaka@wso2.com>
> > > > > > wrote:
> > > > > >
> > > > > > > Hi Yashothara,
> > > > > > >
> > > > > > > Can you share the config you used.
> > > > > > >
> > > > > > > On Wed, Sep 21, 2016 at 9:33 AM, Yashothara Shanmugarajah <
> > > > > > > yashothara@wso2.com> wrote:
> > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I need to send JSON payload with long (for e.g 19000010655) not as
> > > > > > > > String. In the back end it changes as a scientific notation \
> > > > > > > > (1.9000096356E10) in ESB 5.0.0. Is there any way to resolve this?
> > > > > > > >
> > > > > > > > Thanks.
> > > > > > > >
> > > > > > > > Best Regards,
> > > > > > > > Yashothara.S
> > > > > > > > Software Engineer
> > > > > > > > WSO2
> > > > > > > > http://wso2.com
> > > > > > > > https://wso2.com/signature
> > > > > > > > <https://www.google.com/url?q=https%3A%2F%2Fwso2.com%2Fsignature&sa=D&sntz=1&usg=AFQjCNFqSCK3YQC9g0l53f6yjvsVrxRHXg>
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > > Best Regards,
> > > > > > >
> > > > > > > Malaka Silva
> > > > > > > Senior Technical Lead
> > > > > > > M: +94 777 219 791
> > > > > > > Tel : 94 11 214 5345
> > > > > > > Fax :94 11 2145300
> > > > > > > Skype : malaka.sampath.silva
> > > > > > > LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
> > > > > > > Blog : http://mrmalakasilva.blogspot.com/
> > > > > > >
> > > > > > > WSO2, Inc.
> > > > > > > lean . enterprise . middleware
> > > > > > > https://wso2.com/signature
> > > > > > > http://www.wso2.com/about/team/malaka-silva/
> > > > > > > <http://wso2.com/about/team/malaka-silva/>
> > > > > > > https://store.wso2.com/store/
> > > > > > >
> > > > > > > Don't make Trees rare, we should keep them with care
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > ----------------------------------------------------------
> > > > >
> > > > > *Nuwan Chamara Pallewela*
> > > > >
> > > > >
> > > > > *Software Engineer*
> > > > >
> > > > > *WSO2, Inc. *http://wso2.com
> > > > > *lean . enterprise . middleware*
> > > > >
> > > > > Email *nuwanp@wso2.com <nuwanp@wso2.com>*
> > > > > Mobile *+94719079739 <%2B94719079739>@*
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > >
> > > Best Regards,
> > >
> > > Malaka Silva
> > > Senior Technical Lead
> > > M: +94 777 219 791
> > > Tel : 94 11 214 5345
> > > Fax :94 11 2145300
> > > Skype : malaka.sampath.silva
> > > LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
> > > Blog : http://mrmalakasilva.blogspot.com/
> > >
> > > WSO2, Inc.
> > > lean . enterprise . middleware
> > > https://wso2.com/signature
> > > http://www.wso2.com/about/team/malaka-silva/
> > > <http://wso2.com/about/team/malaka-silva/>
> > > https://store.wso2.com/store/
> > >
> > > Don't make Trees rare, we should keep them with care
> > >
> >
> >
>
>
> --
>
> Best Regards,
>
> Malaka Silva
> Senior Technical Lead
> M: +94 777 219 791
> Tel : 94 11 214 5345
> Fax :94 11 2145300
> Skype : malaka.sampath.silva
> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
> Blog : http://mrmalakasilva.blogspot.com/
>
> WSO2, Inc.
> lean . enterprise . middleware
> https://wso2.com/signature
> http://www.wso2.com/about/team/malaka-silva/
> <http://wso2.com/about/team/malaka-silva/>
> https://store.wso2.com/store/
>
> Don't make Trees rare, we should keep them with care
>
[Attachment #5 (text/html)]
<div dir="ltr"><div style="font-family:georgia,serif" \
class="gmail_default">parseInt() method gives in Scientific notation. It is the \
behavior of Rhino javascript Engine. So followed approach has been used.<br>[1]<br> \
<property name="uri.var.query" value=''/><br> \
<script language="js"><br> <![CDATA[<br> \
//request body param variables<br> <br> \
var requesterId = mc.getProperty('uri.var.requesterId');<br> \
var query='{';<br> //query = \
query.concat(email);<br> <br> \
if (requesterId != null && requesterId != ""){<br> \
query = query.concat('"'+'requester_id":' + \
requesterId+',');<br> }<br> \
<br> query=query.substring(0, query.length-1);<br> \
mc.setProperty('uri.var.query', query);<br><br> \
]]><br> </script><br> <payloadFactory \
media-type="json"><br> <format><br> \
$1}<br> </format><br> \
<args><br> <arg \
expression="$ctx:uri.var.query"/><br> \
</args><br> </payloadFactory><br></div></div><div \
class="gmail_extra"><br clear="all"><div><div class="gmail_signature" \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div>Best \
Regards,<br></div>Yashothara.S<br></div>Software Engineer<br></div>WSO2<br><span><a \
href="http://wso2.com/" target="_blank">http://wso2.com</a></span><br><span dir="ltr" \
style="text-align:left"><a rel="nofollow noreferrer" \
href="https://www.google.com/url?q=https%3A%2F%2Fwso2.com%2Fsignature&sa=D&sntz=1&usg=AFQjCNFqSCK3YQC9g0l53f6yjvsVrxRHXg" \
dir="ltr" target="_blank">https://wso2.com/signature</a></span></div><div><span><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png"></span></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Sep 29, 2016 at 7:20 AM, Malaka Silva <span \
dir="ltr"><<a href="mailto:malaka@wso2.com" \
target="_blank">malaka@wso2.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:small">What was the \
solution?</div></div><div class="HOEnZb"><div class="h5"><div \
class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 9:36 PM, \
Yashothara Shanmugarajah <span dir="ltr"><<a href="mailto:yashothara@wso2.com" \
target="_blank">yashothara@wso2.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" \
style="font-family:georgia,serif">Yes Malaka. I have resolved this issue \
today.<br></div></div><div class="gmail_extra"><span><br clear="all"><div><div \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div>Best \
Regards,<br></div>Yashothara.S<br></div>Software Engineer<br></div>WSO2<br><span><a \
href="http://wso2.com/" target="_blank">http://wso2.com</a></span><br><span dir="ltr" \
style="text-align:left"><a rel="nofollow noreferrer" \
href="https://www.google.com/url?q=https%3A%2F%2Fwso2.com%2Fsignature&sa=D&sntz=1&usg=AFQjCNFqSCK3YQC9g0l53f6yjvsVrxRHXg" \
dir="ltr" target="_blank">https://wso2.com/signature</a></span></div><div><span><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png"></span></div></div></div></div></div></div></div></div></div></div></div>
<br></span><div><div><div class="gmail_quote">On Wed, Sep 28, 2016 at 8:33 PM, \
Malaka Silva <span dir="ltr"><<a href="mailto:malaka@wso2.com" \
target="_blank">malaka@wso2.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:small">Hi Yashothara,</div><div \
class="gmail_default" \
style="font-family:verdana,sans-serif;font-size:small"><br></div><div \
class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Is the \
issues resolved?</div></div><div><div><div class="gmail_extra"><br><div \
class="gmail_quote">On Wed, Sep 21, 2016 at 12:57 PM, Yashothara Shanmugarajah <span \
dir="ltr"><<a href="mailto:yashothara@wso2.com" \
target="_blank">yashothara@wso2.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div style="font-family:georgia,serif" \
class="gmail_default">Hi Nuwan,<br><br></div><div style="font-family:georgia,serif" \
class="gmail_default">As it is an Optional Parameter, I need to send through the \
script mediator. So I can't use payload mediator.<br><br></div><div \
style="font-family:georgia,serif" class="gmail_default">Please find this proxy[1]. \
Here I didn't use connector. Even though I am getting in scientific \
notation.<br><br>[1]<span><br><?xml version="1.0" \
encoding="UTF-8"?><br><proxy xmlns="<a \
href="http://ws.apache.org/ns/synapse" \
target="_blank">http://ws.apache.org/ns<wbr>/synapse</a>"<br></span> \
name="checkConnectorScript"<span><br> \
startOnLoad="true"<br> statistics="disable"<br> \
trace="disable"<br> transports="https,http"><br> \
<target><br> <inSequence \
onError="faultHandlerSeq"><br></span><span> <property \
expression="json-eval($.reques<wbr>terId)" \
name="requesterId"/><br> <log \
level="custom"><br> <property \
expression="get-property('requ<wbr>esterId')"<br> \
name="121212121212121212121212<wbr>121212"/><br> \
</log><br></span><span> <payloadFactory \
media-type="json"><br> <format><br> \
{<br> <br> } <br> \
</format><br> <args/><br></span> \
</payloadFactory><br> <script \
language="js">payload = mc.getPayloadJSON();<br> \
var requesterId = mc.getProperty('requesterId');<wbr> \
<br> var requesterIdInt = \
parseInt(mc.getProperty('reque<wbr>sterId'));<span><br> \
payload["requester_id"] = requesterIdInt;<br> <br> \
mc.setPayloadJSON(payload);</s<wbr>cript><br> <call><br> \
<endpoint><br></span> <http \
method="POST"<br> \
uri-template="<a href="https://wso2yasho.freshdesk.com/api/v2/tickets" \
target="_blank">https://wso2yash<wbr>o.freshdesk.com/api/v2/tickets</a><wbr>"/><br> \
</endpoint><br> </call><br> \
<respond/><br> </inSequence><br> \
<outSequence><br> <log/><br> \
</outSequence><br> </target><br> \
<description/><br></proxy><br> \
<wbr> <br></div></div><div class="gmail_extra"><span><br clear="all"><div><div \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div>Best \
Regards,<br></div>Yashothara.S<br></div>Software Engineer<br></div>WSO2<br><span><a \
href="http://wso2.com/" target="_blank">http://wso2.com</a></span><br><span dir="ltr" \
style="text-align:left"><a rel="nofollow noreferrer" \
href="https://www.google.com/url?q=https%3A%2F%2Fwso2.com%2Fsignature&sa=D&sntz=1&usg=AFQjCNFqSCK3YQC9g0l53f6yjvsVrxRHXg" \
dir="ltr" target="_blank">https://wso2.com/signature</a></span></div><div><span><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png"></span></div></div></div></div></div></div></div></div></div></div></div>
<br></span><div><div><div class="gmail_quote">On Wed, Sep 21, 2016 at 10:48 AM, \
Nuwan Pallewela <span dir="ltr"><<a href="mailto:nuwanp@wso2.com" \
target="_blank">nuwanp@wso2.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Yashothara,<br><br></div>I \
think this happens due to the use of script mediator. You do not need to use script \
mediator here. Just use the payload factory mediator to build the payload or use data \
mapper mediator if you need to do more complex mapping.<br><br>[1] <a \
href="https://docs.wso2.com/display/ESB481/PayloadFactory+Mediator#PayloadFactoryMediator-Example2:JSON" \
target="_blank">https://docs.wso2.com/display/<wbr>ESB481/PayloadFactory+Mediator<wbr> \
#PayloadFactoryMediator-Exampl<wbr>e2:JSON</a><br><br></div>Thanks,<br></div>Nuwan<br></div><div \
class="gmail_extra"><div><div><br><div class="gmail_quote">On Wed, Sep 21, 2016 at \
10:33 AM, Yashothara Shanmugarajah <span dir="ltr"><<a \
href="mailto:yashothara@wso2.com" target="_blank">yashothara@wso2.com</a>></span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" \
style="font-family:georgia,serif">Please find the template[1] and \
proxy[2].<br><br>[1]<br><template name="createTicket" xmlns="<a \
href="http://ws.apache.org/ns/synapse" \
target="_blank">http://ws.apache.org/ns<wbr>/synapse</a>"><br> \
<!--Required Parameters--><br> <parameter name="requesterId" \
description="User ID of the requester."/><br> <sequence><br> \
<property name="uri.var.requesterId" \
expression="$func:requesterId"<wbr>/> <br> <log \
level="custom"><br> <property \
name="909090909090909090909090<wbr>909" \
expression="$ctx:uri.var.reque<wbr>sterId"/><br> </log><br> \
<payloadFactory media-type="json"><br> \
<format><br> {<br><br> \
}<br> </format><br> \
<args><br> <br> \
</args><br> </payloadFactory><br><br> <!-- \
Constructing payload with optional parameters --><br> <script \
language="js"><br> <![CDATA[<br> \
payload = mc.getPayloadJSON();<br> <br> var \
requesterId = mc.getProperty("uri.var.reques<wbr>terId");<br> \
<br> if (requesterId != null && requesterId != \
""){<br> var requesterIdInt = \
parseInt(mc.getProperty("uri.v<wbr>ar.requesterId"));<br> \
payload["requester_id"] = requesterIdInt;<br> }<br> \
<br> mc.setPayloadJSON(payload);<br> ]]><br> \
</script><br><br> <call><br> \
<endpoint><br> <http method="post" \
uri-template="{uri.var.apiUrl}<wbr>/api/v2/tickets"/><br> \
</endpoint><br> </call><br><br> <!-- \
Remove response custom header information --><br> <header \
name="X-Runtime" scope="transport" \
action="remove"/><br> <header \
name="X-Powered-By" scope="transport" \
action="remove"/><br><br> \
</sequence><br></template><br><br><br><br>[2] <?xml \
version="1.0" encoding="UTF-8"?><br><proxy xmlns="<a \
href="http://ws.apache.org/ns/synapse" \
target="_blank">http://ws.apache.org/ns<wbr>/synapse</a>"<br> \
name="createTicket"<br> startOnLoad="true"<br> \
statistics="disable"<br> trace="disable"<br> \
transports="https,http"><br> <target><br> \
<inSequence onError="faultHandlerSeq"><br> \
<property expression="json-eval($.apiUrl<wbr>)" \
name="apiUrl"/><br> <property \
expression="json-eval($.apiKey<wbr>)" name="apiKey"/><br> \
<property expression="json-eval($.reques<wbr>terId)" \
name="requesterId"/> <br> <log \
level="custom"><br> <property \
expression="get-property('requ<wbr>esterId')"<br> \
name="121212121212121212121212<wbr>121212"/><br> \
</log><br> <freshdesk.init><br> \
<apiKey>{$ctx:apiKey}</apiKey><br> \
<apiUrl>{$ctx:apiUrl}</apiUrl><br> \
</freshdesk.init><br> <freshdesk.createTicket><br> \
<requesterId>{$ctx:requesterId<wbr>}</requesterId> <br> \
</freshdesk.createTicket><br> <respond/><br> \
</inSequence><br> <outSequence><br> \
<log/><br> <send/><br> </outSequence><br> \
</target><br> <description/><br></proxy><br> \
<wbr> <br></div></div><div class="gmail_extra"><span><br clear="all"><div><div \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div>Best \
Regards,<br></div>Yashothara.S<br></div>Software Engineer<br></div>WSO2<br><span><a \
href="http://wso2.com/" target="_blank">http://wso2.com</a></span><br><span dir="ltr" \
style="text-align:left"><a rel="nofollow noreferrer" \
href="https://www.google.com/url?q=https%3A%2F%2Fwso2.com%2Fsignature&sa=D&sntz=1&usg=AFQjCNFqSCK3YQC9g0l53f6yjvsVrxRHXg" \
dir="ltr" target="_blank">https://wso2.com/signature</a></span></div><div><span><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png"></span></div></div></div></div></div></div></div></div></div></div></div>
<br></span><div><div><div class="gmail_quote">On Wed, Sep 21, 2016 at 10:20 AM, \
Malaka Silva <span dir="ltr"><<a href="mailto:malaka@wso2.com" \
target="_blank">malaka@wso2.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
</div>
</blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><div \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><font \
color="#666666">Best Regards,</font><div><font color="#666666"><br>Malaka \
Silva<br>Senior Technical Lead<br>M: <a href="tel:%2B94%20777%20219%20791" \
value="+94777219791" target="_blank">+94 777 219 791</a></font></div><div><span \
style="color:rgb(102,102,102)">Tel : </span><a value="+94112145345">94 11 214 \
5345</a><br></div><div><div><font color="#666666">Fax :<a \
href="tel:94%2011%C2%A02145300" value="+94112145300" target="_blank">94 11 \
2145300</a> </font></div><div><font color="#666666">Skype : \
malaka.sampath.silva</font></div><font color="#666666">LinkedIn : <a \
href="http://www.linkedin.com/pub/malaka-silva/6/33/77" \
target="_blank">http://www.linkedin.com/pub/<wbr>malaka-silva/6/33/77</a></font></div><div><span \
style="color:rgb(102,102,102)">Blog :</span> <a \
href="http://mrmalakasilva.blogspot.com/" \
target="_blank">http://mrmalakasilva.blogspo<wbr>t.com/</a><font \
color="#666666"><br></font></div><div><br></div><div><font color="#666666">WSO2, Inc. \
</font></div><div><font color="#666666">lean . enterprise . middleware <br></font><a \
href="https://wso2.com/signature" style="color:rgb(17,85,204);font-size:12.8px" \
target="_blank">https://wso2.com/signature</a><font \
color="#666666"><br></font></div><div><a \
href="http://wso2.com/about/team/malaka-silva/" \
target="_blank">http://www.wso2.com/about/team<wbr>/malaka-silva/</a><br></div><div><a \
href="https://store.wso2.com/store/" \
target="_blank">https://store.wso2.com/store/</a></div><div><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png"><br></div><div><span \
style="font-family:Tahoma,sans-serif;color:rgb(0,176,80);font-size:8pt">Don't \
make Trees rare, we should keep them with \
care</span></div></div></div></div></div></div></div></div></div></div></div> </div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><br></div></div>-- <br><div \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><font style="background-color:rgb(255,255,255)" \
color="#cccccc" size="2">------------------------------<wbr>----------------------------</font></div><div \
dir="ltr"><div><i>Nuwan Chamara Pallewela<br></i></div><p style="margin:0px"><i><span \
style="font-size:10pt;font-family:Arial,sans-serif">Software \
Engineer<br></span></i></p><div><b><font style="background-color:rgb(255,255,255)" \
face="arial black, sans-serif"></font></b><p style="margin:0px"><b \
style="font-family:Arial,sans-serif;font-size:10pt"><i>WSO2, Inc. </i></b><span><font \
color="#888888"><font color="#888888"><a href="http://wso2.com/" \
style="color:rgb(17,85,204)" \
target="_blank">http://wso2.com</a></font></font></span></p><span><i><span \
style="font-size:10pt;font-family:Arial,sans-serif">lean . enterprise . \
middleware</span></i><b><font style="background-color:rgb(255,255,255)" face="arial \
black, sans-serif"><br><br></font></b></span><span><span \
style="background-color:rgb(255,255,255)"><font color="#cccccc">Email <span \
style="color:rgb(0,0,255)"> <u><a href="mailto:nuwanp@wso2.com" \
target="_blank">nuwanp@wso2.com</a></u></span></font></span></span><br></div><div><span \
style="background-color:rgb(255,255,255)"><font color="#cccccc">Mobile</font> <font \
color="#0000ff"><u><a href="tel:%2B94719079739" value="+94719079739" \
target="_blank">+94719079739</a>@</u> <br> <span \
style="font-size:12.8000001907349px"><u><br></u></span></font></span><br></div></div>< \
/div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><font \
color="#666666">Best Regards,</font><div><font color="#666666"><br>Malaka \
Silva<br>Senior Technical Lead<br>M: <a href="tel:%2B94%20777%20219%20791" \
value="+94777219791" target="_blank">+94 777 219 791</a></font></div><div><span \
style="color:rgb(102,102,102)">Tel : </span><a value="+94112145345">94 11 214 \
5345</a><br></div><div><div><font color="#666666">Fax :<a \
href="tel:94%2011%C2%A02145300" value="+94112145300" target="_blank">94 11 \
2145300</a> </font></div><div><font color="#666666">Skype : \
malaka.sampath.silva</font></div><font color="#666666">LinkedIn : <a \
href="http://www.linkedin.com/pub/malaka-silva/6/33/77" \
target="_blank">http://www.linkedin.com/pub/<wbr>malaka-silva/6/33/77</a></font></div><div><span \
style="color:rgb(102,102,102)">Blog :</span> <a \
href="http://mrmalakasilva.blogspot.com/" \
target="_blank">http://mrmalakasilva.blogspo<wbr>t.com/</a><font \
color="#666666"><br></font></div><div><br></div><div><font color="#666666">WSO2, Inc. \
</font></div><div><font color="#666666">lean . enterprise . middleware <br></font><a \
href="https://wso2.com/signature" style="color:rgb(17,85,204);font-size:12.8px" \
target="_blank">https://wso2.com/signature</a><font \
color="#666666"><br></font></div><div><a \
href="http://wso2.com/about/team/malaka-silva/" \
target="_blank">http://www.wso2.com/about/team<wbr>/malaka-silva/</a><br></div><div><a \
href="https://store.wso2.com/store/" \
target="_blank">https://store.wso2.com/store/</a></div><div><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png"><br></div><div><span \
style="font-family:Tahoma,sans-serif;color:rgb(0,176,80);font-size:8pt">Don't \
make Trees rare, we should keep them with \
care</span></div></div></div></div></div></div></div></div></div></div></div> </div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><font \
color="#666666">Best Regards,</font><div><font color="#666666"><br>Malaka \
Silva<br>Senior Technical Lead<br>M: <a href="tel:%2B94%20777%20219%20791" \
value="+94777219791" target="_blank">+94 777 219 791</a></font></div><div><span \
style="color:rgb(102,102,102)">Tel : </span><a value="+94112145345">94 11 214 \
5345</a><br></div><div><div><font color="#666666">Fax :94 11 2145300 \
</font></div><div><font color="#666666">Skype : \
malaka.sampath.silva</font></div><font color="#666666">LinkedIn : <a \
href="http://www.linkedin.com/pub/malaka-silva/6/33/77" \
target="_blank">http://www.linkedin.com/pub/<wbr>malaka-silva/6/33/77</a></font></div><div><span \
style="color:rgb(102,102,102)">Blog :</span> <a \
href="http://mrmalakasilva.blogspot.com/" \
target="_blank">http://mrmalakasilva.<wbr>blogspot.com/</a><font \
color="#666666"><br></font></div><div><br></div><div><font color="#666666">WSO2, Inc. \
</font></div><div><font color="#666666">lean . enterprise . middleware <br></font><a \
href="https://wso2.com/signature" style="color:rgb(17,85,204);font-size:12.8px" \
target="_blank">https://wso2.com/signature</a><font \
color="#666666"><br></font></div><div><a \
href="http://wso2.com/about/team/malaka-silva/" \
target="_blank">http://www.wso2.com/about/<wbr>team/malaka-silva/</a><br></div><div><a \
href="https://store.wso2.com/store/" \
target="_blank">https://store.wso2.com/store/</a></div><div><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png"><br></div><div><span \
style="font-family:Tahoma,sans-serif;color:rgb(0,176,80);font-size:8pt">Don't \
make Trees rare, we should keep them with \
care</span></div></div></div></div></div></div></div></div></div></div></div> </div>
</div></div></blockquote></div><br></div>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic