[Dev] How can we manually create a "Token" object and pass it to "sendOAuthRequest" method of Jaggery's "OAuth" module?

2016-05-14 Thread Rajkumar Rajaratnam
Hi,

I am exchanging a SAML token with OAuth token using "getTokenResponse"
method [1] of Jaggery's "OAuth" module. This method will return
"AccessTokenResponse"
object. But "sendOAuthRequest" method expects a "Token" object. Hence, I am
manually creating "Token" object and passing it to "sendOAuthRequest"
method, as shown below. I am referring [2] to create a "Token" object
manually.






*var accessTokenResponse =
oauthProvider.getTokenResponse(samlResp);accessToken =
accessTokenResponse.getAccessToken();var oauth2Token = {};
oauth2Token.token = accessToken;oauth2Token.secret =
"PkxikDuusEi67VpuqK7gpsLJlYIa";var response =
**oauthProvider.sendOAuthRequest(oauth2Token,
"GET", "https://xx.xx.xx.xx:8251/bpmn/1.0.0/repository/deployments
");*

But I am getting the following exception when executing this block. I think
this exception is thrown from here [3].

JavaException: org.jaggeryjs.scriptengine.exceptions.ScriptException:
Invalid Access Token

I think something is wrong with constructing the "Token" object. Any
pointers?

[1]
https://github.com/wso2/jaggery-extensions/blob/master/oauth/resources/org.jaggeryjs.modules.oauth/src/main/java/org/jaggeryjs/modules/oauth/OAuthHostObject.java#L211-L238
[2]
http://grepcode.com/file/repo1.maven.org/maven2/org.scribe/scribe/1.2.3/org/scribe/model/Token.java#Token.0token
[3]
https://github.com/wso2/jaggery-extensions/blob/master/oauth/resources/org.jaggeryjs.modules.oauth/src/main/java/org/jaggeryjs/modules/oauth/OAuthHostObject.java#L149

Thanks,
Raj.

-- 
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2

Mobile : +94777568639
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How do we call "sendOAuthRequest" method of Jaggery's "OAuth" module with payload

2016-05-14 Thread Rajkumar Rajaratnam
Hi,

I am talking about [1].

Couldn't find any documentation or samples on this. How do we call
"sendOAuthRequest" method of Jaggery's "OAuth" module with POST payload?

[1]
https://github.com/wso2/jaggery-extensions/blob/master/oauth/resources/org.jaggeryjs.modules.oauth/src/main/java/org/jaggeryjs/modules/oauth/OAuthHostObject.java#L141-L192

Thanks,
Raj.

-- 
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2

Mobile : +94777568639
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] GSOC 2016: Proposal 7

2016-05-14 Thread Dinanjana Gunaratne
Dear all,
I have added DynamicReports (which is an implementation based on Jasper
reports) as the reporting framework for the Flight recorder. It would be
great if I can have wso2 license headers for refactor. Direct me for
IntelliJ headers. All changes can be seen here [1]


[1 ]https://github.com/dinanjana/ESBMonitor

On Fri, May 6, 2016 at 10:43 PM, Dinanjana Gunaratne <
dinanjanagunara...@gmail.com> wrote:

> [1]https://github.com/dinanjana/ESBMonitor
>
> On Fri, May 6, 2016 at 10:42 PM, Dinanjana Gunaratne <
> dinanjanagunara...@gmail.com> wrote:
>
>> Hello all,
>> I have started working on the project. You can have a look on what I am
>> doing from this repo [1]. Currently I am implementing heap dump creator for
>> this project. Can you explain me how currently heap dump analyzing take
>> place with ESB OOM events ? In the current implementation of the flight
>> recorder this method creates a .bin file with a snapshot of heap memory.
>>
>> On Sun, May 1, 2016 at 10:01 PM, Dinanjana Gunaratne <
>> dinanjanagunara...@gmail.com> wrote:
>>
>>> Hello all,
>>> I have started working on the project. You can have a look on what i
>>> will be doing on this [1] 
>>> repo. Meanwhile let me know if there is any coding convention I must adhere
>>> to. And I chose Jasper reports as the reporting frame work. Hope it is okay.
>>> [1] https://github.com/dinanjana/ESBMonitor
>>>
>>> On Wed, Apr 27, 2016 at 8:07 AM, Dinanjana Gunaratne <
>>> dinanjanagunara...@gmail.com> wrote:
>>>
 Hi all,
 Thanks for accepting my project proposal. :) Thank you very much on
 helping me to prepare a good proposal. I am looking forward to get started
 with the project ASAP

 On Sat, Mar 26, 2016 at 12:16 PM, Isuru Udana  wrote:

