Re: [Dev] [GSOC 16] Initial Project Progress

2016-06-15 Thread Osura Rathnayake
Hi Isuru,

That's great, will do the demo at 3 o'clock in the evening today.
thanks

On Thu, Jun 16, 2016 at 11:21 AM, Isuru Haththotuwa  wrote:

>
>
> On Thu, Jun 16, 2016 at 11:10 AM, Osura Rathnayake 
> wrote:
>
>> Hi Mentors,
>>
>> Thank you for the update.
>> Yes I can demonstrate it anytime today.
>>
> Great! Shall we have a hangout at 3.00 PM? The main purpose would be to
> demonstrate the membership scheme functionality with a carbon cluster
> deployed in Azure.
>
>>
>>
>> thanks
>>
>> On Thu, Jun 16, 2016 at 10:11 AM, Isuru Haththotuwa 
>> wrote:
>>
>>> Hi Osura,
>>>
>>> Would you be able to demonstrate the functionality of the membership
>>> scheme today?
>>>
>>> Also, please keep an eye on the timeline for the project [1], as the
>>> midterm evaluations will be starting on 20th.
>>>
>>> [1]. https://developers.google.com/open-source/gsoc/timeline
>>>
>>> On Thu, Jun 16, 2016 at 6:46 AM, Imesh Gunaratne  wrote:
>>>


 On Wed, Jun 15, 2016 at 2:46 PM, Osura Rathnayake 
 wrote:

> Hi Mentors,
>
> As we discussed at the very beginning, next in line is to see how
> each of the following can be setup on Azure using native features:
>
>- Auto healing
>- Autoscaling
>- Dynamic load balancing
>- Centralized logging
>- Monitoring
>- Metering
>
> For auto healing, we can implement it in both VM level and application
> level. In VM level, we can poll for VM statuses and check if a given VM is
> down or not. And then we can up them if they have gone down, using api
> calls. for application level of course we will have to run a shell script
> to determine the status of a given application and will have to up it
> accordingly. I'm looking forward to hear from you regarding this.
>

 ​No, auto healing and autoscaling should be handled by Azure. We might
 not need to write code to handle that.

 Thanks​


>
> thanks,
>
> On Mon, Jun 13, 2016 at 10:53 AM, Osura Rathnayake  > wrote:
>
>> Hi Isuru,
>>
>> Can you please tell me when you would be free to have a hangout to do
>> a code review and discuss next project goals?
>>
>> Thanks,
>>
>> On Saturday, June 11, 2016, Osura Rathnayake 
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> Thank you very much.
>>> Yes there was a misconfiguration in registry mounts and now it works
>>> properly.
>>> Okay will have a code review next week.
>>>
>>>
>>> On Fri, Jun 10, 2016 at 9:45 AM, Isuru Haththotuwa 
>>> wrote:
>>>
 Hi Osura,

 This is great progress! This shows that a clustered deployment of
 WSO2 products on Azure is possible with this membership scheme.

 About the error, what is says is that a particular resource that
 the first node is expecting to find in the config registry is not 
 found.
 This can be due to a mis-configured registry mounts. Did you mount the
 config and governance registries? If not please do so by referring [1].

 Lets schedule a code review early next week for the membership
 scheme.

 [1].
 https://docs.wso2.com/display/CLUSTER44x/Setting+up+the+Database

 On Fri, Jun 10, 2016 at 12:42 AM, Osura Rathnayake <
 osura...@gmail.com> wrote:

> Hi Mentors,
>
> I have two application servers (AS) running on azure and I'm
> testing the azure membership scheme on them. When I run the first AS I
> could see member added and member joined log messages. And when I run 
> the
> second AS, I could see member added log messages and then I get an 
> error
> saying carbon initialization failed (screenshot attached as error6). 
> Also
> when I stopped the second AS I could see member left log message on 
> the
> first AS( screenshot attached as Capture1).
>
> Afterwards I stopped both of them and started the second AS first
> and it ran without errors but the other AS( previous case I started 
> this AS
> first) showed up the same error which I got earlier. I'm getting this 
> error
> always from the secondly started AS. Please share with me if you have 
> any
> idea why I'm getting this.
>
> Thanks,
>
> On Mon, Jun 6, 2016 at 4:16 PM, Osura Rathnayake <
> osura...@gmail.com> wrote:
>
>> Hi all,
>>
>> This is the summary of the matters that we discussed during
>> hangout we had on 6th of June, 2016.
>>
>> We had a productive discussion on how to pass 

Re: [Dev] [GSOC 16] Initial Project Progress

2016-06-15 Thread Isuru Haththotuwa
On Thu, Jun 16, 2016 at 11:10 AM, Osura Rathnayake 
wrote:

> Hi Mentors,
>
> Thank you for the update.
> Yes I can demonstrate it anytime today.
>
Great! Shall we have a hangout at 3.00 PM? The main purpose would be to
demonstrate the membership scheme functionality with a carbon cluster
deployed in Azure.

>
>
> thanks
>
> On Thu, Jun 16, 2016 at 10:11 AM, Isuru Haththotuwa 
> wrote:
>
>> Hi Osura,
>>
>> Would you be able to demonstrate the functionality of the membership
>> scheme today?
>>
>> Also, please keep an eye on the timeline for the project [1], as the
>> midterm evaluations will be starting on 20th.
>>
>> [1]. https://developers.google.com/open-source/gsoc/timeline
>>
>> On Thu, Jun 16, 2016 at 6:46 AM, Imesh Gunaratne  wrote:
>>
>>>
>>>
>>> On Wed, Jun 15, 2016 at 2:46 PM, Osura Rathnayake 
>>> wrote:
>>>
 Hi Mentors,

 As we discussed at the very beginning, next in line is to see how each
 of the following can be setup on Azure using native features:

- Auto healing
- Autoscaling
- Dynamic load balancing
- Centralized logging
- Monitoring
- Metering

 For auto healing, we can implement it in both VM level and application
 level. In VM level, we can poll for VM statuses and check if a given VM is
 down or not. And then we can up them if they have gone down, using api
 calls. for application level of course we will have to run a shell script
 to determine the status of a given application and will have to up it
 accordingly. I'm looking forward to hear from you regarding this.

>>>
>>> ​No, auto healing and autoscaling should be handled by Azure. We might
>>> not need to write code to handle that.
>>>
>>> Thanks​
>>>
>>>

 thanks,

 On Mon, Jun 13, 2016 at 10:53 AM, Osura Rathnayake 
 wrote:

> Hi Isuru,
>
> Can you please tell me when you would be free to have a hangout to do
> a code review and discuss next project goals?
>
> Thanks,
>
> On Saturday, June 11, 2016, Osura Rathnayake 
> wrote:
>
>> Hi Isuru,
>>
>> Thank you very much.
>> Yes there was a misconfiguration in registry mounts and now it works
>> properly.
>> Okay will have a code review next week.
>>
>>
>> On Fri, Jun 10, 2016 at 9:45 AM, Isuru Haththotuwa 
>> wrote:
>>
>>> Hi Osura,
>>>
>>> This is great progress! This shows that a clustered deployment of
>>> WSO2 products on Azure is possible with this membership scheme.
>>>
>>> About the error, what is says is that a particular resource that the
>>> first node is expecting to find in the config registry is not found. 
>>> This
>>> can be due to a mis-configured registry mounts. Did you mount the config
>>> and governance registries? If not please do so by referring [1].
>>>
>>> Lets schedule a code review early next week for the membership
>>> scheme.
>>>
>>> [1].
>>> https://docs.wso2.com/display/CLUSTER44x/Setting+up+the+Database
>>>
>>> On Fri, Jun 10, 2016 at 12:42 AM, Osura Rathnayake <
>>> osura...@gmail.com> wrote:
>>>
 Hi Mentors,

 I have two application servers (AS) running on azure and I'm
 testing the azure membership scheme on them. When I run the first AS I
 could see member added and member joined log messages. And when I run 
 the
 second AS, I could see member added log messages and then I get an 
 error
 saying carbon initialization failed (screenshot attached as error6). 
 Also
 when I stopped the second AS I could see member left log message on the
 first AS( screenshot attached as Capture1).

 Afterwards I stopped both of them and started the second AS first
 and it ran without errors but the other AS( previous case I started 
 this AS
 first) showed up the same error which I got earlier. I'm getting this 
 error
 always from the secondly started AS. Please share with me if you have 
 any
 idea why I'm getting this.

 Thanks,

 On Mon, Jun 6, 2016 at 4:16 PM, Osura Rathnayake <
 osura...@gmail.com> wrote:

> Hi all,
>
> This is the summary of the matters that we discussed during
> hangout we had on 6th of June, 2016.
>
> We had a productive discussion on how to pass the azure specific
> parameters to the Azure membership scheme and how we should test the 
> Azure
> membership scheme
>
> Current progress : Getting a list of IP addresses of members in
> the cluster and updating the hazelcast configuration are done but 
> certain

Re: [Dev] [GSOC 16] Initial Project Progress

2016-06-15 Thread Osura Rathnayake
Hi Mentors,

Thank you for the update.
Yes I can demonstrate it anytime today.


thanks

On Thu, Jun 16, 2016 at 10:11 AM, Isuru Haththotuwa  wrote:

> Hi Osura,
>
> Would you be able to demonstrate the functionality of the membership
> scheme today?
>
> Also, please keep an eye on the timeline for the project [1], as the
> midterm evaluations will be starting on 20th.
>
> [1]. https://developers.google.com/open-source/gsoc/timeline
>
> On Thu, Jun 16, 2016 at 6:46 AM, Imesh Gunaratne  wrote:
>
>>
>>
>> On Wed, Jun 15, 2016 at 2:46 PM, Osura Rathnayake 
>> wrote:
>>
>>> Hi Mentors,
>>>
>>> As we discussed at the very beginning, next in line is to see how each
>>> of the following can be setup on Azure using native features:
>>>
>>>- Auto healing
>>>- Autoscaling
>>>- Dynamic load balancing
>>>- Centralized logging
>>>- Monitoring
>>>- Metering
>>>
>>> For auto healing, we can implement it in both VM level and application
>>> level. In VM level, we can poll for VM statuses and check if a given VM is
>>> down or not. And then we can up them if they have gone down, using api
>>> calls. for application level of course we will have to run a shell script
>>> to determine the status of a given application and will have to up it
>>> accordingly. I'm looking forward to hear from you regarding this.
>>>
>>
>> ​No, auto healing and autoscaling should be handled by Azure. We might
>> not need to write code to handle that.
>>
>> Thanks​
>>
>>
>>>
>>> thanks,
>>>
>>> On Mon, Jun 13, 2016 at 10:53 AM, Osura Rathnayake 
>>> wrote:
>>>
 Hi Isuru,

 Can you please tell me when you would be free to have a hangout to do a
 code review and discuss next project goals?

 Thanks,

 On Saturday, June 11, 2016, Osura Rathnayake 
 wrote:

> Hi Isuru,
>
> Thank you very much.
> Yes there was a misconfiguration in registry mounts and now it works
> properly.
> Okay will have a code review next week.
>
>
> On Fri, Jun 10, 2016 at 9:45 AM, Isuru Haththotuwa 
> wrote:
>
>> Hi Osura,
>>
>> This is great progress! This shows that a clustered deployment of
>> WSO2 products on Azure is possible with this membership scheme.
>>
>> About the error, what is says is that a particular resource that the
>> first node is expecting to find in the config registry is not found. This
>> can be due to a mis-configured registry mounts. Did you mount the config
>> and governance registries? If not please do so by referring [1].
>>
>> Lets schedule a code review early next week for the membership scheme.
>>
>> [1]. https://docs.wso2.com/display/CLUSTER44x/Setting+up+the+Database
>>
>> On Fri, Jun 10, 2016 at 12:42 AM, Osura Rathnayake <
>> osura...@gmail.com> wrote:
>>
>>> Hi Mentors,
>>>
>>> I have two application servers (AS) running on azure and I'm testing
>>> the azure membership scheme on them. When I run the first AS I could see
>>> member added and member joined log messages. And when I run the second 
>>> AS,
>>> I could see member added log messages and then I get an error saying 
>>> carbon
>>> initialization failed (screenshot attached as error6). Also when I 
>>> stopped
>>> the second AS I could see member left log message on the first AS(
>>> screenshot attached as Capture1).
>>>
>>> Afterwards I stopped both of them and started the second AS first
>>> and it ran without errors but the other AS( previous case I started 
>>> this AS
>>> first) showed up the same error which I got earlier. I'm getting this 
>>> error
>>> always from the secondly started AS. Please share with me if you have 
>>> any
>>> idea why I'm getting this.
>>>
>>> Thanks,
>>>
>>> On Mon, Jun 6, 2016 at 4:16 PM, Osura Rathnayake >> > wrote:
>>>
 Hi all,

 This is the summary of the matters that we discussed during hangout
 we had on 6th of June, 2016.

 We had a productive discussion on how to pass the azure specific
 parameters to the Azure membership scheme and how we should test the 
 Azure
 membership scheme

 Current progress : Getting a list of IP addresses of members in the
 cluster and updating the hazelcast configuration are done but certain 
 azure
 specific parameters are hard coded in the program.

 As in kubernetes membership scheme, we agreed upon sending those
 parameters as either environment variables or system properties. So the
 next immediate goal is to get those parameters that way. As of how to 
 test
 the azure membership scheme, [1] was shared get a more clear idea on 
 the

Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.6 RC3

2016-06-15 Thread Rajith Roshan
Hi all,

AS there were no further issues encountered, +1 for the release.

[x] Stable - go ahead and release.

Thanks!

On Thu, Jun 16, 2016 at 10:56 AM, Kalpa Welivitigoda 
wrote:

> Hi Kasun,
>
> The issue with the orbits, as discussed in the references provided, is to
> be fixed at the product level and not in kernel. So IMO, the issue
> mentioned neither affects the kernel nor a valid reason to hold off the
> kernel vote.
>
>
> On Thu, Jun 16, 2016 at 10:37 AM, Bhathiya Jayasekara 
> wrote:
>
>> Hi all,
>>
>> I could successfully run APIM test suit with upgraded Kernel.  Hence +1
>> for the release.
>>
>> [x] Stable - go ahead and release
>>
>> Thanks,
>> Bhathiya
>>
>>
>> On Wed, Jun 15, 2016 at 7:29 PM, Rajith Roshan  wrote:
>>
>>> Hi all,
>>>
>>> We are facing an issue when trying to access login page of publisher and
>>> store apps with sso enabled. We will verify this and update the thread. We
>>> need to check whether this is due to issue in opensaml.
>>>
>>> Thanks!
>>> Rajith
>>>
>>> On Mon, Jun 13, 2016 at 4:51 PM, Kalpa Welivitigoda 
>>> wrote:
>>>
 Hi Devs,

 This is the 3rd release candidate of WSO2 Carbon Kernel 4.4.6.

 This release fixes the following issues:
 https://wso2.org/jira/issues/?filter=13090

 Please download and test your products with kernel 4.4.6 RC3 and vote.
 Vote will be open for 72 hours or as longer as needed.

 ​Source and binary distribution files:​

 http://svn.wso2.org/repos/wso2/people/kalpaw/wso2carbon-4.4.6/wso2carbon-4.4.6-rc3.zip

 ​Maven staging repository:​
 http://maven.wso2.org/nexus/content/repositories/orgwso2carbon-1024/

 ​The tag to be voted upon:​
 https://github.com/wso2/carbon-kernel/tree/v4.4.6-rc3


 [ ] Broken - do not release (explain why)
 [ ] Stable - go ahead and release

 Thank you
 Carbon Team​

 --
 Best Regards,

 Kalpa Welivitigoda
 Senior Software Engineer, WSO2 Inc. http://wso2.com
 Email: kal...@wso2.com
 Mobile: +94776509215

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


>>>
>>>
>>> --
>>> Rajith Roshan
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Bhathiya Jayasekara*
>> *Senior Software Engineer,*
>> *WSO2 inc., http://wso2.com *
>>
>> *Phone: +94715478185 <%2B94715478185>*
>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>> *
>> *Twitter: https://twitter.com/bhathiyax *
>> *Blog: http://movingaheadblog.blogspot.com
>> *
>>
>
>
>
> --
> Best Regards,
>
> Kalpa Welivitigoda
> Senior Software Engineer, WSO2 Inc. http://wso2.com
> Email: kal...@wso2.com
> Mobile: +94776509215
>



-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][APPM][EMM] - Update app-manager.xml with new configuration changes

2016-06-15 Thread Thilini Shanika
Hi Ruwan,

Please find my inline comments.

1. Is there a way to generalize the "BinaryFileStorage" out of
"MobileAppsConfiguration" tag, because this might be needed in some other
app types(say we support desktop apps) in future.
   Yes it's possible to move this configuration out of MobileAppsConfiguration.
+1 for that.

2. FilePreciseLocation seems odd. Can we change it to "AbsoluteLocation",
no "File" prefix needed IMO.
This configuration was an already existing config in (mam-config.json)
and we just moved this to app-manager.xml in order to maintain configs in a
single file. I also think that renaming the config like AbsoluteLocation
makes sense.

3. "FileAPILocation", do we need this. Are we allowing this to be
configured, will this be a deployment configuration. I think not. Can we
just document this API so that other products like EMM knows which to call.
FileAPILocation configuration is introduced for one-time download link
generation purposes. We decided to make this configurable, since there is a
possibility of changing the API context on this Jaxrs API. As per the
offline discussion we had, we'll make only the API context configurable.

4. WhiteListed REST API, what is the security mechanism in place to prevent
unauthorized access?
We have introduced another Interceptors called
'PreAuthenticationInterceptor'[1]  and there we identify whether the
incoming API request is for a whitelisted API (read the app-manager.xml to
identify whitelisted APIs) . If it is a whitelisted API, then a parameter
is set to incoming message to mark it as a whitelisted API call and in
OAuthInterceptor it skips the authentication. (We referred the whitelisted
API implementation in APIM)

[1] -
https://github.com/wso2/carbon-appmgt/blob/master/components/org.wso2.carbon.appmgt.rest.api.util/src/main/java/org/wso2/carbon/appmgt/rest/api/util/interceptors/PreAuthenticationInterceptor.java


On Thu, Jun 16, 2016 at 9:36 AM, Ruwan Abeykoon  wrote:

