Hi,

Please find the synapse xml attached.


On Tue, Feb 25, 2014 at 4:56 AM, Maninda Edirisooriya <[email protected]>wrote:

> Hi Shani,
>
> Can you send the sequence XML so that I can see.
>
>
> * Maninda Edirisooriya*
> Software Engineer
>
> *WSO2, Inc.*lean.enterprise.middleware.
>
> *Blog* : http://maninda.blogspot.com/
> *Phone* : +94 777603226
>
>
> On Tue, Feb 25, 2014 at 5:05 PM, Shani Ranasinghe <[email protected]> wrote:
>
>> Hi,
>>
>> Just to add to it, the type of TIME_1, TIME_2 and RESPONSE_TIME is Long.
>>
>>
>> On Tue, Feb 25, 2014 at 4:25 AM, Shani Ranasinghe <[email protected]> wrote:
>>
>>>
>>> Hi,
>>>
>>> I am trying to add a BAM mediator to ESB and publish data to BAM. I have
>>> a in sequence which has a property defined as "TIME1".I have an out
>>> sequence which has a property defined as "Time 2"
>>> in the out sequence I also have a script mediator, which takes there two
>>> times and finds the difference and adds the result as a new property to the
>>> message context as response time
>>> in the out sequence the BAM mediator is available.
>>>
>>> so when the request is sent, there is a event in the EVENT_KS for the
>>> event stream, but the payload_RESPONSE_TIME is 0. (in the stream i set a
>>> stream property as RESPONSE_TIME and the value as a expression
>>> get-property('RESPONSE_TIME'))
>>>
>>> Any  idea as to what  I could be doing wrong?
>>> if I print the value in the script mediator, it shows the value.I am
>>> using, ESB 4.8.1 and BAM 2.4.0.
>>>
>>> My attempt is to get statistics to be visualized of ESB REST API's.
>>> Started off by trying on response time.
>>> --
>>> Thanks and Regards
>>> *, Shani Ranasinghe*
>>> Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: +94 77 2273555
>>> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab
>>>
>>
>>
>>
>> --
>> Thanks and Regards
>> *,Shani Ranasinghe*
>> Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 77 2273555
>> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab
>>
>
>


-- 
Thanks and Regards
*,Shani Ranasinghe*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 77 2273555
linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab
<definitions xmlns="http://ws.apache.org/ns/synapse";><sequence name="fault"><log level="full"><property name="MESSAGE" value="Executing default &quot;fault&quot; sequence"></property><property name="ERROR_CODE" expression="get-property('ERROR_CODE')"></property><property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"></property></log><drop></drop></sequence><sequence name="main" trace="disable" statistics="enable"><log></log><drop></drop><bam><serverProfile name=""><streamConfig name="" version=""></streamConfig></serverProfile></bam></sequence><api name="StockQuoteAPI" context="/stockquote"><resource methods="GET" uri-template="/view/{symbol}"><inSequence><payloadFactory media-type="xml"><format><m0:getQuote xmlns:m0="http://services.samples";><m0:request><m0:symbol>$1</m0:symbol></m0:request></m0:getQuote></format><args><arg evaluator="xml" expression="get-property('uri.var.symbol')"></arg></args></payloadFactory><header name="Action" value="urn:getQuote"></header><property name="TIME_1" expression="get-property('SYSTEM_TIME')" scope="default" type="LONG"></property><send><endpoint><address uri="http://localhost:9000/services/SimpleStockQuoteService"; format="soap11"></address></endpoint></send></inSequence><outSequence><property name="TIME_2" expression="get-property('SYSTEM_TIME')" scope="default" type="LONG"></property><script language="js"><![CDATA[var time1 = mc.getProperty("TIME_1");              var time2 = mc.getProperty("TIME_2");              var timeTaken = time2 - time1;         print("-------------- time1  " + time1 + " ms  -----------------");    print("-------------- time2  " + time2 + " ms  -----------------");   print("--------------  " + timeTaken + " ms  -----------------");              mc.setProperty("RESPONSE_TIME", timeTaken);]]></script><bam><serverProfile name="StateOFAZ"><streamConfig name="stream2.2" version="2.2.0"></streamConfig></serverProfile></bam><send></send><log><property name="Time Duration in ms: " expression="get-property('RESPONSE_TIME')"></property></log></outSequence></resource><resource methods="POST"><inSequence><property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"></property><property name="OUT_ONLY" value="true"></property><header name="Action" value="urn:placeOrder"></header><send><endpoint><address uri="http://localhost:9000/services/SimpleStockQuoteService"; format="soap11"></address></endpoint></send></inSequence></resource></api></definitions>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to