> Hi Dinanjana,
>
>
>
> On Sat, Mar 26, 2016 at 8:31 AM, Dinanjana Gunaratne <
> dinanjanagunara...@gmail.com> wrote:
>
>> Hi Kasun,
>> So shall I update the draft ? What do you think. I think the best
>> approach is to make this a separate application. Otherwise it will 
>> anyways
>> have an effect on the performance of ESB. Because this tool includes some
>> serious IO operations
>>
> Even though we built it as a separate application while we are taking
> thread-dumps, etc, can lead to a degrade in performance to a great extent,
> that's why we need to design it carefully.
>
> Thanks.
>
>>
>> On Sat, Mar 26, 2016 at 8:25 AM, Kasun Indrasiri 
>> wrote:
>>
>>> It's fine. But just want to make sure this is added to the project
>>> plan as we move forward.
>>>
>>> On Sat, Mar 26, 2016 at 8:01 AM, Dinanjana Gunaratne <
>>> dinanjanagunara...@gmail.com> wrote:
>>>
 Hi Kasun ,
 It's now I saw this mail. Can I do the change now ? I guess it's
 too late now. Anyway on your second point I have said that making 
 flight
 recorder a separate application will stop applying any performance
 degradation on ESB. Anyway it would have been better if I have added 
 the
 comparison.Can I do those changes now ?And i am really sorry for the 
 late
 reply.

 On Fri, Mar 25, 2016 at 11:54 PM, Kasun Indrasiri 
 wrote:

> Dinanjana, can you please include several use cases related to
> possible production issues in an ESB (such as out of memory, CPU 
> spinning,
> deadlock etc.). Also, running the ESB flight recorder should have 
> minimal
> impact on the ESB performance. Hence your proposal should include an 
> ESB
> performance comparison with and without flight recorder.
>
> The proposal looks good.
>
> Thanks,
> Kasun
>
> On Fri, Mar 25, 2016 at 6:37 PM, Dinanjana Gunaratne <
> dinanjanagunara...@gmail.com> wrote:
>
>> Hi Isuru ,
>> Thanks for the input :)
>>
>> On Fri, Mar 25, 2016 at 6:37 PM, Dinanjana Gunaratne <
>> dinanjanagunara...@gmail.com> wrote:
>>
>>> Hi Isuru ,
>>> Thanks for the input :)
>>>
>>> On Fri, Mar 25, 2016 at 6:34 PM, Isuru Udana 
>>> wrote:
>>>
 Hi Dinanjana,

 Proposal looks really good to me. Added several comments as
 well.

 On Fri, Mar 25, 2016 at 8:21 AM, Dinanjana Gunaratne <
 dinanjanagunara...@gmail.com> wrote:

> Hello all,
> I submitted my proposal to gsoc site and shared the draft with
> WSO2 earlier this week. Any thoughts on my proposal ?
>
> On Sun, Mar 20, 2016 at 7:04 PM, Dinanjana Gunaratne <
> dinanjanagunara...@gmail.com> wrote:
>
>> Hi

Re: [Dev] GSoC2016-Contact Development Team Feature

2016-05-14 Thread Nathiesha Maddage
Hi all,

I formatted and cleaned the code and added the licence header.
Regarding the naming of the project, I named the project
as org.wso2.developerstudio.eclipse.errorreporter for now. And about the
packages, I referred to the developer studio plugins projects you have sent
me. However as I am still not familiar with the naming conventions for
developer studio plugins I temporarily created a couple of packages to
group the Java classes. I hope I can do the proper renaming and packaging
later with your support.

I created the ErrorInfoCollector class and there all the system information
and error related information is fetched. However I couldn't find a method
to get the plugin version and I am still working on it. And the error
report that I have sent you previously had an attribute called fingerprint
and it also contained a set of bundle information. Those two parts I could
not understand. So I left them for now.
As you suggested, this class can be improved later to
collect further information regarding the error.