> Hi AppM Team,
> Few comments,
> 1. Is there a way to generalize the "BinaryFileStorage" out of
> "MobileAppsConfiguration" tag, because this might be needed in some other
> app types(say we support desktop apps) in future.
> 2. FilePreciseLocation seems odd. Can we change it to "AbsoluteLocation",
> no "File" prefix needed IMO.
> 3. "FileAPILocation", do we need this. Are we allowing this to be
> configured, will this be a deployment configuration. I think not. Can we
> just document this API so that other products like EMM knows which to call.
> 4. WhiteListed REST API, what is the security mechanism in place to
> prevent unauthorized access?
>
> Cheers,
> Ruwan
>
> On Thu, Jun 16, 2016 at 12:06 AM, Thilini Shanika 
> wrote:
>
>> Hi EMM Team,
>>
>> We have added new configurations to default app-manager.xml [1]  that we
>> shift with org.wso2.carbon.appmgt.core.feature
>> 
>>  . Since you are maintaining a separate app-manager.xml in [1], please
>> add the following new configurations which are related with binary file
>> storage, one-time download link generation, and whitelisted REST Apis.
>>
>> 1.   Binary file storage config - For mobile binary file (.apk and.ipa
>> files) storage location(FilePreciseLocation) and one-time mobile app
>> download REST API (FileAPILocation)configuration
>>
>>   
>> .
>>   
>>
>> ${carbon.home}/repository/resources/mobileapps/
>>
>> /api/appm/store/v1.1/apps/mobile/binaries/one-time/
>> 
>>   
>>
>> 2.  WhiteListed REST API configuration - The APIs defined under this
>> config are whitelisted and can be accessed without OAuth security headers
>> 
>> 
>> 
>> 
>>
>> /api/appm/store/{version}/apps/mobile/binaries/one-time/{uuid}
>> GET,HEAD
>> 
>> 
>>
>> /api/appm/store/{version}/apps/static-contents/{fileName}
>> GET,HEAD
>> 
>> 
>>
>> /api/appm/store/{version}/apps/mobile/plist/{appId}/{uuid}
>> GET,HEAD
>> 
>> 
>> 
>>
>> 3. IosPlistPath config - This configuration value should point to new
>> REST API for to retrieve plist.
>>
>> 
>> ...
>>  > name="IosPlistPath">/api/appm/store/v1.1/apps/mobile/plist
>> 
>>
>> [1] -
>> https://github.com/wso2/carbon-appmgt/blob/master/features/org.wso2.carbon.appmgt.core.feature/src/main/resources/config/app-manager.xml
>> [2] -
>> https://github.com/wso2/product-emm/blob/master/modules/distribution/src/repository/conf/app-manager.xml
>>
>>
>> Thanks
>> Thilini
>> --
>> Thilini Shanika
>> Senior Software Engineer
>> WSO2, Inc.; http://wso2.com
>> 20, Palmgrove Avenue, Colombo 3
>>
>> E-mail: tgtshan...@gmail.com
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Ruwan Abeykoon*
> 

[Dev] Meeting minutes from Dockerfiles test framework project

2016-06-15 Thread Abhishek Tiwari
Hi All,

Following are the meeting minutes

*Agenda*
Demo the current implementation of Dockerfiles test framework

*Tasks completed:*
1. Test framework initiates a clean build and run of a WSO2 product
(currently ESB 4.9.0)
2. Validates that all the exposed ports are open
3. Validates that WSO2 carbon server has been started successfully on the
Docker container.

*Tasks planned before next sync up*
1. Add the ability to read exposed ports from the Dockerfile
2. Modify the launch script to silence console log and redirect them to a
log file, which will later be parsed for any errors/warnings
3. Access WSO2 carbon logs from the container and report errors/exceptions

Thanks
Abhishek
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error while registering UDF method in Spark

2016-06-15 Thread Supun Sethunga
Thanks Krishantha, that solved the issue.

Regards,
Supun

On Wed, Jun 15, 2016 at 10:46 AM, Krishantha Samaraweera <
krishan...@wso2.com> wrote:

> Hi Supun,
>
> "$jacocoInit" method injection happens at class instrumentation phase
> hence excluding the class though filter file may not work. Filter works
> only when report generation happens and it exclude all classes included in
> filter files from report generation.
>
> So you need to edit instrumenation.txt file and include classes you want
> to instrument specifically.
>
> Thanks,
> Krishantha.
>
> On Wed, Jun 15, 2016 at 9:10 AM, Supun Sethunga  wrote:
>
>> Any update on this?
>>
>> Believe this gonna be an issue for most of the analytics products (if not
>> all).
>>
>> Regards,
>> Supun
>>
>> On Thu, Jun 9, 2016 at 3:06 PM, Supun Sethunga  wrote:
>>
>>> Hi Dharshana/Sachith,
>>>
>>> We are observing the same error in analytics-esb server as well. Even
>>> though the exception is harmless directly, it causes any Test cases which
>>> extend *ServerStartupBaseTest*[1]  to be failed (coz of the "ERROR"
>>> string in the logs).
>>>
>>> I tried excluding the UDF class in the  filter.txt, but had no luck.
>>> Same testcases passes if we disable the coverage. :(
>>>
>>> Any idea of a solution?
>>>
>>> [1]
>>> https://github.com/wso2/carbon-platform-integration-utils/blob/master/common-framework-tests/src/main/java/org/wso2/carbon/integration/common/tests/ServerStartupBaseTest.java
>>>
>>>
>>> Thanks,
>>> Supun
>>>
>>> On Sun, Jun 5, 2016 at 4:17 PM, Dharshana Warusavitharana <
>>> dharsha...@wso2.com> wrote:
>>>
 Hi Nirmal,

 Yes this is the nature of jacoco in coverage. We are using offline
 instrumentation which adds few data in to classes to determine whether they
 are loaded in to JVM

 in /src/test/resource directory you have two files called filter.txt
 and instrumentation.txt

 You can remove any pattern in filter.txt by

 -org.wso2.carbon.throttle.core.impl.ipbase.* 
 -org.wso2.uri.template.parser.*
 Thank you,
 Dharshana.

 On Sun, Jun 5, 2016 at 6:28 AM, Nirmal Fernando 
 wrote:

> Can we skip certain classes getting this $jacocoInit method?
>
> On Sat, Jun 4, 2016 at 11:38 PM, Sachith Withana 
> wrote:
>
>> Hi Fazlan,
>>
>> To add to what Gimantha said, since we register methods, only the
>> jacoco injected method would fail to register.
>> All the other methods would be registered as UDFs.
>>
>> Regards,
>> Sachith
>>
>> On Sat, Jun 4, 2016 at 12:35 PM, Gimantha Bandara 
>> wrote:
>>
>>> Hi Fazlan,
>>>
>>> Spark UDFs are the Java methods that we define. Jacoco actually
>>> injects a static method called "$jacocoInit" to every test class, so 
>>> every
>>> UDF class will contain an additional method called "$jacocoInit". Spark
>>> cannot determine the datatypes passed in the parameters and registering
>>> "$jacocoInit" as a spark UDF fails. Thats why that error comes, and 
>>> since
>>> it is not a method that we define as a spark UDF, it is harmless.
>>>
>>> Thanks,
>>>
>>> On Sat, Jun 4, 2016 at 10:12 PM, Nirmal Fernando 
>>> wrote:
>>>
 Hi Fazlan,

 AFAIK this is an unharmful error and Sachith should know some
 context.

 On Sat, Jun 4, 2016 at 10:09 PM, Fazlan Nazeem 
 wrote:

> Hi,
>
> We are observing some errors related to UDF registration in API-M
> analytics Test integration phase. The error keeps on printing till the
> Spark Client is started. This error is only present during the test 
> phase.
> It does not occur when the server is started separately. DAS team, 
> Any idea
> on how we could get rid of this? Jenkins log in [1].
>
>  [2016-06-04 02:23:32,998] ERROR 
> {org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor}
>  -  Error while registering the UDF method: $jacocoInit, Cannot 
> determine the return DataType: class [Z
>
> INFO  
> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] 
> - 
> org.wso2.carbon.analytics.spark.core.exception.AnalyticsUDFException: 
> Cannot determine the return DataType: class [Z
> INFO  
> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] 
> - at 
> org.wso2.carbon.analytics.spark.core.util.AnalyticsCommonUtils.getDataType(AnalyticsCommonUtils.java:104)
> INFO  
> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] 
> - at 
> 

Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.6 RC3

2016-06-15 Thread Kalpa Welivitigoda
Hi Kasun,

The issue with the orbits, as discussed in the references provided, is to
be fixed at the product level and not in kernel. So IMO, the issue
mentioned neither affects the kernel nor a valid reason to hold off the
kernel vote.


On Thu, Jun 16, 2016 at 10:37 AM, Bhathiya Jayasekara 
wrote:

> Hi all,
>
> I could successfully run APIM test suit with upgraded Kernel.  Hence +1
> for the release.
>
> [x] Stable - go ahead and release
>
> Thanks,
> Bhathiya
>
>
> On Wed, Jun 15, 2016 at 7:29 PM, Rajith Roshan  wrote:
>
>> Hi all,
>>
>> We are facing an issue when trying to access login page of publisher and
>> store apps with sso enabled. We will verify this and update the thread. We
>> need to check whether this is due to issue in opensaml.
>>
>> Thanks!
>> Rajith
>>
>> On Mon, Jun 13, 2016 at 4:51 PM, Kalpa Welivitigoda 
>> wrote:
>>
>>> Hi Devs,
>>>
>>> This is the 3rd release candidate of WSO2 Carbon Kernel 4.4.6.
>>>
>>> This release fixes the following issues:
>>> https://wso2.org/jira/issues/?filter=13090
>>>
>>> Please download and test your products with kernel 4.4.6 RC3 and vote.
>>> Vote will be open for 72 hours or as longer as needed.
>>>
>>> ​Source and binary distribution files:​
>>>
>>> http://svn.wso2.org/repos/wso2/people/kalpaw/wso2carbon-4.4.6/wso2carbon-4.4.6-rc3.zip
>>>
>>> ​Maven staging repository:​
>>> http://maven.wso2.org/nexus/content/repositories/orgwso2carbon-1024/
>>>
>>> ​The tag to be voted upon:​
>>> https://github.com/wso2/carbon-kernel/tree/v4.4.6-rc3
>>>
>>>
>>> [ ] Broken - do not release (explain why)
>>> [ ] Stable - go ahead and release
>>>
>>> Thank you
>>> Carbon Team​
>>>
>>> --
>>> Best Regards,
>>>
>>> Kalpa Welivitigoda
>>> Senior Software Engineer, WSO2 Inc. http://wso2.com
>>> Email: kal...@wso2.com
>>> Mobile: +94776509215
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Bhathiya Jayasekara*
> *Senior Software Engineer,*
> *WSO2 inc., http://wso2.com *
>
> *Phone: +94715478185 <%2B94715478185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> *
> *Twitter: https://twitter.com/bhathiyax *
> *Blog: http://movingaheadblog.blogspot.com
> *
>



-- 
Best Regards,

Kalpa Welivitigoda
Senior Software Engineer, WSO2 Inc. http://wso2.com
Email: kal...@wso2.com
Mobile: +94776509215
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Migrating MSF4J tooling to Developer Studio Kernel 4.1.0

2016-06-15 Thread Awanthika Senarath
Hello Azeez,

$subject has been done at [1]. Could you kindly merge the pull request to
the msf4j repository?

Further the practice is that the tooling of the product being maintained at
a separate repository than the product repository itself.

Shall we move the msf4j tool to a separate repository as well?

This would assist bug fixes and patch releases independent from the main
tool source.
The msf4j tool being very lightweight and simple, it makes sense to keep it
in the product repository as well though.

WDYT?




[1] https://github.com/wso2/msf4j/pull/175

Awanthika Senarath
Software Engineer, WSO2 Inc.
Mobile: +94717681791
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.6 RC3

2016-06-15 Thread Viraj Senevirathne
Hi All,

As there are no issues +1 for the release.

[x] Stable - go ahead and release

Regards,

On Thu, Jun 16, 2016 at 10:37 AM, Bhathiya Jayasekara 
wrote:

> Hi all,
>
> I could successfully run APIM test suit with upgraded Kernel.  Hence +1
> for the release.
>
> [x] Stable - go ahead and release
>
> Thanks,
> Bhathiya
>
>
> On Wed, Jun 15, 2016 at 7:29 PM, Rajith Roshan  wrote:
>
>> Hi all,
>>
>> We are facing an issue when trying to access login page of publisher and
>> store apps with sso enabled. We will verify this and update the thread. We
>> need to check whether this is due to issue in opensaml.
>>
>> Thanks!
>> Rajith
>>
>> On Mon, Jun 13, 2016 at 4:51 PM, Kalpa Welivitigoda 
>> wrote:
>>
>>> Hi Devs,
>>>
>>> This is the 3rd release candidate of WSO2 Carbon Kernel 4.4.6.
>>>
>>> This release fixes the following issues:
>>> https://wso2.org/jira/issues/?filter=13090
>>>
>>> Please download and test your products with kernel 4.4.6 RC3 and vote.
>>> Vote will be open for 72 hours or as longer as needed.
>>>
>>> ​Source and binary distribution files:​
>>>
>>> http://svn.wso2.org/repos/wso2/people/kalpaw/wso2carbon-4.4.6/wso2carbon-4.4.6-rc3.zip
>>>
>>> ​Maven staging repository:​
>>> http://maven.wso2.org/nexus/content/repositories/orgwso2carbon-1024/
>>>
>>> ​The tag to be voted upon:​
>>> https://github.com/wso2/carbon-kernel/tree/v4.4.6-rc3
>>>
>>>
>>> [ ] Broken - do not release (explain why)
>>> [ ] Stable - go ahead and release
>>>
>>> Thank you
>>> Carbon Team​
>>>
>>> --
>>> Best Regards,
>>>
>>> Kalpa Welivitigoda
>>> Senior Software Engineer, WSO2 Inc. http://wso2.com
>>> Email: kal...@wso2.com
>>> Mobile: +94776509215
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Bhathiya Jayasekara*
> *Senior Software Engineer,*
> *WSO2 inc., http://wso2.com *
>
> *Phone: +94715478185 <%2B94715478185>*
> *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
>
>


-- 
Viraj Senevirathne
Software Engineer; WSO2, Inc.

Mobile : +94 71 958 0269
Email : vir...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.6 RC3

2016-06-15 Thread Bhathiya Jayasekara
Hi all,

I could successfully run APIM test suit with upgraded Kernel.  Hence +1 for
the release.

[x] Stable - go ahead and release

Thanks,
Bhathiya


On Wed, Jun 15, 2016 at 7:29 PM, Rajith Roshan  wrote:

> Hi all,
>
> We are facing an issue when trying to access login page of publisher and
> store apps with sso enabled. We will verify this and update the thread. We
> need to check whether this is due to issue in opensaml.
>
> Thanks!
> Rajith
>
> On Mon, Jun 13, 2016 at 4:51 PM, Kalpa Welivitigoda 
> wrote:
>
>> Hi Devs,
>>
>> This is the 3rd release candidate of WSO2 Carbon Kernel 4.4.6.
>>
>> This release fixes the following issues:
>> https://wso2.org/jira/issues/?filter=13090
>>
>> Please download and test your products with kernel 4.4.6 RC3 and vote.
>> Vote will be open for 72 hours or as longer as needed.
>>
>> ​Source and binary distribution files:​
>>
>> http://svn.wso2.org/repos/wso2/people/kalpaw/wso2carbon-4.4.6/wso2carbon-4.4.6-rc3.zip
>>
>> ​Maven staging repository:​
>> http://maven.wso2.org/nexus/content/repositories/orgwso2carbon-1024/
>>
>> ​The tag to be voted upon:​
>> https://github.com/wso2/carbon-kernel/tree/v4.4.6-rc3
>>
>>
>> [ ] Broken - do not release (explain why)
>> [ ] Stable - go ahead and release
>>
>> Thank you
>> Carbon Team​
>>
>> --
>> Best Regards,
>>
>> Kalpa Welivitigoda
>> Senior Software Engineer, WSO2 Inc. http://wso2.com
>> Email: kal...@wso2.com
>> Mobile: +94776509215
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Rajith Roshan
> Software Engineer, WSO2 Inc.
> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*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


Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.6 RC3

2016-06-15 Thread Rajith Roshan
Hi all,

The issue got resolved after changing the bouncy castle version range in
opensaml orbit bundle. Further we ran the integration tests without any
issues.

Thanks!
Rajith

On Thu, Jun 16, 2016 at 10:07 AM, Viraj Senevirathne 
wrote:

> Hi All,
>
> We ran integration tests in product-ESB and found no issues.
>
> Regards,
>
> On Thu, Jun 16, 2016 at 2:30 AM, Kasun Bandara  wrote:
>
>> Hi all,
>>
>> As founded by [1] , it was suggested to release a new opensaml orbit
>> bundle to mitigate the bouncy castle version import range issue with
>> kernel 4.4.6.  According to [2], we were advised to decouple joda time from
>> this orbit. When incorporating & updating the new opensaml orbit bundle
>> (decoupled with joda time) to identity components, we have came across some
>> discrepancies. Hence please hold off the vote proceedings until we find
>> out the root cause of the issue.
>>
>> Thanks,
>> Kasun.
>>
>>
>> [1] [Engineering] Test cases are failing with OWASP csrfguard component.
>>
>> [2] [Engineering] Request to merge and release opensaml 2.6.4.wso2v3 orbit
>>
>>
>>
>> On Wed, Jun 15, 2016 at 7:29 PM, Rajith Roshan  wrote:
>>
>>> Hi all,
>>>
>>> We are facing an issue when trying to access login page of publisher and
>>> store apps with sso enabled. We will verify this and update the thread. We
>>> need to check whether this is due to issue in opensaml.
>>>
>>> Thanks!
>>> Rajith
>>>
>>> On Mon, Jun 13, 2016 at 4:51 PM, Kalpa Welivitigoda 
>>> wrote:
>>>
 Hi Devs,

 This is the 3rd release candidate of WSO2 Carbon Kernel 4.4.6.

 This release fixes the following issues:
 https://wso2.org/jira/issues/?filter=13090

 Please download and test your products with kernel 4.4.6 RC3 and vote.
 Vote will be open for 72 hours or as longer as needed.

 ​Source and binary distribution files:​

 http://svn.wso2.org/repos/wso2/people/kalpaw/wso2carbon-4.4.6/wso2carbon-4.4.6-rc3.zip

 ​Maven staging repository:​
 http://maven.wso2.org/nexus/content/repositories/orgwso2carbon-1024/

 ​The tag to be voted upon:​
 https://github.com/wso2/carbon-kernel/tree/v4.4.6-rc3


 [ ] Broken - do not release (explain why)
 [ ] Stable - go ahead and release

 Thank you
 Carbon Team​

 --
 Best Regards,

 Kalpa Welivitigoda
 Senior Software Engineer, WSO2 Inc. http://wso2.com
 Email: kal...@wso2.com
 Mobile: +94776509215

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


>>>
>>>
>>> --
>>> Rajith Roshan
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Kasun Bandara
>> *Software Engineer*
>> Mobile : +94 (0) 718 338 360
>> <%2B94%20%280%29%20773%20451194>
>> kas...@wso2.com 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Viraj Senevirathne
> Software Engineer; WSO2, Inc.
>
> Mobile : +94 71 958 0269
> Email : vir...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSOC 16] Initial Project Progress

2016-06-15 Thread Isuru Haththotuwa
Hi Osura,

Would you be able to demonstrate the functionality of the membership scheme
today?

Also, please keep an eye on the timeline for the project [1], as the
midterm evaluations will be starting on 20th.

[1]. https://developers.google.com/open-source/gsoc/timeline

On Thu, Jun 16, 2016 at 6:46 AM, Imesh Gunaratne  wrote:

>
>
> On Wed, Jun 15, 2016 at 2:46 PM, Osura Rathnayake 
> wrote:
>
>> Hi Mentors,
>>
>> As we discussed at the very beginning, next in line is to see how each
>> of the following can be setup on Azure using native features:
>>
>>- Auto healing
>>- Autoscaling
>>- Dynamic load balancing
>>- Centralized logging
>>- Monitoring
>>- Metering
>>
>> For auto healing, we can implement it in both VM level and application
>> level. In VM level, we can poll for VM statuses and check if a given VM is
>> down or not. And then we can up them if they have gone down, using api
>> calls. for application level of course we will have to run a shell script
>> to determine the status of a given application and will have to up it
>> accordingly. I'm looking forward to hear from you regarding this.
>>
>
> ​No, auto healing and autoscaling should be handled by Azure. We might not
> need to write code to handle that.
>
> Thanks​
>
>
>>
>> thanks,
>>
>> On Mon, Jun 13, 2016 at 10:53 AM, Osura Rathnayake 
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> Can you please tell me when you would be free to have a hangout to do a
>>> code review and discuss next project goals?
>>>
>>> Thanks,
>>>
>>> On Saturday, June 11, 2016, Osura Rathnayake  wrote:
>>>
 Hi Isuru,

 Thank you very much.
 Yes there was a misconfiguration in registry mounts and now it works
 properly.
 Okay will have a code review next week.


 On Fri, Jun 10, 2016 at 9:45 AM, Isuru Haththotuwa 
 wrote:

> Hi Osura,
>
> This is great progress! This shows that a clustered deployment of WSO2
> products on Azure is possible with this membership scheme.
>
> About the error, what is says is that a particular resource that the
> first node is expecting to find in the config registry is not found. This
> can be due to a mis-configured registry mounts. Did you mount the config
> and governance registries? If not please do so by referring [1].
>
> Lets schedule a code review early next week for the membership scheme.
>
> [1]. https://docs.wso2.com/display/CLUSTER44x/Setting+up+the+Database
>
> On Fri, Jun 10, 2016 at 12:42 AM, Osura Rathnayake  > wrote:
>
>> Hi Mentors,
>>
>> I have two application servers (AS) running on azure and I'm testing
>> the azure membership scheme on them. When I run the first AS I could see
>> member added and member joined log messages. And when I run the second 
>> AS,
>> I could see member added log messages and then I get an error saying 
>> carbon
>> initialization failed (screenshot attached as error6). Also when I 
>> stopped
>> the second AS I could see member left log message on the first AS(
>> screenshot attached as Capture1).
>>
>> Afterwards I stopped both of them and started the second AS first and
>> it ran without errors but the other AS( previous case I started this AS
>> first) showed up the same error which I got earlier. I'm getting this 
>> error
>> always from the secondly started AS. Please share with me if you have any
>> idea why I'm getting this.
>>
>> Thanks,
>>
>> On Mon, Jun 6, 2016 at 4:16 PM, Osura Rathnayake 
>> wrote:
>>
>>> Hi all,
>>>
>>> This is the summary of the matters that we discussed during hangout
>>> we had on 6th of June, 2016.
>>>
>>> We had a productive discussion on how to pass the azure specific
>>> parameters to the Azure membership scheme and how we should test the 
>>> Azure
>>> membership scheme
>>>
>>> Current progress : Getting a list of IP addresses of members in the
>>> cluster and updating the hazelcast configuration are done but certain 
>>> azure
>>> specific parameters are hard coded in the program.
>>>
>>> As in kubernetes membership scheme, we agreed upon sending those
>>> parameters as either environment variables or system properties. So the
>>> next immediate goal is to get those parameters that way. As of how to 
>>> test
>>> the azure membership scheme, [1] was shared get a more clear idea on the
>>> subject.
>>>
>>>
>>> [1]
>>> https://docs.wso2.com/display/KA100/Kubernetes+Membership+Scheme+for+WSO2+Carbon
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> On Mon, Jun 6, 2016 at 1:21 PM, Osura Rathnayake >> > wrote:
>>>
 Hi Isuru,

 Thank you 

Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.6 RC3

2016-06-15 Thread Viraj Senevirathne
Hi All,

We ran integration tests in product-ESB and found no issues.

Regards,

On Thu, Jun 16, 2016 at 2:30 AM, Kasun Bandara  wrote:

> Hi all,
>
> As founded by [1] , it was suggested to release a new opensaml orbit
> bundle to mitigate the bouncy castle version import range issue with
> kernel 4.4.6.  According to [2], we were advised to decouple joda time from
> this orbit. When incorporating & updating the new opensaml orbit bundle
> (decoupled with joda time) to identity components, we have came across some
> discrepancies. Hence please hold off the vote proceedings until we find
> out the root cause of the issue.
>
> Thanks,
> Kasun.
>
>
> [1] [Engineering] Test cases are failing with OWASP csrfguard component.
>
> [2] [Engineering] Request to merge and release opensaml 2.6.4.wso2v3 orbit
>
>
>
> On Wed, Jun 15, 2016 at 7:29 PM, Rajith Roshan  wrote:
>
>> Hi all,
>>
>> We are facing an issue when trying to access login page of publisher and
>> store apps with sso enabled. We will verify this and update the thread. We
>> need to check whether this is due to issue in opensaml.
>>
>> Thanks!
>> Rajith
>>
>> On Mon, Jun 13, 2016 at 4:51 PM, Kalpa Welivitigoda 
>> wrote:
>>
>>> Hi Devs,
>>>
>>> This is the 3rd release candidate of WSO2 Carbon Kernel 4.4.6.
>>>
>>> This release fixes the following issues:
>>> https://wso2.org/jira/issues/?filter=13090
>>>
>>> Please download and test your products with kernel 4.4.6 RC3 and vote.
>>> Vote will be open for 72 hours or as longer as needed.
>>>
>>> ​Source and binary distribution files:​
>>>
>>> http://svn.wso2.org/repos/wso2/people/kalpaw/wso2carbon-4.4.6/wso2carbon-4.4.6-rc3.zip
>>>
>>> ​Maven staging repository:​
>>> http://maven.wso2.org/nexus/content/repositories/orgwso2carbon-1024/
>>>
>>> ​The tag to be voted upon:​
>>> https://github.com/wso2/carbon-kernel/tree/v4.4.6-rc3
>>>
>>>
>>> [ ] Broken - do not release (explain why)
>>> [ ] Stable - go ahead and release
>>>
>>> Thank you
>>> Carbon Team​
>>>
>>> --
>>> Best Regards,
>>>
>>> Kalpa Welivitigoda
>>> Senior Software Engineer, WSO2 Inc. http://wso2.com
>>> Email: kal...@wso2.com
>>> Mobile: +94776509215
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Kasun Bandara
> *Software Engineer*
> Mobile : +94 (0) 718 338 360
> <%2B94%20%280%29%20773%20451194>
> kas...@wso2.com 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Viraj Senevirathne
Software Engineer; WSO2, Inc.

Mobile : +94 71 958 0269
Email : vir...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Socket connection closed while trying ESB connector operation.

2016-06-15 Thread Senduran Balasubramaniyam
Hi Shakila,

Can you compare the request sending from ESB(using wirelog) and sending
directly.

Regards
Senduran

On Wed, Jun 15, 2016 at 6:56 PM, Shakila Sivagnanarajah 
wrote:

> Hi all,
>
> I am experiencing socket connection closed exception while trying 'upload
> part operation' [1] of Amazon s3 connector. In direct call, the response
> comes within 5 seconds. I increased the the timeout values as below.
>
> synapse.global_timeout_interval - 180 seconds in synapse.properties
> http.socket.timeout - 180 seconds in passthru-http.properties
> http.socket.timeout.receiver - 180 seconds in nhttp.properties
>
> After this tuning also, no improvement. It waits for nearly 21 seconds.
> But not receiving the response from API. [2] is the message I get.
>
> Finally I set the endpoint timeout [3] also. But the result is same.
>
> [1]
> http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html
>
>
> 
> [2]
> 
> RequestTimeout
> Your socket connection to the server was not read from or
> written to within the timeout period. Idle connections will be
> closed.
> 7223E45B22E88E80
>
> cH2RE4IG7QhmiN1Bpqw6/bweEKowmtXS+jFwJkzay/3u3MovuutgtzAXM37tpXuzCl23HxAYuZIF1rLGLuJxvh4GRAu6891c
> 
>
> [3]
> 
> 
>  uri-template="{uri.var.bucketUrl}/{+uri.var.objectName}?partNumber={+uri.var.partNumber}uploadId={+uri.var.uploadId}">
> 
> 18
> fault
> 
> 
> 
> 
>
> [4] Template:
>
> http://ws.apache.org/ns/synapse;>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  scope="axis2"/>
>  scope="axis2"/>
> 
> 
> 
> uri-template="{uri.var.bucketUrl}/{+uri.var.objectName}?partNumber={+uri.var.partNumber}uploadId={+uri.var.uploadId}"/>
> 
> 
> 
> 
> 
> 
>  action="remove"/>
> 
> 
>
>
> Thank you
> --
> Shakila Sivagnanarajah
> Software Engineer
> Mobile :+94 (0) 768 856837
> shak...@wso2.com
> WSO2, Inc.
> lean . enterprise . middleware
> http://www.wso2.com/
>



-- 
*Senduran *
Software Engineer,
WSO2, Inc.;  http://wso2.com/ 
Mobile: +94 77 952 6548
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][APPM][EMM] - Update app-manager.xml with new configuration changes

2016-06-15 Thread Ruwan Abeykoon
Hi AppM Team,
Few comments,
1. Is there a way to generalize the "BinaryFileStorage" out of
"MobileAppsConfiguration" tag, because this might be needed in some other
app types(say we support desktop apps) in future.
2. FilePreciseLocation seems odd. Can we change it to "AbsoluteLocation",
no "File" prefix needed IMO.
3. "FileAPILocation", do we need this. Are we allowing this to be
configured, will this be a deployment configuration. I think not. Can we
just document this API so that other products like EMM knows which to call.
4. WhiteListed REST API, what is the security mechanism in place to prevent
unauthorized access?

Cheers,
Ruwan

On Thu, Jun 16, 2016 at 12:06 AM, Thilini Shanika  wrote:

> Hi EMM Team,
>
> We have added new configurations to default app-manager.xml [1]  that we
> shift with org.wso2.carbon.appmgt.core.feature
> 
>  . Since you are maintaining a separate app-manager.xml in [1], please
> add the following new configurations which are related with binary file
> storage, one-time download link generation, and whitelisted REST Apis.
>
> 1.   Binary file storage config - For mobile binary file (.apk and.ipa
> files) storage location(FilePreciseLocation) and one-time mobile app
> download REST API (FileAPILocation)configuration
>
>   
> .
>   
>
> ${carbon.home}/repository/resources/mobileapps/
>
> /api/appm/store/v1.1/apps/mobile/binaries/one-time/
> 
>   
>
> 2.  WhiteListed REST API configuration - The APIs defined under this
> config are whitelisted and can be accessed without OAuth security headers
> 
> 
> 
> 
>
> /api/appm/store/{version}/apps/mobile/binaries/one-time/{uuid}
> GET,HEAD
> 
> 
>
> /api/appm/store/{version}/apps/static-contents/{fileName}
> GET,HEAD
> 
> 
>
> /api/appm/store/{version}/apps/mobile/plist/{appId}/{uuid}
> GET,HEAD
> 
> 
> 
>
> 3. IosPlistPath config - This configuration value should point to new REST
> API for to retrieve plist.
>
> 
> ...
>   name="IosPlistPath">/api/appm/store/v1.1/apps/mobile/plist
> 
>
> [1] -
> https://github.com/wso2/carbon-appmgt/blob/master/features/org.wso2.carbon.appmgt.core.feature/src/main/resources/config/app-manager.xml
> [2] -
> https://github.com/wso2/product-emm/blob/master/modules/distribution/src/repository/conf/app-manager.xml
>
>
> Thanks
> Thilini
> --
> Thilini Shanika
> Senior Software Engineer
> WSO2, Inc.; http://wso2.com
> 20, Palmgrove Avenue, Colombo 3
>
> E-mail: tgtshan...@gmail.com
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Ruwan Abeykoon*
*Associate Director/Architect**,*
*WSO2, Inc. http://wso2.com  *
*lean.enterprise.middleware.*

email: ruw...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] ESB behaves unexpectedly with arithmetic operations

2016-06-15 Thread Vimalanathan Rajeevan
Hi,

I am using XPath arithmetic operators in two different ways to do some
subtraction/addition with ESB 4.9.0 as coded below,





*  *

Output: subtraction = 20.0





*

  *

Output: subtraction = NaN

This is a strange behavior where it says that Not a Number(NaN) when we
define it as integer and treats as numbers with default type(String).
Does anyone have any idea on this?

Thanks,
Rajeevan

-- 
Vimalanathan Rajeevan
Software Engineer,
WSO2, Inc. *http://wso2.com* 
Lean.Enterprise.Middleware

Mobile:
*+94 773090875*
LinkedIn:
*https://www.linkedin.com/in/RajeevanVimalanathan
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSOC 16] Initial Project Progress

2016-06-15 Thread Imesh Gunaratne
On Wed, Jun 15, 2016 at 2:46 PM, Osura Rathnayake 
wrote:

> Hi Mentors,
>
> As we discussed at the very beginning, next in line is to see how each of
> the following can be setup on Azure using native features:
>
>- Auto healing
>- Autoscaling
>- Dynamic load balancing
>- Centralized logging
>- Monitoring
>- Metering
>
> For auto healing, we can implement it in both VM level and application
> level. In VM level, we can poll for VM statuses and check if a given VM is
> down or not. And then we can up them if they have gone down, using api
> calls. for application level of course we will have to run a shell script
> to determine the status of a given application and will have to up it
> accordingly. I'm looking forward to hear from you regarding this.
>

​No, auto healing and autoscaling should be handled by Azure. We might not
need to write code to handle that.

Thanks​


>
> thanks,
>
> On Mon, Jun 13, 2016 at 10:53 AM, Osura Rathnayake 
> wrote:
>
>> Hi Isuru,
>>
>> Can you please tell me when you would be free to have a hangout to do a
>> code review and discuss next project goals?
>>
>> Thanks,
>>
>> On Saturday, June 11, 2016, Osura Rathnayake  wrote:
>>
>>> Hi Isuru,
>>>
>>> Thank you very much.
>>> Yes there was a misconfiguration in registry mounts and now it works
>>> properly.
>>> Okay will have a code review next week.
>>>
>>>
>>> On Fri, Jun 10, 2016 at 9:45 AM, Isuru Haththotuwa 
>>> wrote:
>>>
 Hi Osura,

 This is great progress! This shows that a clustered deployment of WSO2
 products on Azure is possible with this membership scheme.

 About the error, what is says is that a particular resource that the
 first node is expecting to find in the config registry is not found. This
 can be due to a mis-configured registry mounts. Did you mount the config
 and governance registries? If not please do so by referring [1].

 Lets schedule a code review early next week for the membership scheme.

 [1]. https://docs.wso2.com/display/CLUSTER44x/Setting+up+the+Database

 On Fri, Jun 10, 2016 at 12:42 AM, Osura Rathnayake 
 wrote:

> Hi Mentors,
>
> I have two application servers (AS) running on azure and I'm testing
> the azure membership scheme on them. When I run the first AS I could see
> member added and member joined log messages. And when I run the second AS,
> I could see member added log messages and then I get an error saying 
> carbon
> initialization failed (screenshot attached as error6). Also when I stopped
> the second AS I could see member left log message on the first AS(
> screenshot attached as Capture1).
>
> Afterwards I stopped both of them and started the second AS first and
> it ran without errors but the other AS( previous case I started this AS
> first) showed up the same error which I got earlier. I'm getting this 
> error
> always from the secondly started AS. Please share with me if you have any
> idea why I'm getting this.
>
> Thanks,
>
> On Mon, Jun 6, 2016 at 4:16 PM, Osura Rathnayake 
> wrote:
>
>> Hi all,
>>
>> This is the summary of the matters that we discussed during hangout
>> we had on 6th of June, 2016.
>>
>> We had a productive discussion on how to pass the azure specific
>> parameters to the Azure membership scheme and how we should test the 
>> Azure
>> membership scheme
>>
>> Current progress : Getting a list of IP addresses of members in the
>> cluster and updating the hazelcast configuration are done but certain 
>> azure
>> specific parameters are hard coded in the program.
>>
>> As in kubernetes membership scheme, we agreed upon sending those
>> parameters as either environment variables or system properties. So the
>> next immediate goal is to get those parameters that way. As of how to 
>> test
>> the azure membership scheme, [1] was shared get a more clear idea on the
>> subject.
>>
>>
>> [1]
>> https://docs.wso2.com/display/KA100/Kubernetes+Membership+Scheme+for+WSO2+Carbon
>>
>>
>> Thanks,
>>
>>
>>
>> On Mon, Jun 6, 2016 at 1:21 PM, Osura Rathnayake 
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> Thank you very much. Okay will have a hangout today at 3.00 pm.
>>>
>>> thanks,
>>>
>>> On Mon, Jun 6, 2016 at 10:37 AM, Isuru Haththotuwa 
>>> wrote:
>>>
 Hi Osura,

 You need to test the membership scheme following the same method
 that we use for the Kuberntes Membership scheme. Please refer the 
 README
 [1]. The only difference is that you will be deploying in Azure.

 Please note the parameters that are 

Re: [Dev] [EMM][Android] Exception when executed hard lock operation

2016-06-15 Thread Kasun Dananjaya Delgolla
Hi All,

This was due to an android rest-api issue when the agent replies with
failure responses. (There was a logic in rest-api to pass response
parameter directly to a Gson object to convert it to a specific object (ie
: Location). This results in an exception when a string (error message)
passed as the response. Now this is fixed[1] by properly adding checks to
the operation response status before doing the above.

[1] -
https://github.com/wso2/carbon-device-mgt-plugins/commit/ef281e1524fd1772a977ae9df16f97600b402387

Thanks

On Wed, Jun 15, 2016 at 11:22 AM, Kasun Dananjaya Delgolla 
wrote:

> Hi All,
>
> I got the $subject[1] when I did a hard lock. Hard lock worked fine but
> when the device replies to pending-operations endpoint with operation
> results, this occurs. Any idea? By the looks of it, when hard lock happens,
> the reply payload does not get built properly.
>
> Thanks
> [1] -
> D: [-1234] [] [2016-06-15 18:08:21,551]  WARN
> {org.apache.cxf.phase.PhaseInterceptorChain} -  Exception in handleFault on
> interceptor
> org.apache.cxf.binding.xml.interceptor.XMLFaultOutInterceptor@3226177f
> org.apache.cxf.interceptor.Fault: java.lang.IllegalStateException:
> Expected BEGIN_OBJECT but was STRING at line 1 column 1
> at
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:170)
> at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:136)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101)
> at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
> at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:249)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)
> at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:289)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:226)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:649)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:265)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.wso2.carbon.mdm.services.android.util.ApiOriginFilter.doFilter(ApiOriginFilter.java:33)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
> at
> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
> at
> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
> at
> org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve.processRequest(WebappAuthenticationValve.java:145)
> at
> org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve.invoke(WebappAuthenticationValve.java:67)
> at
> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
> at
> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
> at
> 

Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.6 RC3

2016-06-15 Thread Kasun Bandara
Hi all,

As founded by [1] , it was suggested to release a new opensaml orbit bundle
to mitigate the bouncy castle version import range issue with kernel
4.4.6.  According to [2], we were advised to decouple joda time from this
orbit. When incorporating & updating the new opensaml orbit bundle
(decoupled with joda time) to identity components, we have came across some
discrepancies. Hence please hold off the vote proceedings until we find out
the root cause of the issue.

Thanks,
Kasun.


[1] [Engineering] Test cases are failing with OWASP csrfguard component.

[2] [Engineering] Request to merge and release opensaml 2.6.4.wso2v3 orbit



On Wed, Jun 15, 2016 at 7:29 PM, Rajith Roshan  wrote:

> Hi all,
>
> We are facing an issue when trying to access login page of publisher and
> store apps with sso enabled. We will verify this and update the thread. We
> need to check whether this is due to issue in opensaml.
>
> Thanks!
> Rajith
>
> On Mon, Jun 13, 2016 at 4:51 PM, Kalpa Welivitigoda 
> wrote:
>
>> Hi Devs,
>>
>> This is the 3rd release candidate of WSO2 Carbon Kernel 4.4.6.
>>
>> This release fixes the following issues:
>> https://wso2.org/jira/issues/?filter=13090
>>
>> Please download and test your products with kernel 4.4.6 RC3 and vote.
>> Vote will be open for 72 hours or as longer as needed.
>>
>> ​Source and binary distribution files:​
>>
>> http://svn.wso2.org/repos/wso2/people/kalpaw/wso2carbon-4.4.6/wso2carbon-4.4.6-rc3.zip
>>
>> ​Maven staging repository:​
>> http://maven.wso2.org/nexus/content/repositories/orgwso2carbon-1024/
>>
>> ​The tag to be voted upon:​
>> https://github.com/wso2/carbon-kernel/tree/v4.4.6-rc3
>>
>>
>> [ ] Broken - do not release (explain why)
>> [ ] Stable - go ahead and release
>>
>> Thank you
>> Carbon Team​
>>
>> --
>> Best Regards,
>>
>> Kalpa Welivitigoda
>> Senior Software Engineer, WSO2 Inc. http://wso2.com
>> Email: kal...@wso2.com
>> Mobile: +94776509215
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Rajith Roshan
> Software Engineer, WSO2 Inc.
> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Kasun Bandara
*Software Engineer*
Mobile : +94 (0) 718 338 360
<%2B94%20%280%29%20773%20451194>
kas...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [DEV][APPM][EMM] - Update app-manager.xml with new configuration changes

2016-06-15 Thread Thilini Shanika
Hi EMM Team,

We have added new configurations to default app-manager.xml [1]  that we
shift with org.wso2.carbon.appmgt.core.feature

 . Since you are maintaining a separate app-manager.xml in [1], please add
the following new configurations which are related with binary file
storage, one-time download link generation, and whitelisted REST Apis.

1.   Binary file storage config - For mobile binary file (.apk and.ipa
files) storage location(FilePreciseLocation) and one-time mobile app
download REST API (FileAPILocation)configuration

  
.
  

${carbon.home}/repository/resources/mobileapps/

/api/appm/store/v1.1/apps/mobile/binaries/one-time/

  

2.  WhiteListed REST API configuration - The APIs defined under this config
are whitelisted and can be accessed without OAuth security headers





/api/appm/store/{version}/apps/mobile/binaries/one-time/{uuid}
GET,HEAD



/api/appm/store/{version}/apps/static-contents/{fileName}
GET,HEAD



/api/appm/store/{version}/apps/mobile/plist/{appId}/{uuid}
GET,HEAD




3. IosPlistPath config - This configuration value should point to new REST
API for to retrieve plist.


...
 /api/appm/store/v1.1/apps/mobile/plist


[1] -
https://github.com/wso2/carbon-appmgt/blob/master/features/org.wso2.carbon.appmgt.core.feature/src/main/resources/config/app-manager.xml
[2] -
https://github.com/wso2/product-emm/blob/master/modules/distribution/src/repository/conf/app-manager.xml


Thanks
Thilini
-- 
Thilini Shanika
Senior Software Engineer
WSO2, Inc.; http://wso2.com
20, Palmgrove Avenue, Colombo 3

E-mail: tgtshan...@gmail.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [EMM][Android] Exception when executed hard lock operation

2016-06-15 Thread Kasun Dananjaya Delgolla
Hi All,

I got the $subject[1] when I did a hard lock. Hard lock worked fine but
when the device replies to pending-operations endpoint with operation
results, this occurs. Any idea? By the looks of it, when hard lock happens,
the reply payload does not get built properly.

Thanks
[1] -
D: [-1234] [] [2016-06-15 18:08:21,551]  WARN
{org.apache.cxf.phase.PhaseInterceptorChain} -  Exception in handleFault on
interceptor
org.apache.cxf.binding.xml.interceptor.XMLFaultOutInterceptor@3226177f
org.apache.cxf.interceptor.Fault: java.lang.IllegalStateException: Expected
BEGIN_OBJECT but was STRING at line 1 column 1
at
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:170)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:136)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:249)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:289)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:226)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:649)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:265)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.wso2.carbon.mdm.services.android.util.ApiOriginFilter.doFilter(ApiOriginFilter.java:33)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at
org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve.processRequest(WebappAuthenticationValve.java:145)
at
org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve.invoke(WebappAuthenticationValve.java:67)
at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at

[Dev] Docker command cheat sheet

2016-06-15 Thread Abhishek Tiwari
This was very helpful to me in ramping up with Docker:

https://github.com/wsargent/docker-cheat-sheet

Thanks
Abhishek
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Migration from previous ESB releases to ESB 500

2016-06-15 Thread Viraj Senevirathne
Hi Asanka,

What is the DB you are using in current deployment?

Regards,

On Mon, Jun 13, 2016 at 10:54 AM, Asanka Vithanage  wrote:

> Hi ESB Team,
>
> When moving to ESB 500 from previous ESB releases, Is there any migration
> effort requied?
>
> If DB level migration required, Can you guys provide migrations scripts.
> So we can test the migration scenarios.
>
> --
> Asanka Vithanage
> Senior Software Engineer -QA
> Mobile: +94 0716286708
> Email: asan...@wso2.com
> WSO2 Inc. www.wso2.com
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Viraj Senevirathne
Software Engineer; WSO2, Inc.

Mobile : +94 71 958 0269
Email : vir...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [UUF] Convert an array to a javascript string array in nashorn.

2016-06-15 Thread Manuranga Perera
Hi Sudarma, Hemika,
I have started documenting these practices [1]
Please point me to any problem arias and your personal finding that you
think are import, so I can add them to the doc.


[1] https://docs.wso2.com/display/UUF100/Code+Review

On Wed, Jun 15, 2016 at 11:01 AM, Manuranga Perera  wrote:

> Hi Sudharma,
> In your case, please try to make a view-model, and actually render the
> view-model using HBS the normal way.
>
> func onRequest(){
>   var myForm = ...;  // eg: [{"name": "string"}, {"id": "number" }]
>   ...
>
>   return toViewModel(myForm);
> }
>
> func toViewModel(formModel){
>   var viewModel = {element: []};
>   for (var key in formModel) {
> if(...){
>   ...
>   viewModel.elements.push(...)
> }
>   }
>   return viewModel;  // eg: {"element: [{"isInput":true,"id":"name",
> "label": "Name", "type", "text"}, ...]}
> }
>
>
> 
>   {{each element}}
>  {{#if isInput}}
>  {{label}}
>  
>  {{/if}}
>  {{#if isTextAria}}
>  ...
>  {{/if}}
>  ...
>   {{/each}}
> 
>
>
> Hi Sajith,Rasika,
>
> We may need to "bake-in" the idea of a view-model to the framework.
>
> On Mon, Jun 13, 2016 at 7:24 AM, Sudharma Subasinghe 
> wrote:
>
>> There was a case to generate dynamic form using string such as
>> "."  and I had to use {{{ }}} to generate the form
>> dynamically.
>>
>> Hence need a function to resolve this also.
>>
>> On Fri, Jun 10, 2016 at 9:07 PM, Ayoma Wijethunga  wrote:
>>
>>> +1 for not using "{{{".
>>>
>>> We will further check on adding such patterns ("{{{ * }}}") in planned
>>> Jenkins based automated security scans (static code analysis).
>>>
>>> On Fri, Jun 10, 2016 at 8:47 PM, SajithAR Ariyarathna >> > wrote:
>>>
 +1 for abandoning "{{{"

 toClent("fromBackend.protocols", protocols);

 We can implement this in the next milestone.

 On Fri, Jun 10, 2016 at 8:12 PM, Manuranga Perera 
 wrote:

> These are mistakes we have already made in our old systems, let's not
> repeat them
>
> 1) Please DO NOT use "{{{", it introduces SECURITY VULNERABILITIES,
> Sajith,Rasika we need to introduce a new function. Don't even tell
> people about "{{{"
> in backend JS, Hemika should be able to do the following
>
> toClent("fromBackend.protocols", protocols);
>
> and in frontend, he should be able to just
> console.log(fromBackend.protocols) and see the json
> Given the cost of this kind of vulnerabilities, I don't think we
> should even do this as a temp solution. We should safe stringify before
> sending, view source of gmail and search "var GLOBALS" and you see
> how safe json stringify works. ALL non-alpha-numeric has to be encoded 
> with
> \x. Not just " but things like < , which are normally considered safe in
> json, has to be encoded [1].
>
> 2) We shouldn't manually iterating to convert to JSON. This just adds
> unnecessary boilerplate work dev has to do. If we implement (1) we don't
> need this for now. So we can discuss this later. But also see [2]
>
> [1] see "JavaScript Encoding" in
> https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#Output_Encoding_Rules_Summary
> [2]
> http://mail.openjdk.java.net/pipermail/nashorn-dev/2013-September/002013.html
>
> On Fri, Jun 10, 2016 at 4:46 AM, Hemika Kodikara 
> wrote:
>
>> Also please note that I used JSON.stringify method in server side js.
>>
>> Hemika Kodikara
>> Software Engineer
>> WSO2 Inc.
>> lean . enterprise . middleware
>> http://wso2.com
>>
>> Mobile : +9477762
>>
>> On Fri, Jun 10, 2016 at 2:13 PM, Hemika Kodikara 
>> wrote:
>>
>>> Thanks Rasika for the solution.
>>>
>>> In the client side JS, have the following code :
>>>
>>> 
>>> var protocols = *{{{protocols}}}*;
>>> $.each(protocols, function(index, value) {
>>>
>>> $('#queue-subscription-protocols').append($('

Re: [Dev] [UUF] Convert an array to a javascript string array in nashorn.

2016-06-15 Thread Manuranga Perera
Hi Sudharma,
In your case, please try to make a view-model, and actually render the
view-model using HBS the normal way.

func onRequest(){
  var myForm = ...;  // eg: [{"name": "string"}, {"id": "number" }]
  ...

  return toViewModel(myForm);
}

func toViewModel(formModel){
  var viewModel = {element: []};
  for (var key in formModel) {
if(...){
  ...
  viewModel.elements.push(...)
}
  }
  return viewModel;  // eg: {"element: [{"isInput":true,"id":"name",
"label": "Name", "type", "text"}, ...]}
}



  {{each element}}
 {{#if isInput}}
 {{label}}
 
 {{/if}}
 {{#if isTextAria}}
 ...
 {{/if}}
 ...
  {{/each}}



Hi Sajith,Rasika,

We may need to "bake-in" the idea of a view-model to the framework.

On Mon, Jun 13, 2016 at 7:24 AM, Sudharma Subasinghe 
wrote:

> There was a case to generate dynamic form using string such as
> "."  and I had to use {{{ }}} to generate the form
> dynamically.
>
> Hence need a function to resolve this also.
>
> On Fri, Jun 10, 2016 at 9:07 PM, Ayoma Wijethunga  wrote:
>
>> +1 for not using "{{{".
>>
>> We will further check on adding such patterns ("{{{ * }}}") in planned
>> Jenkins based automated security scans (static code analysis).
>>
>> On Fri, Jun 10, 2016 at 8:47 PM, SajithAR Ariyarathna 
>> wrote:
>>
>>> +1 for abandoning "{{{"
>>>
>>> toClent("fromBackend.protocols", protocols);
>>>
>>> We can implement this in the next milestone.
>>>
>>> On Fri, Jun 10, 2016 at 8:12 PM, Manuranga Perera  wrote:
>>>
 These are mistakes we have already made in our old systems, let's not
 repeat them

 1) Please DO NOT use "{{{", it introduces SECURITY VULNERABILITIES,
 Sajith,Rasika we need to introduce a new function. Don't even tell
 people about "{{{"
 in backend JS, Hemika should be able to do the following

 toClent("fromBackend.protocols", protocols);

 and in frontend, he should be able to just
 console.log(fromBackend.protocols) and see the json
 Given the cost of this kind of vulnerabilities, I don't think we should
 even do this as a temp solution. We should safe stringify before sending,
 view source of gmail and search "var GLOBALS" and you see how safe
 json stringify works. ALL non-alpha-numeric has to be encoded with \x. Not
 just " but things like < , which are normally considered safe in json, has
 to be encoded [1].

 2) We shouldn't manually iterating to convert to JSON. This just adds
 unnecessary boilerplate work dev has to do. If we implement (1) we don't
 need this for now. So we can discuss this later. But also see [2]

 [1] see "JavaScript Encoding" in
 https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#Output_Encoding_Rules_Summary
 [2]
 http://mail.openjdk.java.net/pipermail/nashorn-dev/2013-September/002013.html

 On Fri, Jun 10, 2016 at 4:46 AM, Hemika Kodikara 
 wrote:

> Also please note that I used JSON.stringify method in server side js.
>
> Hemika Kodikara
> Software Engineer
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +9477762
>
> On Fri, Jun 10, 2016 at 2:13 PM, Hemika Kodikara 
> wrote:
>
>> Thanks Rasika for the solution.
>>
>> In the client side JS, have the following code :
>>
>> 
>> var protocols = *{{{protocols}}}*;
>> $.each(protocols, function(index, value) {
>>
>> $('#queue-subscription-protocols').append($('

Re: [Dev] [EMM] Why we are using 404 for "No Content" responses ?

2016-06-15 Thread Manuranga Perera
Seems like the bigger issue here is that resource collection is not being
 a path parameter.

/devices/type=android -> not ideal, there is no good way to distinguish
non-existing types
/devices/android -> seems to be more REST like

On Wed, Jun 15, 2016 at 5:17 AM, Joseph Fonseka  wrote:

> Hi All
>
> In AM what we practice is that collection resource will return 200 Ok with
> an empty body ( empty array in JSON  ) if the collection or query result is
> empty.
>
> IMO the key is 200 status denote the sent result is valid and you use the
> empty body to convey the collection / query result is empty.
>
> For resources like /devices/{Id} will return 404 if the resource is not
> found.
>
> Regards
> Jo
>
>
> On Wed, Jun 15, 2016 at 12:26 PM, Chathura Dilan 
> wrote:
>
>> ​Yes
>>
>> Take an API like /devices and if there are no records in it, return an
>> empty array. In this case the collection there is empty but it does exist.
>> So we cannot return 404 and use 200 instead.
>> If it is an single resource like devices/{deviceId} and if it is not
>> found return 404, because it does not exist.
>>
>>
>> On Wed, Jun 15, 2016 at 11:42 AM, Ruwan Yatawara  wrote:
>>
>>> However, as per the implementation, since what is drawn from '/devices'
>>> is a list of resources.. and not an individual device. I believe a 200 ok
>>> with an empty set is acceptable.
>>>
>>>
>>> Thanks and Regards,
>>>
>>> Ruwan Yatawara
>>>
>>> Associate Technical Lead,
>>> WSO2 Inc.
>>>
>>> email : ruw...@wso2.com
>>> mobile : +94 77 9110413
>>> blog : http://ruwansrants.blogspot.com/
>>>   https://500px.com/ruwan_ace
>>> www: :http://wso2.com
>>>
>>>
>>> On Wed, Jun 15, 2016 at 11:26 AM, Ruwan Yatawara 
>>> wrote:
>>>
 In the devices example that's used, it is my opinion that the device
 that you are trying to locate is the resource, "/devices" is merely the
 context. Therefore if a resource cannot be located a 404 no content is
 acceptable. However, when looking at things from a AJAX request
 perspective, this kind of scenario become tricky to handle.

 Even when I started on working on the UI stabilisation effort, i
 thought 204 was the way to go, however upon further reading and looking at
 things from aforementioned perspective, IMHO 404 seems the right response
 to return when a resource is not found.

 Thanks and Regards,

 Ruwan Yatawara

 Associate Technical Lead,
 WSO2 Inc.

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://ruwansrants.blogspot.com/
   https://500px.com/ruwan_ace
 www: :http://wso2.com


 On Wed, Jun 15, 2016 at 11:15 AM, Rasika Perera 
 wrote:

> ​Hi All,
> ​
>
>
>> I think that even though it is a single resource or a collection it
>> should not be handled differently. if there is no resource behind the URI
>> then it should be 404.
>
> ​-1. "/devices" is your resource in this case. and it is a
> *collection*.​
> ​ Query components are for retrieval of non-hierarchical data
> .  You should not use the query string to identify a *single*
> resource. "?type={platform}" is not a part of your resources hierarchy.​
> Hence returning 404 may convey that "/devices" is non-existant and client
> should not try "/devices" on proceeding requests.
>
> ​Thanks,
> Rasika​
>
>
>
> On Wed, Jun 15, 2016 at 10:51 AM, Geeth Munasinghe 
> wrote:
>
>>
>>
>> On Wed, Jun 15, 2016 at 10:11 AM, Ayyoob Hamza 
>> wrote:
>>
>>> I think that even though it is a single resource or a collection it
>>> should not be handled differently. if there is no resource behind the 
>>> URI
>>> then it should be 404.
>>>
>> -1,
>> AFAIK, it is an actual endpoint (URL) refers to a resource. (In case
>> of "/devices?{query_params}",  "/devices" is the resource) It does not
>> matter that resource returns an output or not. Because resource can 
>> return
>> an empty body for a request which in my opinion a valid response.
>> Furthermore returning a empty body does not mean that resource is not 
>> found
>> (404) (in case of /devices, it is there) or client has made an error with
>> the request. Empty body means that no records available in database
>> matching the filtering criteria. 404 implies a wrong message to the 
>> client,
>> which means that he has done something wrong with the request. If we send
>> 404 for empty body (returns due to no records in the database), then 
>> later
>> same request will behave differently when database has relevant data. In 
>> my
>> opinion, it should return 200 for empty body.
>>
>> According to [1] 4XX is used for client side errors.
>>
>> 

Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.6 RC3

2016-06-15 Thread Rajith Roshan
Hi all,

We are facing an issue when trying to access login page of publisher and
store apps with sso enabled. We will verify this and update the thread. We
need to check whether this is due to issue in opensaml.

Thanks!
Rajith

On Mon, Jun 13, 2016 at 4:51 PM, Kalpa Welivitigoda  wrote:

> Hi Devs,
>
> This is the 3rd release candidate of WSO2 Carbon Kernel 4.4.6.
>
> This release fixes the following issues:
> https://wso2.org/jira/issues/?filter=13090
>
> Please download and test your products with kernel 4.4.6 RC3 and vote.
> Vote will be open for 72 hours or as longer as needed.
>
> ​Source and binary distribution files:​
>
> http://svn.wso2.org/repos/wso2/people/kalpaw/wso2carbon-4.4.6/wso2carbon-4.4.6-rc3.zip
>
> ​Maven staging repository:​
> http://maven.wso2.org/nexus/content/repositories/orgwso2carbon-1024/
>
> ​The tag to be voted upon:​
> https://github.com/wso2/carbon-kernel/tree/v4.4.6-rc3
>
>
> [ ] Broken - do not release (explain why)
> [ ] Stable - go ahead and release
>
> Thank you
> Carbon Team​
>
> --
> Best Regards,
>
> Kalpa Welivitigoda
> Senior Software Engineer, WSO2 Inc. http://wso2.com
> Email: kal...@wso2.com
> Mobile: +94776509215
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Socket connection closed while trying ESB connector operation.

2016-06-15 Thread Shakila Sivagnanarajah
Hi all,

I am experiencing socket connection closed exception while trying 'upload
part operation' [1] of Amazon s3 connector. In direct call, the response
comes within 5 seconds. I increased the the timeout values as below.

synapse.global_timeout_interval - 180 seconds in synapse.properties
http.socket.timeout - 180 seconds in passthru-http.properties
http.socket.timeout.receiver - 180 seconds in nhttp.properties

After this tuning also, no improvement. It waits for nearly 21 seconds. But
not receiving the response from API. [2] is the message I get.

Finally I set the endpoint timeout [3] also. But the result is same.

[1]
http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html


[2]

RequestTimeout
Your socket connection to the server was not read from or
written to within the timeout period. Idle connections will be
closed.
7223E45B22E88E80

cH2RE4IG7QhmiN1Bpqw6/bweEKowmtXS+jFwJkzay/3u3MovuutgtzAXM37tpXuzCl23HxAYuZIF1rLGLuJxvh4GRAu6891c


[3]




18
fault





[4] Template:

http://ws.apache.org/ns/synapse;>


























Thank you
-- 
Shakila Sivagnanarajah
Software Engineer
Mobile :+94 (0) 768 856837
shak...@wso2.com
WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Eliminate multiple login attempts and block users - APIM 1.7

2016-06-15 Thread Omindu Rathnaweera
Hi Yasith,

AFAIK this is not available in APIM OOB. However, you can try installing
the Identity Management features to APIM.

- In APIM management console go to Home > Configure > Features and add a
feature repository as mentioned in [1]. You can give [2] as the URL.
- Once it's done, click on 'Find features'.
- From the available features lists,  expand 'Identity Server 5.0.0',
select 'Identity Management' and 'Install'.
- Restart the server.
- You can configure account locking as you have done in IS.

Hope this helps.

[1] -
https://docs.wso2.com/display/Carbon420/Managing+the+Feature+Repository
[2] - http://product-dist.wso2.com/p2/carbon/releases/turing/

Regards,
Omindu.

On Wed, Jun 15, 2016 at 5:48 PM, Yasith Lokuge  wrote:

> Hi,
>
> I need to block the users after multiple login attempts. I was able do it
> in IS but I couldn't find the identity-mgt.properties file in APIM 1.7
> Please let me know the steps I should follow in order achieve that task.
>
> Regards
> --
> Yasith Lokuge
>
> Software Engineer
> M: +94 7713 53682 | E: yas...@wso2telco.com
> W: www.yasith.me
>
> WSO2.Telco Inc.
> Level 4,
> 20, Palm Grove, Colombo 03
> Sri Lanka.
> www.wso2telco.com
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Omindu Rathnaweera
Software Engineer, WSO2 Inc.
Mobile: +94 771 197 211
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [EMM] Why we are using 404 for "No Content" responses ?

2016-06-15 Thread Geeth Munasinghe
On Wed, Jun 15, 2016 at 10:11 AM, Ayyoob Hamza  wrote:

> I think that even though it is a single resource or a collection it should
> not be handled differently. if there is no resource behind the URI then it
> should be 404.
>
-1,
AFAIK, it is an actual endpoint (URL) refers to a resource. (In case of
"/devices?{query_params}",  "/devices" is the resource) It does not matter
that resource returns an output or not. Because resource can return an
empty body for a request which in my opinion a valid response. Furthermore
returning a empty body does not mean that resource is not found (404) (in
case of /devices, it is there) or client has made an error with the
request. Empty body means that no records available in database matching
the filtering criteria. 404 implies a wrong message to the client, which
means that he has done something wrong with the request. If we send 404 for
empty body (returns due to no records in the database), then later same
request will behave differently when database has relevant data. In my
opinion, it should return 200 for empty body.

According to [1] 4XX is used for client side errors.

[1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Thanks
Geeth

>
> However this could be subjective so have to delve into our rest guidelines
> to make a decision on it.
>
> [Adding Frank and Joe]
>
> *Ayyoob Hamza*
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>
> On Wed, Jun 15, 2016 at 8:47 AM, Rasika Perera  wrote:
>
>> For example, /devices/{device-id} is a URI. Hence, by the time client
>>> makes a request for a non-existing device id, that results in a URI that
>>> could not be found and returning a 404 for that is perfectly valid.
>>
>> ​+1
>>
>> But if we take an example like this, /devices?type={platform}, here the
>>> URI is /devices. If we return a 404 here at any instance, what it simply
>>> means is that the requested URI (/devices) could not be found in the server
>>> and should not be used anymore which is wrong. It's a defined resource
>>> collection that can exist in the server with 0 to many items.
>>
>> ​Yes, In this case, I prefer a empty list with HTTP 200 is more intuitive
>> and reduces complexities at the client side processing(i.e. if-check for
>> 204).
>>
>> The query component contains non-hierarchical data
>> ​. ​
>> "/devices"​ will give you all devices. "/devices?type=non-existent-type"
>> will return empty list of devices since no matching device exist. Simply
>> your filtering criteria haven't met any device.
>>
>> On Wed, Jun 15, 2016 at 7:22 AM, Dilan Udara Ariyaratne 
>> wrote:
>>
>>> I also think that Geeth is making a valid point here and it makes sense
>>> in practice.
>>>
>>> According to the w3c specification on status codes,
>>> 4XX http status code range is totally reserved for client errors and 404
>>> is specifically returned when the requested "URI" could not be found in the
>>> server.
>>>
>>> For example, /devices/{device-id} is a URI. Hence, by the time client
>>> makes a request for a non-existing device id, that results in a URI that
>>> could not be found and returning a 404 for that is perfectly valid.
>>>
>>> But if we take an example like this, /devices?type={platform}, here the
>>> URI is /devices. If we return a 404 here at any instance, what it simply
>>> means is that the requested URI (/devices) could not be found in the server
>>> and should not be used anymore which is wrong. It's a defined resource
>>> collection that can exist in the server with 0 to many items.
>>>
>>> Therefore, in such instances where we do not query for exact resources,
>>> but for a possible collection of resources in the server using query
>>> parameters, it's much better to return an empty set with a 200 rather than
>>> a 404 if there exist zero items by the time of request.
>>>
>>> Cheers,
>>> Dilan.
>>>
>>> On Wednesday, June 15, 2016, Kamidu Punchihewa 
>>> wrote:
>>>
 Hi All,

 Agreed with Geeth and Harshan, When it come to the OOB User interface
 of EMM the request with an 404 is detect as an error and your is prompted
 with an error message since the error handling is handling in a Central
 controller witch acts in general so if there are no error occurred in the
 sever side best approach not to return status code in 400 - 499 range.

 Thanks & Best Regards,

 Kamidu Sachith Punchihewa
 *Software Engineer*
 WSO2, Inc.
 lean . enterprise . middleware
 Mobile : +94 (0) 770566749 <%2B94%20%280%29%20773%20451194>


 Disclaimer: This communication may contain privileged or other
 confidential information and is intended exclusively for the addressee/s.
 If you are not the intended recipient/s, or believe that you may have
 received this communication in error, please reply to the sender indicating
 that fact and 

Re: [Dev] Error with MePIN Authenticator

2016-06-15 Thread Kesavan Yogarajah
Hi Harri,

I didn't see any deviations. Since they running locally their configuration
is correct.

#The URL of the SAML 2.0 Identity Provider
SAML.IdPUrl=https://localhost:9443/samlsso

Could you please share the screenshot of your identity provider
configuration ?.

Thanks

Kesavan Yogarajah
Software Engineer
Mobile :+94 (0) 779 758021
kesav...@wso2.com
WSO2, Inc.
lean . enterprise . middleware

On Wed, Jun 15, 2016 at 2:29 PM, Harri Salminen 
wrote:

> Hello,
>
> I attached customers configuration. Do you see some deviations ?
>
> Customer indicated:
>
> "Everything are installed locally and on the same PC.
> I’ve checked travelocity.com/WEB-INF/classes/travelocity.properties file,
> and did not see SAML2.IdPURL property."
>
>
>
> thank you very much for your time !
>
> Harri Salminen
> Software Engineer
> MePIN / Meontrust inc.
> har...@meontrust.com
> +358447779197
>
>
>
> On 15 Jun 2016, at 11:15, Kesavan Yogarajah  wrote:
>
> Hi Harri,
>
> Since we run the server locally we set the callback url as
> https://localhost:9443/commonauth.
> Are you running the server locally?. If the Identity Server is running on
> a different hostname/port number please change the property accordingly and
> also SAML2.IdPURL property in the /webapps/
> travelocity.com/WEB-INF/classes/travelocity.properties file should be
> changed accordingly.
>
> Thanks
>
> Kesavan Yogarajah
> Software Engineer
> Mobile :+94 (0) 779 758021
> kesav...@wso2.com
> WSO2, Inc.
> lean . enterprise . middleware
>
> On Wed, Jun 15, 2016 at 12:54 PM, Harri Salminen 
> wrote:
>
>> Hello Kesavan,
>>
>> we received this log. Do you see something specific which would indicate
>> what has gone wrong ? The red color emphasis is from customer.
>>
>> Thanks a lot for your help !
>>
>>
>> Here are *wso2carbon.log* after enable debug log level (when login from
>> example app using MePIN).
>>
>> “
>> …
>> : [-1234] [] [2016-06-15 08:48:01,623] DEBUG
>> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -
>> Authenticating user admin
>> TID: [-1234] [] [2016-06-15 08:48:01,623] DEBUG
>> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Cache hit.
>> Using DN uid=admin,ou=Users,dc=WSO2,dc=ORG
>> TID: [-1234] [] [2016-06-15 08:48:01,675] DEBUG
>> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  User:
>> uid=admin,ou=Users,dc=WSO2,dc=ORG is authnticated: true
>> TID: [-1234] [] [2016-06-15 08:48:01,675] DEBUG
>> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Searching
>> for user admin
>> TID: [-1234] [] [2016-06-15 08:48:01,675] DEBUG
>> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  value
>> after escaping special characters in admin : admin
>> TID: [-1234] [] [2016-06-15 08:48:01,678] DEBUG
>> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Searching
>> for user with SearchFilter: (&(objectClass=person)(uid=admin)) in
>> SearchBase:
>> TID: [-1234] [] [2016-06-15 08:48:01,681] DEBUG
>> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Name in
>> space for admin is uid=admin,ou=Users,dc=WSO2,dc=ORG
>> TID: [-1234] [] [2016-06-15 08:48:01,682] DEBUG
>> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  User:
>> admin exist: true
>> TID: [-1234] [] [2016-06-15 08:48:01,689] DEBUG
>> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Searching
>> for user with SearchFilter: (&(objectClass=person)(uid=admin)) in
>> SearchBase:
>> TID: [-1234] [] [2016-06-15 08:48:01,689] DEBUG
>> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Requesting
>> attribute :active
>> TID: [-1234] [] [2016-06-15 08:48:01,693] DEBUG
>> {org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler}
>> -  BasicAuthenticator returned: SUCCESS_COMPLETED
>> TID: [-1234] [] [2016-06-15 08:48:01,693] DEBUG
>> {org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler}
>> -  Step 1 is completed. Going to get the next one.
>> TID: [-1234] [] [2016-06-15 08:48:01,694] DEBUG
>> {org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler}
>> -  Starting Step: 2
>> TID: [-1234] [] [2016-06-15 08:48:01,694] DEBUG
>> {org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils}
>> -  Finding already authenticated IdPs of the Step
>> TID: [-1234] [] [2016-06-15 08:48:01,694] DEBUG
>> {org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler}
>> -  Step contains only a single IdP. Going to call it directly
>> TID: [-1234] [] [2016-06-15 08:48:01,694] DEBUG
>> {org.wso2.carbon.identity.application.authentication.framework.config.ConfigurationFacade}
>> -  Trying to find the IdP for name: mePIN
>> TID: [-1234] [] [2016-06-15 08:48:01,695] DEBUG
>> 

[Dev] [APIM] Eliminate multiple login attempts and block users - APIM 1.7

2016-06-15 Thread Yasith Lokuge
Hi,

I need to block the users after multiple login attempts. I was able do it
in IS but I couldn't find the identity-mgt.properties file in APIM 1.7
Please let me know the steps I should follow in order achieve that task.

Regards
-- 
Yasith Lokuge

Software Engineer
M: +94 7713 53682 | E: yas...@wso2telco.com
W: www.yasith.me

WSO2.Telco Inc.
Level 4,
20, Palm Grove, Colombo 03
Sri Lanka.
www.wso2telco.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Execution plans using analytics event tables not getting deployed

2016-06-15 Thread Nirmal Fernando
This is due to a conflict of com.google.common.cache imports in Siddhi-core
and analytics event table, bundles.

I have fixed this in https://github.com/wso2/carbon-analytics/pull/189

On Wed, Jun 15, 2016 at 1:12 PM, Fazlan Nazeem  wrote:

> Hi Mohan,
>
> API-M analytics execution plans which are using analytics event tables are
> not getting deployed due to an error as follows
>
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> [2016-06-15 07:15:44,680] ERROR
> {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService}
> -  Exception occurred while trying to deploy the Execution Plan
> configuration file :
> APIMAnalytics-HealthAvailabilityPerMin.siddhiql,org.wso2.carbon.event.processor.core.exception.ExecutionPlanConfigurationException:
> No extension exist for AttributeFunction{extensionName='eventtable',
> functionName='analytics.table', parameters=[]}
>
> Has there been any change in carbon-event-processing 2.0.13-SNAPSHOT that
> caused this?
>
> --
> Thanks & Regards,
>
> Fazlan Nazeem
>
> *Software Engineer*
>
> *WSO2 Inc*
> Mobile : +94772338839
> <%2B94%20%280%29%20773%20451194>
> fazl...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: GSOC2016: [ML][CEP] Predictive analytic with online data for WSO2 Machine Learner

2016-06-15 Thread Mahesh Dananjaya
Hi Maheshakya,
I pushed the StreamingLinearRegression modules into my forked carbon-ml
repo at branch wso2_gsoc_ml6_cml [1]. I am working on persisting
model.thank you.
Mahesh.
[1] https://github.com/dananjayamahesh/carbon-ml

On Tue, Jun 14, 2016 at 5:56 PM, Mahesh Dananjaya  wrote:

> yes
> you should develop in tha fork repo
> clone your forked repo
> then go into that
> then add upstream repo as original wso2 repo
> see the remote tracking branchs by
> git remote -v
> you will see the origin as your forked repo
> to add upstream
> git remote add upstream 
> when you change something create a new branch by
> git checkout -b new_branch_name
> then add and commit to this branch
> after that push to the forked by
> git push origin new_branch_name
>
> On Tue, Jun 14, 2016 at 5:32 PM, Mahesh Dananjaya <
> dananjayamah...@gmail.com> wrote:
>
>> Hi Maheshakya,
>> the above error is due to a simple mistake of not providing my local p2
>> repo.Now it is working and i debugged the StreamingLinearRegression model
>> cep.
>> regards,
>> Mahesh.
>>
>> On Tue, Jun 14, 2016 at 3:19 PM, Mahesh Dananjaya <
>> dananjayamah...@gmail.com> wrote:
>>
>>> Hi Maheshakya,
>>> I did what you recommend. But when i am adding the query the following
>>> error is appearing.
>>> No extension exist for StreamFunctionExtension{namespace='ml'} in
>>> execution plan "NewExecutionPlan"
>>>
>>> *My query is as follows,
>>> @Import('LinRegInput:1.0.0')
>>> define stream LinRegInput (salary double, rbi double, walks double,
>>> strikeouts double, errors double);
>>>
>>> @Export('LinRegOutput:1.0.0')
>>> define stream LinRegOutput (mse double);
>>>
>>> from LinRegInput#ml:streamlinreg(0, 2, 100, 0.0001, 1.0, 0.95,
>>> salary, rbi, walks, strikeouts, errors)
>>> select *
>>> insert into mse;
>>>
>>> I have added my files as follows,
>>>
>>> org.wso2.carbon.ml.siddhi.extension.streaming.StreamingLinearRegression;
>>> org.wso2.carbon.ml.siddhi.extension.streaming.algorithm.StreamingLinearModel;
>>>
>>> and add following lines to ml.siddhiext
>>>
>>> streamlinreg=org.wso2.carbon.ml.siddhi.extension.streaming.StreamingLinearRegressionStreamProcessor
>>>
>>> .Then i build the carbon-ml. The replace the jar file you asked me
>>> replace with the name changed.any thoughts?
>>> regards,
>>> Mahesh.
>>>
>>> On Tue, Jun 14, 2016 at 2:43 PM, Maheshakya Wijewardena <
>>> mahesha...@wso2.com> wrote:
>>>
 Hi Mahesh,

 You don't need to add new p2 repo.
 In the /repository/components/plugins folder, you will find
 org.wso2.carbon.ml.siddhi.extension_some_version.jar. Replace this with
 carbon-ml/components/extensions/org.wso2.carbon.ml.siddhi.extension/target/org.wso2.carbon.ml.siddhi.extension-1.1.2-SNAPSHOT.jar.
 First rename this jar in the target folder to the jar name in the plugins
 folder then replace (Make sure, otherwise will not work).
 Your updates will be there in the CEP after this.

 Best regards.

 On Tue, Jun 14, 2016 at 2:37 PM, Mahesh Dananjaya <
 dananjayamah...@gmail.com> wrote:

> Hi Maheshakya,
> Do i need to add p2 local repos of ML into CEP after i made changes to
> ml extensions. Or will it be automatically updated. I am trying to debug 
> my
> extension with the cep.thank you.
> regards,
> Mahesh.
>
> On Tue, Jun 14, 2016 at 1:57 PM, Maheshakya Wijewardena <
> mahesha...@wso2.com> wrote:
>
>> Mahesh when you add your work to carbon-ml follow the bellow
>> guidelines, it will help to keep the code clean.
>>
>>
>>- Add only the sources code file you have newly added or changed.
>>- Do not use add . (add all) command in git. Only use add filename
>>
>> I have seen in your gsoc repo that there are gitignore files, idea
>> related files and the target folder is there. These should not be in the
>> source code, only the source files you add.
>>
>>- Commit when you have done some major activity. Do not add
>>commits always when you make a change.
>>
>>
>> On Tue, Jun 14, 2016 at 12:22 PM, Mahesh Dananjaya <
>> dananjayamah...@gmail.com> wrote:
>>
>>> Hi Maheshakya,
>>> May i seperately put the classes to ml and extensions in
>>> carbon-core. I can put Streaming Extensions to extensions and
>>> Algorithms/StreamingLinear Regression and StreamingKMeans in ml core. 
>>> what
>>> is the suitable format. I will commit my changes today as seperate 
>>> branch
>>> in my forked carbon-ml local repo.thank you.
>>> regards,
>>> Mahesh.
>>> p.s: better if you can meet me via hangout.
>>>
>>
>>
>>
>> --
>> Pruthuvi Maheshakya Wijewardena
>> mahesha...@wso2.com
>> +94711228855
>>
>>
>>
>


 --
 Pruthuvi Maheshakya Wijewardena
 mahesha...@wso2.com
 +94711228855



>>>
>>
>

Re: [Dev] [EMM] Why we are using 404 for "No Content" responses ?

2016-06-15 Thread Joseph Fonseka
Hi All

In AM what we practice is that collection resource will return 200 Ok with
an empty body ( empty array in JSON  ) if the collection or query result is
empty.

IMO the key is 200 status denote the sent result is valid and you use the
empty body to convey the collection / query result is empty.

For resources like /devices/{Id} will return 404 if the resource is not
found.

Regards
Jo


On Wed, Jun 15, 2016 at 12:26 PM, Chathura Dilan  wrote:

> ​Yes
>
> Take an API like /devices and if there are no records in it, return an
> empty array. In this case the collection there is empty but it does exist.
> So we cannot return 404 and use 200 instead.
> If it is an single resource like devices/{deviceId} and if it is not found
> return 404, because it does not exist.
>
>
> On Wed, Jun 15, 2016 at 11:42 AM, Ruwan Yatawara  wrote:
>
>> However, as per the implementation, since what is drawn from '/devices'
>> is a list of resources.. and not an individual device. I believe a 200 ok
>> with an empty set is acceptable.
>>
>>
>> Thanks and Regards,
>>
>> Ruwan Yatawara
>>
>> Associate Technical Lead,
>> WSO2 Inc.
>>
>> email : ruw...@wso2.com
>> mobile : +94 77 9110413
>> blog : http://ruwansrants.blogspot.com/
>>   https://500px.com/ruwan_ace
>> www: :http://wso2.com
>>
>>
>> On Wed, Jun 15, 2016 at 11:26 AM, Ruwan Yatawara  wrote:
>>
>>> In the devices example that's used, it is my opinion that the device
>>> that you are trying to locate is the resource, "/devices" is merely the
>>> context. Therefore if a resource cannot be located a 404 no content is
>>> acceptable. However, when looking at things from a AJAX request
>>> perspective, this kind of scenario become tricky to handle.
>>>
>>> Even when I started on working on the UI stabilisation effort, i thought
>>> 204 was the way to go, however upon further reading and looking at things
>>> from aforementioned perspective, IMHO 404 seems the right response to
>>> return when a resource is not found.
>>>
>>> Thanks and Regards,
>>>
>>> Ruwan Yatawara
>>>
>>> Associate Technical Lead,
>>> WSO2 Inc.
>>>
>>> email : ruw...@wso2.com
>>> mobile : +94 77 9110413
>>> blog : http://ruwansrants.blogspot.com/
>>>   https://500px.com/ruwan_ace
>>> www: :http://wso2.com
>>>
>>>
>>> On Wed, Jun 15, 2016 at 11:15 AM, Rasika Perera 
>>> wrote:
>>>
 ​Hi All,
 ​


> I think that even though it is a single resource or a collection it
> should not be handled differently. if there is no resource behind the URI
> then it should be 404.

 ​-1. "/devices" is your resource in this case. and it is a
 *collection*.​
 ​ Query components are for retrieval of non-hierarchical data
 .  You should not use the query string to identify a *single* resource.
 "?type={platform}" is not a part of your resources hierarchy.​ Hence
 returning 404 may convey that "/devices" is non-existant and client should
 not try "/devices" on proceeding requests.

 ​Thanks,
 Rasika​



 On Wed, Jun 15, 2016 at 10:51 AM, Geeth Munasinghe 
 wrote:

>
>
> On Wed, Jun 15, 2016 at 10:11 AM, Ayyoob Hamza 
> wrote:
>
>> I think that even though it is a single resource or a collection it
>> should not be handled differently. if there is no resource behind the URI
>> then it should be 404.
>>
> -1,
> AFAIK, it is an actual endpoint (URL) refers to a resource. (In case
> of "/devices?{query_params}",  "/devices" is the resource) It does not
> matter that resource returns an output or not. Because resource can return
> an empty body for a request which in my opinion a valid response.
> Furthermore returning a empty body does not mean that resource is not 
> found
> (404) (in case of /devices, it is there) or client has made an error with
> the request. Empty body means that no records available in database
> matching the filtering criteria. 404 implies a wrong message to the 
> client,
> which means that he has done something wrong with the request. If we send
> 404 for empty body (returns due to no records in the database), then later
> same request will behave differently when database has relevant data. In 
> my
> opinion, it should return 200 for empty body.
>
> According to [1] 4XX is used for client side errors.
>
> [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
>
> Thanks
> Geeth
>
>>
>> However this could be subjective so have to delve into our rest
>> guidelines to make a decision on it.
>>
>> [Adding Frank and Joe]
>>
>> *Ayyoob Hamza*
>> *Software Engineer*
>> WSO2 Inc.; http://wso2.com
>> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>>
>> On Wed, Jun 15, 2016 at 8:47 AM, Rasika Perera 

Re: [Dev] [GSOC 16] Initial Project Progress

2016-06-15 Thread Osura Rathnayake
Hi Mentors,

As we discussed at the very beginning, next in line is to see how each of
the following can be setup on Azure using native features:

   - Auto healing
   - Autoscaling
   - Dynamic load balancing
   - Centralized logging
   - Monitoring
   - Metering

For auto healing, we can implement it in both VM level and application
level. In VM level, we can poll for VM statuses and check if a given VM is
down or not. And then we can up them if they have gone down, using api
calls. for application level of course we will have to run a shell script
to determine the status of a given application and will have to up it
accordingly. I'm looking forward to hear from you regarding this.

thanks,

On Mon, Jun 13, 2016 at 10:53 AM, Osura Rathnayake 
wrote:

> Hi Isuru,
>
> Can you please tell me when you would be free to have a hangout to do a
> code review and discuss next project goals?
>
> Thanks,
>
> On Saturday, June 11, 2016, Osura Rathnayake  wrote:
>
>> Hi Isuru,
>>
>> Thank you very much.
>> Yes there was a misconfiguration in registry mounts and now it works
>> properly.
>> Okay will have a code review next week.
>>
>>
>> On Fri, Jun 10, 2016 at 9:45 AM, Isuru Haththotuwa 
>> wrote:
>>
>>> Hi Osura,
>>>
>>> This is great progress! This shows that a clustered deployment of WSO2
>>> products on Azure is possible with this membership scheme.
>>>
>>> About the error, what is says is that a particular resource that the
>>> first node is expecting to find in the config registry is not found. This
>>> can be due to a mis-configured registry mounts. Did you mount the config
>>> and governance registries? If not please do so by referring [1].
>>>
>>> Lets schedule a code review early next week for the membership scheme.
>>>
>>> [1]. https://docs.wso2.com/display/CLUSTER44x/Setting+up+the+Database
>>>
>>> On Fri, Jun 10, 2016 at 12:42 AM, Osura Rathnayake 
>>> wrote:
>>>
 Hi Mentors,

 I have two application servers (AS) running on azure and I'm testing
 the azure membership scheme on them. When I run the first AS I could see
 member added and member joined log messages. And when I run the second AS,
 I could see member added log messages and then I get an error saying carbon
 initialization failed (screenshot attached as error6). Also when I stopped
 the second AS I could see member left log message on the first AS(
 screenshot attached as Capture1).

 Afterwards I stopped both of them and started the second AS first and
 it ran without errors but the other AS( previous case I started this AS
 first) showed up the same error which I got earlier. I'm getting this error
 always from the secondly started AS. Please share with me if you have any
 idea why I'm getting this.

 Thanks,

 On Mon, Jun 6, 2016 at 4:16 PM, Osura Rathnayake 
 wrote:

> Hi all,
>
> This is the summary of the matters that we discussed during hangout we
> had on 6th of June, 2016.
>
> We had a productive discussion on how to pass the azure specific
> parameters to the Azure membership scheme and how we should test the Azure
> membership scheme
>
> Current progress : Getting a list of IP addresses of members in the
> cluster and updating the hazelcast configuration are done but certain 
> azure
> specific parameters are hard coded in the program.
>
> As in kubernetes membership scheme, we agreed upon sending those
> parameters as either environment variables or system properties. So the
> next immediate goal is to get those parameters that way. As of how to test
> the azure membership scheme, [1] was shared get a more clear idea on the
> subject.
>
>
> [1]
> https://docs.wso2.com/display/KA100/Kubernetes+Membership+Scheme+for+WSO2+Carbon
>
>
> Thanks,
>
>
>
> On Mon, Jun 6, 2016 at 1:21 PM, Osura Rathnayake 
> wrote:
>
>> Hi Isuru,
>>
>> Thank you very much. Okay will have a hangout today at 3.00 pm.
>>
>> thanks,
>>
>> On Mon, Jun 6, 2016 at 10:37 AM, Isuru Haththotuwa 
>> wrote:
>>
>>> Hi Osura,
>>>
>>> You need to test the membership scheme following the same method
>>> that we use for the Kuberntes Membership scheme. Please refer the README
>>> [1]. The only difference is that you will be deploying in Azure.
>>>
>>> Please note the parameters that are added to the axis2.xml:
>>>
>>> membershipSchemeClassName, membershipScheme, KUBERNETES_MASTER,
>>> KUBERNETES_SERVICES, etc.
>>>
>>> membershipSchemeClassName is the fully qualified classname for the
>>> relevant Membership Scheme class that you have written. Carbon will try 
>>> to
>>> load that class using the class name.
>>> membershipScheme should 

Re: [Dev] [MB] [C5] Integration tests with PAX Exam.

2016-06-15 Thread Sameera Jayasoma
Hi Hemika,

I think we should not use PAX exam to implement your test case. I think
this falls under the category of integration tests. PAX Exam should be used
only to test in-container tests which you cannot test using unit tests.

Thanks,
Sameera.

On Wed, Jun 15, 2016 at 1:11 PM, Hemika Kodikara  wrote:

> Hi All,
>
> In C4, We had integration tests running in a way that the server is
> started up by the test framework and the MB test cases were done through a
> JMS client. This JMS client is completely independent from MB(has no
> dependencies from MB other than the andes client jar).
>
> For C5, How can I achieve this ? IMO, running the JMS client in an OSGi
> environment is not required. Is it possible to start and stop the server
> using pax exam per testng suite ?
>
> Is there an example on how to achieve this ? As far I see, the only task
> that needs to be done through pax exam is to start and stop the MB server
> environment.
>
> Any advice on this ?
>
> Regards,
> Hemika
>
> Hemika Kodikara
> Software Engineer
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +9477762
>



-- 
Sameera Jayasoma,
Software Architect,

WSO2, Inc. (http://wso2.com)
email: same...@wso2.com
blog: http://blog.sameera.org
twitter: https://twitter.com/sameerajayasoma
flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
Mobile: 0094776364456

Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Siddhi table join behavior

2016-06-15 Thread Mohanadarshan Vivekanandalingam
On Wed, Jun 15, 2016 at 1:47 PM, CD Athuraliya  wrote:

> Hi CEP team,
>
> HI CD,


> I'm running performance tests for an execution plan which is used to send
> session termination events for security analytics dashboard. I need to
> perform a load test for flushing an event table scenario. We have added
> another temp stream to trigger the event table flush as below. Since we
> need to measure throughput/latency for event table flushing we have
> (temporally) added current timestamp to one attribute of each event. But it
> appears that the timestamp is same for every event, which causes erroneous
> latency values. Is this the expected behavior of below Siddhi syntax? Or
> else what would be the best approach to load test a scenario like this?
> Appreciate your thoughts/comments. I'm using this consumers/publishers,
> based on these samples [1].
>
> from flushStream join EventTerminationTable
> select sessionId, time:timestampInMilliseconds(time:currentTimestamp(),
> '-MM-dd HH:mm:ss') as sessionStart, sessionRenew, sessionTermination,
> action, username, userStoreDomain, ip, tenantId, rememberFlag
> insert into TestSessionAnalyticsOutputStream;
>

As I mentioned offline, time:timestampInMilliseconds  method will be called
for every join. Since this operation if faster you couldn't see much
difference in the timestamp value, (when you have large no of events then
you can see some change in timestamp)..

Thanks,
Mohan


>
> [1] https://github.com/wso2/product-cep/tree/master/modules/samples
>
> Thanks,
> CD
>
> --
> *CD Athuraliya*
> Software Engineer
> WSO2, Inc.
> lean . enterprise . middleware
> Mobile: +94 716288847 <94716288847>
> LinkedIn  | Twitter
>  | Blog
> 
>



-- 
*V. Mohanadarshan*
*Associate Tech Lead,*
*Data Technologies Team,*
*WSO2, Inc. http://wso2.com  *
*lean.enterprise.middleware.*

email: mo...@wso2.com
phone:(+94) 771117673
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [CEP][MB][ANALYTICS][APIM] couldn't connect to the MB, Analytics Components when email user name enabled

2016-06-15 Thread Ushani Balasooriya
Hi Mohan,

This is not blocking testing as per the proposed work around. If this is
not going to be finalized in this release, we can add this in to
documentation.

Thanks,


On Wed, Jun 15, 2016 at 2:24 PM, Mohanadarshan Vivekanandalingam <
mo...@wso2.com> wrote:

>
>
> On Wed, Jun 15, 2016 at 10:44 AM, Ushani Balasooriya 
> wrote:
>
>> Hi CEP team,
>>
>> Any update on this? Should this be included in the documentation or are
>> we going to fix it as a convention?
>>
>
> @Ushani, give us sometime.. There are some other priorities that we are
> working on.. Is this something that blocks your testing ? If not, please
> give us some time.. Will respond asap..
>
> Thanks,
> Mohan
>
>>
>> Thanks,
>>
>>
>> On Tue, Jun 14, 2016 at 12:03 PM, Pamod Sylvester  wrote:
>>
>>> Hi Ushani,
>>>
>>> When email username is enabled, we need a mechanism to identify the
>>> tenant domain. Hence in that case we need to have the username defined in
>>> the following format, ad...@wso2.com@*tenantdomain. *
>>>
>>> For the case of super tenant when email username is enabled, an option
>>> could be considered to do another check to default to super tenant if a
>>> tenant domain is not specified (in order to omit suffixing with 
>>> @carbon.super).
>>> However, also note this would slightly impact performance.
>>>
>>> Also i believe we need to check with the CEP team on possibility of
>>> changing the convention.
>>>
>>> Thanks,
>>> Pamod
>>>
>>> On Tue, Jun 14, 2016 at 11:34 AM, Ushani Balasooriya 
>>> wrote:
>>>
 Hi Pamod,

 So according to this issue [1],when you enable email as username, to
 connect to decision server we have to provide domain name of the super
 tenant as e.g., ad...@wso2.com@carbon.super.

 But when email is not enabled, you can go with 'admin' as username.
 Also we do not specifically mention the domain name for super tenant.

 Shouldn't it be in the same format when providing credentials?
 Otherwise a user will be mislead with configurations. Or we need to
 specifically mention this in documentation. WDYT?

 [1] https://wso2.org/jira/browse/APIMANAGER-4987

 Thanks,
 Ushani


 On Wed, Jun 8, 2016 at 9:30 PM, Pamod Sylvester  wrote:

> Hi Tharindu,
>
> To further elaborate, AMQP connection URL is in the following format
> [1],
>
>
> *amqp://[:@][][?=''[&=&'']]*
>
> '@' character is used to partition between client credentials with the
> rest of the uri. hence having the '@' for the user name (email as user
> name) would violate the specification.
>
> As Indika explained we use '!' character as an alternative to the
> restricted character '@' to identify tenant users. Hence, when you send a
> user name as *"foo!bar.com "*  it would try to find a
> user *foo* in tenant *bar.com * instead of finding
> the user in *super tenant* by email *'f...@bar.com '*.
> That would be the possible reason for you to get the error "invalid tenant
> domain".
>
> [1]
> https://qpid.apache.org/releases/qpid-0.30/jms-client-0-8/book/JMS-Client-0-8-Connection-URL.html
>
> Thanks,
> Pamod
>
> On Wed, Jun 8, 2016 at 6:59 PM, Tharindu Dharmarathna <
> tharin...@wso2.com> wrote:
>
>> Hi All,
>>
>> In APIM 2.0 Snapshot Pack we have got issue when authenticate with
>> the CEP, DAS and MB components.
>>
>>
>> *CEP and DAS Components*
>>
>> As per the debugging session with Mohan we have found when we
>> authenticate the email user from [1] , It will not proper username with
>> tenant domain which caused to get the invalid tenant domain from [2].
>>
>> *MB Components*
>>
>>  When we do authentication request with MB it will not suppose to
>> send the email user in connection url since its a restricted character. 
>> As
>> per the Pamod pointed out we had replace the '@' mark with '!' in order 
>> to
>> overcome that issue . But this was not getting worked as correctly.
>>
>> Can any one give any clue to overcome this issue.
>>
>>
>> [1] -
>> https://github.com/wso2/carbon-analytics-common/blob/release-5.0.12-alpha/components/data-bridge/org.wso2.carbon.databridge.core/src/main/java/org/wso2/carbon/databridge/core/internal/authentication/CarbonAuthenticationHandler.java#L51
>>
>> [2] -
>> https://github.com/wso2/carbon-commons/blob/v4.4.8/components/authentication/org.wso2.carbon.identity.authentication/src/main/java/org/wso2/carbon/identity/authentication/AuthenticationServiceImpl.java#L59
>>
>>
>> --
>>
>> *Tharindu Dharmarathna*Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94779109091 <%2B94779109091>*
>>
>
>
>
> --

Re: [Dev] [CEP][MB][ANALYTICS][APIM] couldn't connect to the MB, Analytics Components when email user name enabled

2016-06-15 Thread Mohanadarshan Vivekanandalingam
On Wed, Jun 15, 2016 at 10:44 AM, Ushani Balasooriya 
wrote:

> Hi CEP team,
>
> Any update on this? Should this be included in the documentation or are we
> going to fix it as a convention?
>

@Ushani, give us sometime.. There are some other priorities that we are
working on.. Is this something that blocks your testing ? If not, please
give us some time.. Will respond asap..

Thanks,
Mohan

>
> Thanks,
>
>
> On Tue, Jun 14, 2016 at 12:03 PM, Pamod Sylvester  wrote:
>
>> Hi Ushani,
>>
>> When email username is enabled, we need a mechanism to identify the
>> tenant domain. Hence in that case we need to have the username defined in
>> the following format, ad...@wso2.com@*tenantdomain. *
>>
>> For the case of super tenant when email username is enabled, an option
>> could be considered to do another check to default to super tenant if a
>> tenant domain is not specified (in order to omit suffixing with 
>> @carbon.super).
>> However, also note this would slightly impact performance.
>>
>> Also i believe we need to check with the CEP team on possibility of
>> changing the convention.
>>
>> Thanks,
>> Pamod
>>
>> On Tue, Jun 14, 2016 at 11:34 AM, Ushani Balasooriya 
>> wrote:
>>
>>> Hi Pamod,
>>>
>>> So according to this issue [1],when you enable email as username, to
>>> connect to decision server we have to provide domain name of the super
>>> tenant as e.g., ad...@wso2.com@carbon.super.
>>>
>>> But when email is not enabled, you can go with 'admin' as username. Also
>>> we do not specifically mention the domain name for super tenant.
>>>
>>> Shouldn't it be in the same format when providing credentials? Otherwise
>>> a user will be mislead with configurations. Or we need to specifically
>>> mention this in documentation. WDYT?
>>>
>>> [1] https://wso2.org/jira/browse/APIMANAGER-4987
>>>
>>> Thanks,
>>> Ushani
>>>
>>>
>>> On Wed, Jun 8, 2016 at 9:30 PM, Pamod Sylvester  wrote:
>>>
 Hi Tharindu,

 To further elaborate, AMQP connection URL is in the following format
 [1],


 *amqp://[:@][][?=''[&=&'']]*

 '@' character is used to partition between client credentials with the
 rest of the uri. hence having the '@' for the user name (email as user
 name) would violate the specification.

 As Indika explained we use '!' character as an alternative to the
 restricted character '@' to identify tenant users. Hence, when you send a
 user name as *"foo!bar.com "*  it would try to find a
 user *foo* in tenant *bar.com * instead of finding the
 user in *super tenant* by email *'f...@bar.com '*. That
 would be the possible reason for you to get the error "invalid tenant
 domain".

 [1]
 https://qpid.apache.org/releases/qpid-0.30/jms-client-0-8/book/JMS-Client-0-8-Connection-URL.html

 Thanks,
 Pamod

 On Wed, Jun 8, 2016 at 6:59 PM, Tharindu Dharmarathna <
 tharin...@wso2.com> wrote:

> Hi All,
>
> In APIM 2.0 Snapshot Pack we have got issue when authenticate with the
> CEP, DAS and MB components.
>
>
> *CEP and DAS Components*
>
> As per the debugging session with Mohan we have found when we
> authenticate the email user from [1] , It will not proper username with
> tenant domain which caused to get the invalid tenant domain from [2].
>
> *MB Components*
>
>  When we do authentication request with MB it will not suppose to send
> the email user in connection url since its a restricted character. As per
> the Pamod pointed out we had replace the '@' mark with '!' in order to
> overcome that issue . But this was not getting worked as correctly.
>
> Can any one give any clue to overcome this issue.
>
>
> [1] -
> https://github.com/wso2/carbon-analytics-common/blob/release-5.0.12-alpha/components/data-bridge/org.wso2.carbon.databridge.core/src/main/java/org/wso2/carbon/databridge/core/internal/authentication/CarbonAuthenticationHandler.java#L51
>
> [2] -
> https://github.com/wso2/carbon-commons/blob/v4.4.8/components/authentication/org.wso2.carbon.identity.authentication/src/main/java/org/wso2/carbon/identity/authentication/AuthenticationServiceImpl.java#L59
>
>
> --
>
> *Tharindu Dharmarathna*Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94779109091 <%2B94779109091>*
>



 --
 *Pamod Sylvester *

 *WSO2 Inc.; http://wso2.com *
 cell: +94 77 7779495

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


>>>
>>>
>>> --
>>> *Ushani Balasooriya*
>>> Senior Software Engineer - QA;
>>> WSO2 Inc; http://www.wso2.com/.
>>>
>>>
>>>
>>
>>
>> --
>> *Pamod Sylvester *
>>

Re: [Dev] Error with MePIN Authenticator

2016-06-15 Thread Kesavan Yogarajah
Hi Harri,

Since we run the server locally we set the callback url as
https://localhost:9443/commonauth.
Are you running the server locally?. If the Identity Server is running on a
different hostname/port number please change the property accordingly and
also SAML2.IdPURL property in the /webapps/
travelocity.com/WEB-INF/classes/travelocity.properties file should be
changed accordingly.

Thanks

Kesavan Yogarajah
Software Engineer
Mobile :+94 (0) 779 758021
kesav...@wso2.com
WSO2, Inc.
lean . enterprise . middleware

On Wed, Jun 15, 2016 at 12:54 PM, Harri Salminen 
wrote:

> Hello Kesavan,
>
> we received this log. Do you see something specific which would indicate
> what has gone wrong ? The red color emphasis is from customer.
>
> Thanks a lot for your help !
>
>
> Here are *wso2carbon.log* after enable debug log level (when login from
> example app using MePIN).
>
> “
> …
> : [-1234] [] [2016-06-15 08:48:01,623] DEBUG
> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -
> Authenticating user admin
> TID: [-1234] [] [2016-06-15 08:48:01,623] DEBUG
> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Cache hit.
> Using DN uid=admin,ou=Users,dc=WSO2,dc=ORG
> TID: [-1234] [] [2016-06-15 08:48:01,675] DEBUG
> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  User:
> uid=admin,ou=Users,dc=WSO2,dc=ORG is authnticated: true
> TID: [-1234] [] [2016-06-15 08:48:01,675] DEBUG
> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Searching
> for user admin
> TID: [-1234] [] [2016-06-15 08:48:01,675] DEBUG
> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  value
> after escaping special characters in admin : admin
> TID: [-1234] [] [2016-06-15 08:48:01,678] DEBUG
> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Searching
> for user with SearchFilter: (&(objectClass=person)(uid=admin)) in
> SearchBase:
> TID: [-1234] [] [2016-06-15 08:48:01,681] DEBUG
> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Name in
> space for admin is uid=admin,ou=Users,dc=WSO2,dc=ORG
> TID: [-1234] [] [2016-06-15 08:48:01,682] DEBUG
> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  User:
> admin exist: true
> TID: [-1234] [] [2016-06-15 08:48:01,689] DEBUG
> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Searching
> for user with SearchFilter: (&(objectClass=person)(uid=admin)) in
> SearchBase:
> TID: [-1234] [] [2016-06-15 08:48:01,689] DEBUG
> {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} -  Requesting
> attribute :active
> TID: [-1234] [] [2016-06-15 08:48:01,693] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler}
> -  BasicAuthenticator returned: SUCCESS_COMPLETED
> TID: [-1234] [] [2016-06-15 08:48:01,693] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler}
> -  Step 1 is completed. Going to get the next one.
> TID: [-1234] [] [2016-06-15 08:48:01,694] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler}
> -  Starting Step: 2
> TID: [-1234] [] [2016-06-15 08:48:01,694] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils}
> -  Finding already authenticated IdPs of the Step
> TID: [-1234] [] [2016-06-15 08:48:01,694] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler}
> -  Step contains only a single IdP. Going to call it directly
> TID: [-1234] [] [2016-06-15 08:48:01,694] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.config.ConfigurationFacade}
> -  Trying to find the IdP for name: mePIN
> TID: [-1234] [] [2016-06-15 08:48:01,695] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.config.ConfigurationFacade}
> -  A registered IdP was found
> TID: [-1234] [] [2016-06-15 08:48:01,696] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler}
> -  MePINAuthenticator returned: INCOMPLETE
> TID: [-1234] [] [2016-06-15 08:48:01,696] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler}
> -  MePINAuthenticator is redirecting
> TID: [-1234] [] [2016-06-15 08:48:01,696] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler}
> -  Step is not complete yet. Redirecting to outside.
> TID: [-1234] [] [2016-06-15 08:49:29,075] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultAuthenticationRequestHandler}
> -  In authentication flow
> TID: [-1234] [] [2016-06-15 08:49:29,076] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler}
> -  

[Dev] Siddhi table join behavior

2016-06-15 Thread CD Athuraliya
Hi CEP team,

I'm running performance tests for an execution plan which is used to send
session termination events for security analytics dashboard. I need to
perform a load test for flushing an event table scenario. We have added
another temp stream to trigger the event table flush as below. Since we
need to measure throughput/latency for event table flushing we have
(temporally) added current timestamp to one attribute of each event. But it
appears that the timestamp is same for every event, which causes erroneous
latency values. Is this the expected behavior of below Siddhi syntax? Or
else what would be the best approach to load test a scenario like this?
Appreciate your thoughts/comments. I'm using this consumers/publishers,
based on these samples [1].

from flushStream join EventTerminationTable
select sessionId, time:timestampInMilliseconds(time:currentTimestamp(),
'-MM-dd HH:mm:ss') as sessionStart, sessionRenew, sessionTermination,
action, username, userStoreDomain, ip, tenantId, rememberFlag
insert into TestSessionAnalyticsOutputStream;

[1] https://github.com/wso2/product-cep/tree/master/modules/samples

Thanks,
CD

-- 
*CD Athuraliya*
Software Engineer
WSO2, Inc.
lean . enterprise . middleware
Mobile: +94 716288847 <94716288847>
LinkedIn  | Twitter
 | Blog

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


Re: [Dev] [MB] [C5] Integration tests with PAX Exam.

2016-06-15 Thread Chanaka Cooray
Hi Hemika/Aruna,

Per-suite is also works with OSGI. See the mailing thread.[1]

[1] https://groups.google.com/forum/#!topic/ops4j/aiJ2dvrxhcI

Thanks,
Chanaka.

On Wed, Jun 15, 2016 at 1:32 PM, Aruna Karunarathna  wrote:

> Not sure Hemika, According to the pax-exam code base looks like it
> supports for OSGi per-suite scenarios also, see [1].
>
> It may be a documentation gap, could you try contacting their mailing list?
>
> [1].
> https://github.com/ops4j/org.ops4j.pax.exam2/blob/master/itest/osgi/src/it/regression-multi/src/test/java/org/ops4j/pax/exam/regression/multi/inject/SuiteTest.java
>
> Regards,
> Aruna
>
> On Wed, Jun 15, 2016 at 1:21 PM, Hemika Kodikara  wrote:
>
>> *but the document *doesn't* say that it supports OSGi,
>>
>> Hemika Kodikara
>> Software Engineer
>> WSO2 Inc.
>> lean . enterprise . middleware
>> http://wso2.com
>>
>> Mobile : +9477762
>>
>> On Wed, Jun 15, 2016 at 1:20 PM, Hemika Kodikara  wrote:
>>
>>> Hi Aruna,
>>>
>>> I checked the mentioned document earlier, but the document does say that
>>> it supports OSGi,
>>>
>>> "This strategy is only supported in Java EE, CDI and Web modes."
>>>
>>> Regards,
>>> Hemika
>>>
>>>
>>> Hemika Kodikara
>>> Software Engineer
>>> WSO2 Inc.
>>> lean . enterprise . middleware
>>> http://wso2.com
>>>
>>> Mobile : +9477762
>>>
>>> On Wed, Jun 15, 2016 at 1:17 PM, Aruna Karunarathna 
>>> wrote:
>>>


 On Wed, Jun 15, 2016 at 1:11 PM, Hemika Kodikara 
 wrote:

> Hi All,
>
> In C4, We had integration tests running in a way that the server is
> started up by the test framework and the MB test cases were done through a
> JMS client. This JMS client is completely independent from MB(has no
> dependencies from MB other than the andes client jar).
>
> For C5, How can I achieve this ? IMO, running the JMS client in an
> OSGi environment is not required. Is it possible to start and stop the
> server using pax exam per testng suite ?
>

> Is there an example on how to achieve this ? As far I see, the only
> task that needs to be done through pax exam is to start and stop the MB
> server environment.
>
> Any advice on this ?
>

 Yes, you should be able to run per-suite according to the docs [1].

 [1]. https://ops4j1.jira.com/wiki/display/PAXEXAM4/Reactor+Strategies

>
> Regards,
> Hemika
>
> Hemika Kodikara
> Software Engineer
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +9477762
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --

 *Aruna Sujith Karunarathna *
 WSO2, Inc | lean. enterprise. middleware.
 #20, Palm Grove, Colombo 03, Sri Lanka
 Mobile: +94 71 9040362 | Work: +94 112145345
 Email: ar...@wso2.com | Web: www.wso2.com


>>>
>>>
>>
>
>
> --
>
> *Aruna Sujith Karunarathna *
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 9040362 | Work: +94 112145345
> Email: ar...@wso2.com | Web: www.wso2.com
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Chanaka Cooray
Software Engineer, WSO2 Inc. http://wso2.com
Email: chana...@wso2.com
Mobile: +94713149860
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB] [C5] Integration tests with PAX Exam.

2016-06-15 Thread Aruna Karunarathna
Not sure Hemika, According to the pax-exam code base looks like it supports
for OSGi per-suite scenarios also, see [1].

It may be a documentation gap, could you try contacting their mailing list?

[1].
https://github.com/ops4j/org.ops4j.pax.exam2/blob/master/itest/osgi/src/it/regression-multi/src/test/java/org/ops4j/pax/exam/regression/multi/inject/SuiteTest.java

Regards,
Aruna

On Wed, Jun 15, 2016 at 1:21 PM, Hemika Kodikara  wrote:

> *but the document *doesn't* say that it supports OSGi,
>
> Hemika Kodikara
> Software Engineer
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +9477762
>
> On Wed, Jun 15, 2016 at 1:20 PM, Hemika Kodikara  wrote:
>
>> Hi Aruna,
>>
>> I checked the mentioned document earlier, but the document does say that
>> it supports OSGi,
>>
>> "This strategy is only supported in Java EE, CDI and Web modes."
>>
>> Regards,
>> Hemika
>>
>>
>> Hemika Kodikara
>> Software Engineer
>> WSO2 Inc.
>> lean . enterprise . middleware
>> http://wso2.com
>>
>> Mobile : +9477762
>>
>> On Wed, Jun 15, 2016 at 1:17 PM, Aruna Karunarathna 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jun 15, 2016 at 1:11 PM, Hemika Kodikara 
>>> wrote:
>>>
 Hi All,

 In C4, We had integration tests running in a way that the server is
 started up by the test framework and the MB test cases were done through a
 JMS client. This JMS client is completely independent from MB(has no
 dependencies from MB other than the andes client jar).

 For C5, How can I achieve this ? IMO, running the JMS client in an OSGi
 environment is not required. Is it possible to start and stop the server
 using pax exam per testng suite ?

>>>
 Is there an example on how to achieve this ? As far I see, the only
 task that needs to be done through pax exam is to start and stop the MB
 server environment.

 Any advice on this ?

>>>
>>> Yes, you should be able to run per-suite according to the docs [1].
>>>
>>> [1]. https://ops4j1.jira.com/wiki/display/PAXEXAM4/Reactor+Strategies
>>>

 Regards,
 Hemika

 Hemika Kodikara
 Software Engineer
 WSO2 Inc.
 lean . enterprise . middleware
 http://wso2.com

 Mobile : +9477762

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


>>>
>>>
>>> --
>>>
>>> *Aruna Sujith Karunarathna *
>>> WSO2, Inc | lean. enterprise. middleware.
>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>> Mobile: +94 71 9040362 | Work: +94 112145345
>>> Email: ar...@wso2.com | Web: www.wso2.com
>>>
>>>
>>
>>
>


-- 

*Aruna Sujith Karunarathna *
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 9040362 | Work: +94 112145345
Email: ar...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB] [C5] Integration tests with PAX Exam.

2016-06-15 Thread Hemika Kodikara
*but the document *doesn't* say that it supports OSGi,

Hemika Kodikara
Software Engineer
WSO2 Inc.
lean . enterprise . middleware
http://wso2.com

Mobile : +9477762

On Wed, Jun 15, 2016 at 1:20 PM, Hemika Kodikara  wrote:

> Hi Aruna,
>
> I checked the mentioned document earlier, but the document does say that
> it supports OSGi,
>
> "This strategy is only supported in Java EE, CDI and Web modes."
>
> Regards,
> Hemika
>
>
> Hemika Kodikara
> Software Engineer
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +9477762
>
> On Wed, Jun 15, 2016 at 1:17 PM, Aruna Karunarathna 
> wrote:
>
>>
>>
>> On Wed, Jun 15, 2016 at 1:11 PM, Hemika Kodikara  wrote:
>>
>>> Hi All,
>>>
>>> In C4, We had integration tests running in a way that the server is
>>> started up by the test framework and the MB test cases were done through a
>>> JMS client. This JMS client is completely independent from MB(has no
>>> dependencies from MB other than the andes client jar).
>>>
>>> For C5, How can I achieve this ? IMO, running the JMS client in an OSGi
>>> environment is not required. Is it possible to start and stop the server
>>> using pax exam per testng suite ?
>>>
>>
>>> Is there an example on how to achieve this ? As far I see, the only task
>>> that needs to be done through pax exam is to start and stop the MB server
>>> environment.
>>>
>>> Any advice on this ?
>>>
>>
>> Yes, you should be able to run per-suite according to the docs [1].
>>
>> [1]. https://ops4j1.jira.com/wiki/display/PAXEXAM4/Reactor+Strategies
>>
>>>
>>> Regards,
>>> Hemika
>>>
>>> Hemika Kodikara
>>> Software Engineer
>>> WSO2 Inc.
>>> lean . enterprise . middleware
>>> http://wso2.com
>>>
>>> Mobile : +9477762
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Aruna Sujith Karunarathna *
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 71 9040362 | Work: +94 112145345
>> Email: ar...@wso2.com | Web: www.wso2.com
>>
>>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB] [C5] Integration tests with PAX Exam.

2016-06-15 Thread Hemika Kodikara
Hi Aruna,

I checked the mentioned document earlier, but the document does say that it
supports OSGi,

"This strategy is only supported in Java EE, CDI and Web modes."

Regards,
Hemika


Hemika Kodikara
Software Engineer
WSO2 Inc.
lean . enterprise . middleware
http://wso2.com

Mobile : +9477762

On Wed, Jun 15, 2016 at 1:17 PM, Aruna Karunarathna  wrote:

>
>
> On Wed, Jun 15, 2016 at 1:11 PM, Hemika Kodikara  wrote:
>
>> Hi All,
>>
>> In C4, We had integration tests running in a way that the server is
>> started up by the test framework and the MB test cases were done through a
>> JMS client. This JMS client is completely independent from MB(has no
>> dependencies from MB other than the andes client jar).
>>
>> For C5, How can I achieve this ? IMO, running the JMS client in an OSGi
>> environment is not required. Is it possible to start and stop the server
>> using pax exam per testng suite ?
>>
>
>> Is there an example on how to achieve this ? As far I see, the only task
>> that needs to be done through pax exam is to start and stop the MB server
>> environment.
>>
>> Any advice on this ?
>>
>
> Yes, you should be able to run per-suite according to the docs [1].
>
> [1]. https://ops4j1.jira.com/wiki/display/PAXEXAM4/Reactor+Strategies
>
>>
>> Regards,
>> Hemika
>>
>> Hemika Kodikara
>> Software Engineer
>> WSO2 Inc.
>> lean . enterprise . middleware
>> http://wso2.com
>>
>> Mobile : +9477762
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Aruna Sujith Karunarathna *
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 9040362 | Work: +94 112145345
> Email: ar...@wso2.com | Web: www.wso2.com
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB] [C5] Integration tests with PAX Exam.

2016-06-15 Thread Aruna Karunarathna
On Wed, Jun 15, 2016 at 1:11 PM, Hemika Kodikara  wrote:

> Hi All,
>
> In C4, We had integration tests running in a way that the server is
> started up by the test framework and the MB test cases were done through a
> JMS client. This JMS client is completely independent from MB(has no
> dependencies from MB other than the andes client jar).
>
> For C5, How can I achieve this ? IMO, running the JMS client in an OSGi
> environment is not required. Is it possible to start and stop the server
> using pax exam per testng suite ?
>

> Is there an example on how to achieve this ? As far I see, the only task
> that needs to be done through pax exam is to start and stop the MB server
> environment.
>
> Any advice on this ?
>

Yes, you should be able to run per-suite according to the docs [1].

[1]. https://ops4j1.jira.com/wiki/display/PAXEXAM4/Reactor+Strategies

>
> Regards,
> Hemika
>
> Hemika Kodikara
> Software Engineer
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +9477762
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Aruna Sujith Karunarathna *
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 9040362 | Work: +94 112145345
Email: ar...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Execution plans using analytics event tables not getting deployed

2016-06-15 Thread Fazlan Nazeem
Hi Mohan,

API-M analytics execution plans which are using analytics event tables are
not getting deployed due to an error as follows

INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- [2016-06-15 07:15:44,680] ERROR
{org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService}
-  Exception occurred while trying to deploy the Execution Plan
configuration file :
APIMAnalytics-HealthAvailabilityPerMin.siddhiql,org.wso2.carbon.event.processor.core.exception.ExecutionPlanConfigurationException:
No extension exist for AttributeFunction{extensionName='eventtable',
functionName='analytics.table', parameters=[]}

Has there been any change in carbon-event-processing 2.0.13-SNAPSHOT that
caused this?

-- 
Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

*WSO2 Inc*
Mobile : +94772338839
<%2B94%20%280%29%20773%20451194>
fazl...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [MB] [C5] Integration tests with PAX Exam.

2016-06-15 Thread Hemika Kodikara
Hi All,

In C4, We had integration tests running in a way that the server is started
up by the test framework and the MB test cases were done through a JMS
client. This JMS client is completely independent from MB(has no
dependencies from MB other than the andes client jar).

For C5, How can I achieve this ? IMO, running the JMS client in an OSGi
environment is not required. Is it possible to start and stop the server
using pax exam per testng suite ?

Is there an example on how to achieve this ? As far I see, the only task
that needs to be done through pax exam is to start and stop the MB server
environment.

Any advice on this ?

Regards,
Hemika

Hemika Kodikara
Software Engineer
WSO2 Inc.
lean . enterprise . middleware
http://wso2.com

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


Re: [Dev] Using curl to get http response code from SSL

2016-06-15 Thread Abhishek Tiwari
Hi Dilan,

Thanks for your prompt response. Specifying --insecure did the trick. Thanks

Cheers,
Abhishek

On Wed, Jun 15, 2016 at 12:32 PM, Dilan Udara Ariyaratne 
wrote:

> HI Abishek,
>
> If I understand your problem correctly, seems like you are trying to
> access simply an HTTPS endpoint from curl.
> Have you used curl with -k (or --insecure) option?, so that you can turn
> off curl's verification for server-side SSL certificates.
>
> Cheers,
> Dilan.
>
> *Dilan U. Ariyaratne*
> Senior Software Engineer
> WSO2 Inc. 
> Mobile: +94766405580 <%2B94766405580>
> lean . enterprise . middleware
>
>
> On Wed, Jun 15, 2016 at 12:15 PM, Abhishek Tiwari <
> abhishek.tiwari0...@gmail.com> wrote:
>
>> Hi All,
>>
>> I am trying to get HTTP response code from carbon server running in
>> docker container. The server runs on SSL with URL as
>> https://172.16.0.2:9443/. Currently, the response returned is 000
>> (client abort). Has anyone encountered this issue?
>>
>> Cheers,
>> Abhishek
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Using curl to get http response code from SSL

2016-06-15 Thread Dilan Udara Ariyaratne
HI Abishek,

If I understand your problem correctly, seems like you are trying to access
simply an HTTPS endpoint from curl.
Have you used curl with -k (or --insecure) option?, so that you can turn
off curl's verification for server-side SSL certificates.

Cheers,
Dilan.

*Dilan U. Ariyaratne*
Senior Software Engineer
WSO2 Inc. 
Mobile: +94766405580 <%2B94766405580>
lean . enterprise . middleware


On Wed, Jun 15, 2016 at 12:15 PM, Abhishek Tiwari <
abhishek.tiwari0...@gmail.com> wrote:

> Hi All,
>
> I am trying to get HTTP response code from carbon server running in docker
> container. The server runs on SSL with URL as https://172.16.0.2:9443/.
> Currently, the response returned is 000 (client abort). Has anyone
> encountered this issue?
>
> Cheers,
> Abhishek
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [EMM] Why we are using 404 for "No Content" responses ?

2016-06-15 Thread Chathura Dilan
​Yes

Take an API like /devices and if there are no records in it, return an
empty array. In this case the collection there is empty but it does exist.
So we cannot return 404 and use 200 instead.
If it is an single resource like devices/{deviceId} and if it is not found
return 404, because it does not exist.


On Wed, Jun 15, 2016 at 11:42 AM, Ruwan Yatawara  wrote:

> However, as per the implementation, since what is drawn from '/devices' is
> a list of resources.. and not an individual device. I believe a 200 ok with
> an empty set is acceptable.
>
>
> Thanks and Regards,
>
> Ruwan Yatawara
>
> Associate Technical Lead,
> WSO2 Inc.
>
> email : ruw...@wso2.com
> mobile : +94 77 9110413
> blog : http://ruwansrants.blogspot.com/
>   https://500px.com/ruwan_ace
> www: :http://wso2.com
>
>
> On Wed, Jun 15, 2016 at 11:26 AM, Ruwan Yatawara  wrote:
>
>> In the devices example that's used, it is my opinion that the device that
>> you are trying to locate is the resource, "/devices" is merely the context.
>> Therefore if a resource cannot be located a 404 no content is acceptable.
>> However, when looking at things from a AJAX request perspective, this kind
>> of scenario become tricky to handle.
>>
>> Even when I started on working on the UI stabilisation effort, i thought
>> 204 was the way to go, however upon further reading and looking at things
>> from aforementioned perspective, IMHO 404 seems the right response to
>> return when a resource is not found.
>>
>> Thanks and Regards,
>>
>> Ruwan Yatawara
>>
>> Associate Technical Lead,
>> WSO2 Inc.
>>
>> email : ruw...@wso2.com
>> mobile : +94 77 9110413
>> blog : http://ruwansrants.blogspot.com/
>>   https://500px.com/ruwan_ace
>> www: :http://wso2.com
>>
>>
>> On Wed, Jun 15, 2016 at 11:15 AM, Rasika Perera  wrote:
>>
>>> ​Hi All,
>>> ​
>>>
>>>
 I think that even though it is a single resource or a collection it
 should not be handled differently. if there is no resource behind the URI
 then it should be 404.
>>>
>>> ​-1. "/devices" is your resource in this case. and it is a *collection*.​
>>> ​ Query components are for retrieval of non-hierarchical data
>>> .  You should not use the query string to identify a *single* resource.
>>> "?type={platform}" is not a part of your resources hierarchy.​ Hence
>>> returning 404 may convey that "/devices" is non-existant and client should
>>> not try "/devices" on proceeding requests.
>>>
>>> ​Thanks,
>>> Rasika​
>>>
>>>
>>>
>>> On Wed, Jun 15, 2016 at 10:51 AM, Geeth Munasinghe 
>>> wrote:
>>>


 On Wed, Jun 15, 2016 at 10:11 AM, Ayyoob Hamza  wrote:

> I think that even though it is a single resource or a collection it
> should not be handled differently. if there is no resource behind the URI
> then it should be 404.
>
 -1,
 AFAIK, it is an actual endpoint (URL) refers to a resource. (In case of
 "/devices?{query_params}",  "/devices" is the resource) It does not matter
 that resource returns an output or not. Because resource can return an
 empty body for a request which in my opinion a valid response. Furthermore
 returning a empty body does not mean that resource is not found (404) (in
 case of /devices, it is there) or client has made an error with the
 request. Empty body means that no records available in database matching
 the filtering criteria. 404 implies a wrong message to the client, which
 means that he has done something wrong with the request. If we send 404 for
 empty body (returns due to no records in the database), then later same
 request will behave differently when database has relevant data. In my
 opinion, it should return 200 for empty body.

 According to [1] 4XX is used for client side errors.

 [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

 Thanks
 Geeth

>
> However this could be subjective so have to delve into our rest
> guidelines to make a decision on it.
>
> [Adding Frank and Joe]
>
> *Ayyoob Hamza*
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>
> On Wed, Jun 15, 2016 at 8:47 AM, Rasika Perera 
> wrote:
>
>> For example, /devices/{device-id} is a URI. Hence, by the time client
>>> makes a request for a non-existing device id, that results in a URI that
>>> could not be found and returning a 404 for that is perfectly valid.
>>
>> ​+1
>>
>> But if we take an example like this, /devices?type={platform}, here
>>> the URI is /devices. If we return a 404 here at any instance, what it
>>> simply means is that the requested URI (/devices) could not be found in 
>>> the
>>> server and should not be used anymore which is wrong. It's a
>>> defined resource 

[Dev] Using curl to get http response code from SSL

2016-06-15 Thread Abhishek Tiwari
Hi All,

I am trying to get HTTP response code from carbon server running in docker
container. The server runs on SSL with URL as https://172.16.0.2:9443/.
Currently, the response returned is 000 (client abort). Has anyone
encountered this issue?

Cheers,
Abhishek
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [EMM] Why we are using 404 for "No Content" responses ?

2016-06-15 Thread Ruwan Yatawara
However, as per the implementation, since what is drawn from '/devices' is
a list of resources.. and not an individual device. I believe a 200 ok with
an empty set is acceptable.


Thanks and Regards,

Ruwan Yatawara

Associate Technical Lead,
WSO2 Inc.

email : ruw...@wso2.com
mobile : +94 77 9110413
blog : http://ruwansrants.blogspot.com/
  https://500px.com/ruwan_ace
www: :http://wso2.com


On Wed, Jun 15, 2016 at 11:26 AM, Ruwan Yatawara  wrote:

> In the devices example that's used, it is my opinion that the device that
> you are trying to locate is the resource, "/devices" is merely the context.
> Therefore if a resource cannot be located a 404 no content is acceptable.
> However, when looking at things from a AJAX request perspective, this kind
> of scenario become tricky to handle.
>
> Even when I started on working on the UI stabilisation effort, i thought
> 204 was the way to go, however upon further reading and looking at things
> from aforementioned perspective, IMHO 404 seems the right response to
> return when a resource is not found.
>
> Thanks and Regards,
>
> Ruwan Yatawara
>
> Associate Technical Lead,
> WSO2 Inc.
>
> email : ruw...@wso2.com
> mobile : +94 77 9110413
> blog : http://ruwansrants.blogspot.com/
>   https://500px.com/ruwan_ace
> www: :http://wso2.com
>
>
> On Wed, Jun 15, 2016 at 11:15 AM, Rasika Perera  wrote:
>
>> ​Hi All,
>> ​
>>
>>
>>> I think that even though it is a single resource or a collection it
>>> should not be handled differently. if there is no resource behind the URI
>>> then it should be 404.
>>
>> ​-1. "/devices" is your resource in this case. and it is a *collection*.​
>> ​ Query components are for retrieval of non-hierarchical data
>> .  You should not use the query string to identify a *single* resource.
>> "?type={platform}" is not a part of your resources hierarchy.​ Hence
>> returning 404 may convey that "/devices" is non-existant and client should
>> not try "/devices" on proceeding requests.
>>
>> ​Thanks,
>> Rasika​
>>
>>
>>
>> On Wed, Jun 15, 2016 at 10:51 AM, Geeth Munasinghe 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jun 15, 2016 at 10:11 AM, Ayyoob Hamza  wrote:
>>>
 I think that even though it is a single resource or a collection it
 should not be handled differently. if there is no resource behind the URI
 then it should be 404.

>>> -1,
>>> AFAIK, it is an actual endpoint (URL) refers to a resource. (In case of
>>> "/devices?{query_params}",  "/devices" is the resource) It does not matter
>>> that resource returns an output or not. Because resource can return an
>>> empty body for a request which in my opinion a valid response. Furthermore
>>> returning a empty body does not mean that resource is not found (404) (in
>>> case of /devices, it is there) or client has made an error with the
>>> request. Empty body means that no records available in database matching
>>> the filtering criteria. 404 implies a wrong message to the client, which
>>> means that he has done something wrong with the request. If we send 404 for
>>> empty body (returns due to no records in the database), then later same
>>> request will behave differently when database has relevant data. In my
>>> opinion, it should return 200 for empty body.
>>>
>>> According to [1] 4XX is used for client side errors.
>>>
>>> [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
>>>
>>> Thanks
>>> Geeth
>>>

 However this could be subjective so have to delve into our rest
 guidelines to make a decision on it.

 [Adding Frank and Joe]

 *Ayyoob Hamza*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>

 On Wed, Jun 15, 2016 at 8:47 AM, Rasika Perera 
 wrote:

> For example, /devices/{device-id} is a URI. Hence, by the time client
>> makes a request for a non-existing device id, that results in a URI that
>> could not be found and returning a 404 for that is perfectly valid.
>
> ​+1
>
> But if we take an example like this, /devices?type={platform}, here
>> the URI is /devices. If we return a 404 here at any instance, what it
>> simply means is that the requested URI (/devices) could not be found in 
>> the
>> server and should not be used anymore which is wrong. It's a
>> defined resource collection that can exist in the server with 0 to many
>> items.
>
> ​Yes, In this case, I prefer a empty list with HTTP 200 is more
> intuitive and reduces complexities at the client side processing(i.e.
> if-check for 204).
>
> The query component contains non-hierarchical data
> ​. ​
> "/devices"​ will give you all devices.
> "/devices?type=non-existent-type" will return empty list of devices since
> no matching device exist. Simply your filtering criteria haven't met any
> 

Re: [Dev] JSON schema for JSON payloads without a root element - visual datamapper editor

2016-06-15 Thread Sohani Weerasinghe
Hi  All,

As per the offline discussion we had the json objects should be wrapped
with a root element when generating the schema hence, please find the below
implementation details;

Input:

{
   "Order":{
   "orderId":"ee1a9ec2-c8a5-4afe-8585-74df591f9990",
   "additions":"Chocolate Chip Cookies"
   }
}

Schema:

{
  "$schema" : "http://json-schema.org/draft-04/schema#;,
  "nullable" : "false",
  "id" : "http://wso2jsonschema.org;,
  "title" : "root",
  "type" : "object",
  "properties" : {
"Order" : {
  "nullable" : "false",
  "id" : "http://wso2jsonschema.org/Order;,
  "type" : "object",
  "properties" : {
"additions" : {
  "nullable" : "false",
  "id" : "http://wso2jsonschema.org/Order/additions;,
  "type" : "string"
},
"orderId" : {
  "nullable" : "false",
  "id" : "http://wso2jsonschema.org/Order/orderId;,
  "type" : "string"
}
  }
}
  }
}


​Thanks,

Sohani Weerasinghe
Senior Software Engineer
WSO2, Inc: http://wso2.com

Mobile  : +94 716439774
Blog :http://christinetechtips.blogspot.com/
Twitter  : https://twitter.com/sohanichristine

On Tue, May 31, 2016 at 4:56 PM, Sohani Weerasinghe  wrote:

> Hi All,
>
> Based on the above discussion, I need to finalize the JSON schema format
> generated for below use cases.
>
> 1. When the root element is an array
>
> Input:
>
> [
> "777925",
> "732321"
> ]
>
> Json Schema :
>
> {
>   "$schema" : "http://json-schema.org/draft-04/schema#;,
>   "id" : "http://wso2jsonschema.org;,
>   "title" : "root",
>   "type" : "array",
>   *"items" : [ {*
> *"id" : "http://wso2jsonschema.org/0 ",*
> *"type" : "string"*
> *  } ]*
> }
>
>
> 2. When the root element is an array of objects where object has elements
>
> Input:
>
> [
>{
>  "id": 0,
>  "species": "Capra hircus",
>  "name": "Goat"
>},
>{
>  "id": 1,
>  "species": "Panthera pardus",
>  "name": "Leopard"
>},
>{
>  "id": 2,
>  "species": "Equus zebra",
>  "name": "Zebra"
>}
>  ]
>
> Json Schema :
>
> {
>   "$schema" : "http://json-schema.org/draft-04/schema#;,
>   "id" : "http://wso2jsonschema.org;,
>   "title" : "root",
>   "type" : "array",
>   "items" : [ {
> "id" : "http://wso2jsonschema.org/0;,
> "type" : "object",
> "properties" : {
>  * "species" : {*
> *"id" : "http://wso2jsonschema.org/0/species
> ",*
> *"type" : "string"*
> *  },*
> *  "name" : {*
> *"id" : "http://wso2jsonschema.org/0/name
> ",*
> *"type" : "string"*
> *  },*
> *  "id" : {*
> *"id" : "http://wso2jsonschema.org/0/id
> ",*
> *"type" : "number"*
> *  }*
> *}*
>   } ]
> }
>
>
> *​Since this object does not wrap with a root element, is the visual
> representation correct for this type of a payload?*
>
> 3. When root element is an array of objects and the object is wrapped with
> another object
>
> Input:
> [
>   { "test":{
>  "id": 0,
>  "species": "Capra hircus",
>  "name": "Goat"
>}
> },
>  { "test":{
>  "id": 0,
>  "species": "Capra hircus",
>  "name": "Goat"
>}
> }
>  ]
>
> Json Schema:
>
> {
>   "$schema" : "http://json-schema.org/draft-04/schema#;,
>   "id" : "http://wso2jsonschema.org;,
>   "title" : "root",
>   "type" : "array",
>   "items" : [ {
> "id" : "http://wso2jsonschema.org/0;,
> "type" : "object",
> "properties" : {
>*   "test" : {*
> *"id" : "http://wso2jsonschema.org/0/test
> ",*
> *"type" : "object",*
> *"properties" : {*
> *  "species" : {*
> *"id" : "http://wso2jsonschema.org/0/test/species
> ",*
> *"type" : "string"*
> *  },*
> *  "name" : {*
> *"id" : "http://wso2jsonschema.org/0/test/name
> ",*
> *"type" : "string"*
> *  },*
> *  "id" : {*
> *"id" : "http://wso2jsonschema.org/0/test/id
> ",*
> *"type" : "number"*
> *  }*
> *}*
>   }
> }
>   } ]
> }
>
>
> Apart from the above samples, can there be a sample where the root element
> is an array of different objects ?
>
> eg:
>
> [
>   { "test1":{
>  "id": 0,
>  "species": "Capra hircus",
>  "name": "Goat"
>}
> },
>  { "test2":{
>  "id": 0,
>  "species": "Capra hircus",
>  "name": "Goat"
>}
> }
>  ]
>
> If that's the case, is the below json schema correct?
>
>
> {
>"$schema":"http://json-schema.org/draft-04/schema#;,
>"id":"http://wso2jsonschema.org;,
>"title":"root",
>"type":"array",
>"items":[
>   {
>  "id":"http://wso2jsonschema.org/0;,
>