I started with preferences page as well. I created a draft preference page
and currently working on improving it.

This is the new GitHub link of the project repository. Please refer to this
afterwards.

Link-
https://github.com/nathiesha/org.wso2.developerstudio.eclipse.errorreporter.git

Thanks and Regards

Nathiesha



On Fri, May 13, 2016 at 12:26 PM, Kavith Lokuhewage  wrote:

> Hi Nathiesha,
>
> Please find my inline comments.
>
> On Wed, May 11, 2016 at 12:10 PM, Nathiesha Maddage <
> nathieshamadd...@gmail.com> wrote:
>
>> Hi all,
>>
>> Regarding the preference settings, as I have read, the plugins that are
>> started early are listed in preferences-general-startup and shutdown page.
>> So the user can deselect the plugin from that list and then it will not be
>> started once Eclipse starts. Is this what is expected?
>>
>
> No. This is not the expectation.
>
> Or I can add an option for the user to configure the start up settings of
>> the error reporting plugin, in a separate preference page, that I am going
>> to develop for the Error Reporting plugin settings.
>>
>
> Yes. This is the expectation.
>
>
>> And regarding the multi status of IStatus, I will look into that and I
>> will try to fetch all the previously failed operation information. Here I
>> have attached a error report that Eclipse error reporting tool produces.
>> Please have a look at the information listed in that report regarding the
>> error. As you have mentioned earlier, I will add the previously failed
>> operation details if available. Other than previously failed operations and
>> the information listed in the attached report , what else need to be added
>> to the error report? Or is that information sufficient for the development
>> team?
>>
>
> For now, we will keep our focus on this information and give priority to
> them. However, there's always chance for improvements. Later, if time
> permits, we may focus on the aspects such as attaching the artifacts which
> could have caused the issue (with the permission of user), information
> about project hierarchy, active editor, perspective etc. (we should analyse
> the needs for these further), etc.
>
>
>>
>> And thank you for the tips about getting the run time details. That saved
>> my time. I will try those. And as you have suggested, it is good to use the
>> proper coding standards from the beginning. I will get an idea from the
>> example project you have sent me, and I will refactor the code accordingly.
>>
>>
>
>> Thanks and regards
>>
>> Nathiesha
>>
>>
>>
>> On Wed, May 11, 2016 at 10:08 AM, Kavith Lokuhewage 
>> wrote:
>>
>>> Hi Nathiesha,
>>>
>>> Great start! Just some heads up for your next steps.
>>>
>>> An IStatus instance sometimes could be a multi status instance where you
>>> can get other IStatus instances associated with it using the getChildren()
>>> method[1]. This simply means that a series of operations failed and
>>> information about previously failed operations are also valuable when
>>> making the report.
>>>
>>> There are multiple ways to read java run-time version, the easiest would
>>> be to read the system property called "java.runtime.version".
>>>
>>> Furthermore, org.eclipse.core.runtime.Platform class [2] provides
>>> multiple methods to fetch run-time environment information such as OS name,
>>> architecture and windowing library etc. It will also be helpful for you
>>> fetch additional information about the run-time environment.
>>>
>>> On a side note, I would suggest that it will be good if you starts
>>> coding with the proper coding standards we use, from the beginning. This
>>> will reduce the time it takes to refactor the code later, in a great
>>> amount. As a start you can refactor the current package hierarchy to a
>>> proper package hierarchy we use for developer studio plugins [get an idea
>>> from - 3].
>>>
>>> I am attaching the license header and eclipse code cleanup and
>>> formatting templates for java.
>>> Go

[Dev] APIM 2.0.0-SNAPSHOT Nightly build - 13/05/2016

2016-05-14 Thread Bhathiya Jayasekara
Hi all,

Please find APIM 2.0.0 SNAPSHOT nightly build here[1].

[1]
https://svn.wso2.org/repos/wso2/scratch/2016/apim-2.0.0/wso2am-2.0.0-SNAPSHOT-13-05-2016.zip

Thanks,

-- 
*Bhathiya Jayasekara*
*Senior Software Engineer,*
*WSO2 inc., http://wso2.com *

*Phone: +94715478185*
*LinkedIn: http://www.linkedin.com/in/bhathiyaj
*
*Twitter: https://twitter.com/bhathiyax *
*Blog: http://movingaheadblog.blogspot.com
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev