Re: [Dev] [Automation Framework]

2016-04-03 Thread Malaka Silva
Hi,

It seems this is a requirement for ESB integration tests not for ESB
Connector test.

Ideally we should have a different version for connectors in integration
base.

On Mon, Apr 4, 2016 at 9:34 AM, Yashothara Shanmugarajah <
yashoth...@wso2.com> wrote:

> Thanks Rajjaz
>
> Best Regards,
> Yashothara.S
>
> Software Engineer
> WSO2
>
>
> On Fri, Apr 1, 2016 at 5:05 PM, Rajjaz Mohammed  wrote:
>
>> Hi Yashothara,
>>
>> When your running the integration test ESB will start with axis2 service
>> to test the synapse samples[1] in port 9000 because these samples[1] are
>> written to test the service running on port 9000. so if you want to remove
>> it you need to edit org.wso2.carbon.esbESBIntegrationTest.
>>
>> test/resources/artifacts/ESB/samples/synapse_sample_xx.xml
>>
>> On Fri, Apr 1, 2016 at 4:29 PM, Yashothara Shanmugarajah <
>> yashoth...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> Shall I know the purpose of having "test_axis2_server_9000.xml" when we
>>> are doing automation test? It is calling in
>>> "org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server"
>>>
>>>
>>> When I delete this file for running automation test in connector, it is
>>> give giving error like below.
>>>
>>> ERROR
>>> {org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server}
>>> -  Error while initializing the configuration context
>>> java.io.FileNotFoundException:
>>> /home/yasho/Videos/servicenow/servicenow-connector/servicenow-connect-1.0.0/org.wso2.carbon.connector/src/test/resources/artifacts/AXIS2/config/test_axis2_server_9000.xml
>>> (No such file or directory)
>>> at java.io.FileInputStream.open(Native Method)
>>> at java.io.FileInputStream.(FileInputStream.java:146)
>>> at java.io.FileInputStream.(FileInputStream.java:101)
>>> at
>>> org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server.copyResourceToFileSystem(SampleAxis2Server.java:152)
>>> at
>>> org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server.(SampleAxis2Server.java:69)
>>> at
>>> org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server.(SampleAxis2Server.java:57)
>>> at
>>> org.wso2.carbon.automation.core.PlatformExecutionManager.startSimpleAxis2Server(PlatformExecutionManager.java:227)
>>> at
>>> org.wso2.carbon.automation.core.PlatformExecutionManager.startSevers(PlatformExecutionManager.java:190)
>>> at
>>> org.wso2.carbon.automation.core.PlatformExecutionManager.onExecutionStart(PlatformExecutionManager.java:76)
>>> at org.testng.TestNG.runExecutionListeners(TestNG.java:1032)
>>> at org.testng.TestNG.run(TestNG.java:983)
>>> at
>>> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)
>>> at
>>> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>>> at
>>> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>> at
>>> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
>>> at
>>> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
>>> at
>>> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
>>> at
>>> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
>>> at
>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
>>> [2016-04-01 16:25:35,905]  INFO
>>> {org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server}
>>> -  Starting sample Axis2 server
>>> org.apache.maven.surefire.util.SurefireReflectionException:
>>> java.lang.reflect.InvocationTargetException; nested exception is
>>> java.lang.reflect.InvocationTargetException: null
>>> java.lang.reflect.InvocationTargetException
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>> at
>>> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
>>> at
>>> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
>>> at
>>> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
>>> at
>>> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
>>> at
>>> 

[Dev] [App Cloud] App Cloud 3.0.0-alpha release code freeze

2016-04-03 Thread Punnadi Gunarathna
Hi All,

We are going to freeze the master branch eod today for the upcoming
release. Please complete all the work in progress by eod and commit the
changes.

-- 

Thanks and Regards,

Punnadi Gunarathna
Senior Software Engineer,
WSO2, Inc.; http://wso2.com 
Blog: http://hi-my-world.blogspot.com/
Tel : 94 11 214 5345
Fax :94 11 2145300


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


[Dev] [App Cloud] Custom Applications on AppCloud

2016-04-03 Thread Nishadi Kirielle
Hi all,
I am currently working on allowing users to upload custom applications
types to app cloud with the user specified docker urls. As for now this
feature is expected to be exposed only to internal users by updating the
configuration file.

Any suggestions on this feature are highly appreciated.

Thanks

-- 
*Nishadi Kirielle*
*Software Engineering Intern*
Mobile : +94 (0) 714722148
Blog : http://nishadikirielle.blogspot.com/
nish...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ES][PC] Prevent automatic redirection in form submission in Process Center

2016-04-03 Thread Sameera Medagammaddegedara
Hi Dilini,

*https://localhost:9443/publisher/assets/process/create?process-name=abc==
> *
>
> Is this something default provided by ES?
>
No

Instead of searching a process by name only, when a user adds a sub-process
> for a new process, I am implementing the functionality to do an advance
> search using more filters (ex: name, version, owner, description etc.)
>
This functionality is already present in the ES.The search query supports
all attributes present in the RXT definition.

If so, how can I prevent this to show the search results once the user
> submits the form?
>
Can you please provide the following details:

   - From which page are you performing the search?
   - Can you please provide a link/source to the custom template files and
   the client side JavaScript used to implement the functionality?


Thank You,
Sameera

On Mon, Apr 4, 2016 at 10:26 AM, Dilini Mihindra  wrote:

> Hi all,
>
> I am currently working on an advance search functionality in the Process
> Center. Instead of searching a process by name only, when a user adds a
> sub-process for a new process, I am implementing the functionality to do an
> advance search using more filters (ex: name, version, owner, description
> etc.)
>
> However, when I enter a value in one of the search fields and click the
> search button or press enter, the response is redirected to the following.
>
> *https://localhost:9443/publisher/assets/process/create?process-name=abc==
> *
>
> Is this something default provided by ES? If so, how can I prevent this to
> show the search results once the user submits the form? Any help would be
> highly appreciated.
>
> Thank you.
>
> Dilini Mihindra Mampitiya Arachchi
> Intern - Software Engineer
> WSO2 Inc.
> Mobile: +94 710 420 550
> Email: dili...@wso2.com
>
> 
>



-- 
Sameera Medagammaddegedara
Software Engineer

Contact:
Email: samee...@wso2.com
Mobile: + 94 077 255 3005
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: GSOC2016: Proposal 6: [ML]

2016-04-03 Thread Nirmal Fernando
Hi Mahesh,

So, we are in the process of evaluating proposals, till then, you can start
doing some project related tasks and update us on what you did. Also feel
free to ask any questions that you may have.

On Thu, Mar 31, 2016 at 2:48 PM, Mahesh Dananjaya  wrote:

> Hi Maheshakya,
> Google have accepted my proof of enrollment. So do i need to proceed
> further with the project?t. I have been working with the Spark MLLib and
> trying to implement those two algorithms. Can you please tell me what is
> the next step i want to do.do i need to wait?thank you.
> regards,
> Mahesh.
>
> On Fri, Mar 25, 2016 at 10:40 PM, Mahesh Dananjaya <
> dananjayamah...@gmail.com> wrote:
>
>> Hi Maheshakya,
>> Thank you very much for the support given during the last couple of
>> weeks.I have finally submitted the proposal to the site.And i am looking
>> forward to contribute to your wso2 ml.thank you.
>> regards,
>> Mahesh.
>>
>> On Fri, Mar 25, 2016 at 7:49 PM, Mahesh Dananjaya <
>> dananjayamah...@gmail.com> wrote:
>>
>>> Hi maheshakya,
>>> i added the timeline according to my knowledge and uploaded.pls
>>> check.thank you.
>>> regards,
>>> Mahesh.
>>>
>>> On Fri, Mar 25, 2016 at 7:09 PM, Maheshakya Wijewardena <
>>> mahesha...@wso2.com> wrote:
>>>
 Hi Mahesh,

 Can you add the time line of the project as I've mentioned. It's one of
 the crucial parts of the proposal that allows us to evaluate feasibility of
 the project in accordance with the given time period by Google.

 Best regards.

 On Fri, Mar 25, 2016 at 6:53 PM, Mahesh Dananjaya <
 dananjayamah...@gmail.com> wrote:

>
> -- Forwarded message --
> From: Mahesh Dananjaya 
> Date: Fri, Mar 25, 2016 at 7:02 PM
> Subject: Re: [Dev] Fwd: GSOC2016: Proposal 6: [ML]
> To: Maheshakya Wijewardena 
>
>
> Hi maheshakya,
> I have uploaded my final submission.here it is. pls check it and
> inform me anything i need to change.thank you.
> BR,
> Mahesh.
>
> On Fri, Mar 25, 2016 at 6:28 PM, Mahesh Dananjaya <
> dananjayamah...@gmail.com> wrote:
>
>> Hi Maheshakya,
>> thank you very much. I will be updating the proposal with those
>> changes and i will submit it by now.thank you.
>> regards,
>> Mahesh.
>>
>> On Fri, Mar 25, 2016 at 6:07 PM, Maheshakya Wijewardena <
>> mahesha...@wso2.com> wrote:
>>
>>> Hi Mahesh,
>>>
>>> In the title, please include both tags [ML] and [CEP]
>>>
>>> Best regards.
>>>
>>> On Fri, Mar 25, 2016 at 5:49 PM, Maheshakya Wijewardena <
>>> mahesha...@wso2.com> wrote:
>>>
 Also, please include an introduction to yourself (University,
 department), past experience in machine learning, language 
 proficiency, etc
 at the beginning of the proposal.

 Best regards.

 On Fri, Mar 25, 2016 at 5:47 PM, Maheshakya Wijewardena <
 mahesha...@wso2.com> wrote:

> Hi Mahesh,
>
> Thank you for sending the draft. Please submit it as soon as
> possible.
>
> Few high level comments:
>
> In the proposal, you must specifically mention that this will be
> implemented as a Siddhi extension that can operate directly on 
> incoming
> streams.
>
> Also, you need to have a time line for the project, A sample looks
> like:
>
> May 1- May 20 - Community bonding period - Getting familiar with
> the platform and discussing implementation methods.
> May 20 - May 30 - Implementing streaming k-means,
> -
> -
> July 20-24 - Writing examples
> July 24-18 - Documentation
>
> This should end before pencils down date. Refer to the correct
> time line given in GSoC site.
>
> The implementation details of the the streaming algorithms looks
> fine.
>
> Best regards.
>
>
> On Fri, Mar 25, 2016 at 5:23 PM, Mahesh Dananjaya <
> dananjayamah...@gmail.com> wrote:
>
>> Hi Maheshakya,
>> this is my draft proposal.
>>
>> https://docs.google.com/document/d/1apZfEXZXEH5GwSwS7hARINbGw5_zinxWdZjEmyqfKu4/edit?usp=sha
>> 
>> ring
>> can you ple check this and see whether it is correct.thank you.
>> BR,
>> Mahesh
>>
>>
>> On Mon, Mar 21, 2016 at 1:15 PM, Maheshakya Wijewardena <
>> mahesha...@wso2.com> wrote:
>>
>>> Hi Mahesh,
>>>
>>> The deadline for submitting your proposals is on March 25th,
>>> 2016, therefore please start writing the 

Re: [Dev] Upgrading App Manager to user Carbon Kernel 4.4.5

2016-04-03 Thread Rushmin Fernando
Thanks Pulasthi !

App Manager WIP code can be found in [1] and [2]

Thanks
Rushmin

[1] -
https://github.com/wso2/carbon-appmgt/tree/feature/kernel-4.4.5-upgrade

[2]  -
https://github.com/wso2/product-app-manager/tree/feature/kernel-4.4.5-upgrade

On Fri, Apr 1, 2016 at 4:52 PM, Pulasthi Mahawithana 
wrote:

> Yes, we no longer use the wso2/carbon-identity repo for development. We
> use the repos in 'wso2-extensions'. However the group ids, artifact ids and
> versions follow the same from carbon-identity.
>
> On Fri, Apr 1, 2016 at 3:56 PM, Rushmin Fernando  wrote:
>
>> Thanks Supun !
>>
>> So is [1] obsolete now since the connector code resides in
>> 'wso2-extensions' account now ?
>>
>>
>> Thanks
>> Rushmin
>>
>> [1] -
>> https://github.com/wso2/carbon-identity/blob/master/features/provisioning/org.wso2.carbon.identity.provisioning.connector.salesforce.server.feature
>>
>> On Fri, Apr 1, 2016 at 3:47 PM, Pulasthi Mahawithana 
>> wrote:
>>
>>> Hi Rushmin,
>>>
>>> This issue was due to that component being moved from carbon-commons to
>>> analytic commons. Isura fixed that issue with [1] and [2]. Can you please
>>> try now?
>>>
>>> [1] https://github.com/wso2-extensions/identity-extension-parent/pull/6
>>> [2]
>>> https://github.com/wso2-extensions/identity-outbound-provisioning-salesforce/pull/6
>>>
>>> On Fri, Apr 1, 2016 at 12:21 PM, Rushmin Fernando 
>>> wrote:
>>>

 Hi Devs,

 We are in the process of upgrading the Carbon Kernel version to 4.4.5

 During this upgrade we found out that
 "org.wso2.carbon.identity.provisioning.connector.salesforce.server" feature
 is dependenct on a non-existing feature version of
 "org.wso2.carbon.databridge.commons.server"

 I opened a Jira to track this. [1]

 Had a chat with Pulasthi and this will be fixed with IS 5.2.0 release
 which will happen in the next week.

 Until this is fixed, I'm proceeding with the identity 5.0.9-SNAPSHOT
 having the issue fixed locally.

 Thanks
 Rushmin

 [1] - https://wso2.org/jira/browse/IDENTITY-4465

 --
 *Rushmin Fernando*
 *Technical Lead*

 WSO2 Inc.  - Lean . Enterprise . Middleware

 email : rush...@wso2.com
 mobile : +94772310855



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


>>>
>>>
>>> --
>>> *Pulasthi Mahawithana*
>>> Software Engineer
>>> WSO2 Inc., http://wso2.com/
>>> Mobile: +94-71-5179022
>>> Blog: http://blog.pulasthi.org
>>>
>>
>>
>>
>> --
>> *Rushmin Fernando*
>> *Technical Lead*
>>
>> WSO2 Inc.  - Lean . Enterprise . Middleware
>>
>> email : rush...@wso2.com
>> mobile : +94772310855
>>
>>
>>
>
>
> --
> *Pulasthi Mahawithana*
> Software Engineer
> WSO2 Inc., http://wso2.com/
> Mobile: +94-71-5179022
> Blog: http://blog.pulasthi.org
>



-- 
*Rushmin Fernando*
*Technical Lead*

WSO2 Inc.  - Lean . Enterprise . Middleware

email : rush...@wso2.com
mobile : +94772310855
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [ES][PC] Prevent automatic redirection in form submission in Process Center

2016-04-03 Thread Dilini Mihindra
Hi all,

I am currently working on an advance search functionality in the Process
Center. Instead of searching a process by name only, when a user adds a
sub-process for a new process, I am implementing the functionality to do an
advance search using more filters (ex: name, version, owner, description
etc.)

However, when I enter a value in one of the search fields and click the
search button or press enter, the response is redirected to the following.

*https://localhost:9443/publisher/assets/process/create?process-name=abc==
*

Is this something default provided by ES? If so, how can I prevent this to
show the search results once the user submits the form? Any help would be
highly appreciated.

Thank you.

Dilini Mihindra Mampitiya Arachchi
Intern - Software Engineer
WSO2 Inc.
Mobile: +94 710 420 550
Email: dili...@wso2.com
     
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DAS] Is there a way to retrieve selected fields from a given table

2016-04-03 Thread Geesara Prathap
Hi Gimantha,

Thanks. I will check this out.

On Mon, Apr 4, 2016 at 9:48 AM, Gimantha Bandara  wrote:

> Hi all,
>
> We have added an extra query parameter to  "get" operation and a JSON
> element called "columns" to "search" and "drilldown" operations.
>
>
> *Get the records from a table*
>
> GET /analytics/tables/{tableName}?columns=column1,column2,column3
>
> *Drilldown and Search APIs*
>
> Additional JSON element will be added as following
>
> POST /analytics/drilldown or POST /analytics/search
>
> {
>   "tableName" : ,
>
>
>   "columns: ["column1", column2", column3"]
> }
>
>
> On Wed, Mar 23, 2016 at 1:56 PM, Gihan Anuruddha  wrote:
>
>> Hi Sumedha,
>>
>> Gimantha will implement same for the REST API as well. This will be
>> available in the DAS-3.0.2-SNAPSHOT pack.
>>
>> Regards,
>> Gihan
>>
>> On Wed, Mar 23, 2016 at 1:48 PM, Sumedha Rubasinghe 
>> wrote:
>>
>>> Gihan,
>>> Can't we implement the same functionality for REST API?
>>>
>>> This will help to prevent maintaining two client logics for REST API &
>>> Admin API.
>>>
>>> On Wed, Mar 23, 2016 at 1:27 PM, Gihan Anuruddha  wrote:
>>>
 There is a parameter that you can specify which column you need for
 response.

 On Wed, Mar 23, 2016 at 11:36 AM, Geesara Prathap 
 wrote:

> Thanks for the information. In admin service how to do $subject. Just
> to know
>
> On Wed, Mar 23, 2016 at 11:28 AM, Gihan Anuruddha 
> wrote:
>
>> AFAIK, you can't do this when you use the REST API. But if you use
>> the admin service you should able to do this.
>>
>> On Wed, Mar 23, 2016 at 10:39 AM, Geesara Prathap 
>> wrote:
>>
>>> Hi All,
>>>
>>> As an example, *ORG_WSO2_IOT_DEVICES_TEMPERATURE *table consists of
>>> five fields: META_OWNER, META_DEVICETYPE, META_DEVICEID, META_TIME,
>>> TEMPERATURE and _TIMESTAMP. But interested only less number of fields. 
>>> When
>>> querying this
>>>
>>> *meta_owner:admin AND meta_deviceId:1iexrfgp2jwa8 AND
>>> meta_time:[1456467843079 TO 1456468494817]* which retrieved all
>>> fields it contains. So how to get selected some of the fields only which
>>> are required?
>>>
>>> Thanks,
>>> Geesara
>>> --
>>> Geesara Prathap Kulathunga
>>> Software Engineer
>>> WSO2 Inc; http://wso2.com
>>> Mobile : +940772684174
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> W.G. Gihan Anuruddha
>> Senior Software Engineer | WSO2, Inc.
>> M: +94772272595
>>
>
>
>
> --
> Geesara Prathap Kulathunga
> Software Engineer
> WSO2 Inc; http://wso2.com
> Mobile : +940772684174
>
>


 --
 W.G. Gihan Anuruddha
 Senior Software Engineer | WSO2, Inc.
 M: +94772272595

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


>>>
>>>
>>> --
>>> /sumedha
>>> m: +94 773017743
>>> b :  bit.ly/sumedha
>>>
>>
>>
>>
>> --
>> W.G. Gihan Anuruddha
>> Senior Software Engineer | WSO2, Inc.
>> M: +94772272595
>>
>
>
>
> --
> Gimantha Bandara
> Software Engineer
> WSO2. Inc : http://wso2.com
> Mobile : +94714961919
>



-- 
Geesara Prathap Kulathunga
Software Engineer
WSO2 Inc; http://wso2.com
Mobile : +940772684174
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DAS] Is there a way to retrieve selected fields from a given table

2016-04-03 Thread Gimantha Bandara
Hi all,

We have added an extra query parameter to  "get" operation and a JSON
element called "columns" to "search" and "drilldown" operations.


*Get the records from a table*

GET /analytics/tables/{tableName}?columns=column1,column2,column3

*Drilldown and Search APIs*

Additional JSON element will be added as following

POST /analytics/drilldown or POST /analytics/search

{
  "tableName" : ,
   
   
  "columns: ["column1", column2", column3"]
}


On Wed, Mar 23, 2016 at 1:56 PM, Gihan Anuruddha  wrote:

> Hi Sumedha,
>
> Gimantha will implement same for the REST API as well. This will be
> available in the DAS-3.0.2-SNAPSHOT pack.
>
> Regards,
> Gihan
>
> On Wed, Mar 23, 2016 at 1:48 PM, Sumedha Rubasinghe 
> wrote:
>
>> Gihan,
>> Can't we implement the same functionality for REST API?
>>
>> This will help to prevent maintaining two client logics for REST API &
>> Admin API.
>>
>> On Wed, Mar 23, 2016 at 1:27 PM, Gihan Anuruddha  wrote:
>>
>>> There is a parameter that you can specify which column you need for
>>> response.
>>>
>>> On Wed, Mar 23, 2016 at 11:36 AM, Geesara Prathap 
>>> wrote:
>>>
 Thanks for the information. In admin service how to do $subject. Just
 to know

 On Wed, Mar 23, 2016 at 11:28 AM, Gihan Anuruddha 
 wrote:

> AFAIK, you can't do this when you use the REST API. But if you use the
> admin service you should able to do this.
>
> On Wed, Mar 23, 2016 at 10:39 AM, Geesara Prathap 
> wrote:
>
>> Hi All,
>>
>> As an example, *ORG_WSO2_IOT_DEVICES_TEMPERATURE *table consists of
>> five fields: META_OWNER, META_DEVICETYPE, META_DEVICEID, META_TIME,
>> TEMPERATURE and _TIMESTAMP. But interested only less number of fields. 
>> When
>> querying this
>>
>> *meta_owner:admin AND meta_deviceId:1iexrfgp2jwa8 AND
>> meta_time:[1456467843079 TO 1456468494817]* which retrieved all
>> fields it contains. So how to get selected some of the fields only which
>> are required?
>>
>> Thanks,
>> Geesara
>> --
>> Geesara Prathap Kulathunga
>> Software Engineer
>> WSO2 Inc; http://wso2.com
>> Mobile : +940772684174
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> W.G. Gihan Anuruddha
> Senior Software Engineer | WSO2, Inc.
> M: +94772272595
>



 --
 Geesara Prathap Kulathunga
 Software Engineer
 WSO2 Inc; http://wso2.com
 Mobile : +940772684174


>>>
>>>
>>> --
>>> W.G. Gihan Anuruddha
>>> Senior Software Engineer | WSO2, Inc.
>>> M: +94772272595
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> /sumedha
>> m: +94 773017743
>> b :  bit.ly/sumedha
>>
>
>
>
> --
> W.G. Gihan Anuruddha
> Senior Software Engineer | WSO2, Inc.
> M: +94772272595
>



-- 
Gimantha Bandara
Software Engineer
WSO2. Inc : http://wso2.com
Mobile : +94714961919
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [REST APIs][Analytics] GET request with a payload

2016-04-03 Thread Gimantha Bandara
Please note that "fields" is changed to "columns" for consistency as in
APIs, "columns" is used.

On Mon, Apr 4, 2016 at 9:08 AM, Gimantha Bandara  wrote:

> Hi all,
>
> Thank you for your suggestions! We are going to use GET with the query
> parameter "columns" to get the records filtered by a time range. So when
> only a selected set of columns/fields are needed, Following format can be
> used.
>
> *Get the records within a specific time range.*
>
> GET
> /analytics/tables/{tableName}/{to}/{from}/{start}/{count}?fields=field1,field2,field3
>
> *Drilldown and Search APIs*
>
> Additional JSON element will be added as following
>
> POST /analytics/drilldown or POST /analytics/search
>
> {
>   "tableName" : ,
>
>
>   "fields: ["field1", field2", field3"]
> }
>
>
>
>
> On Thu, Mar 24, 2016 at 2:59 PM, Lahiru Sandaruwan 
> wrote:
>
>> Hi all,
>>
>> POST for filterings is not an issue for special cases, as document also
>> clearly confirms.
>>
>> However, I think the decision has to be made on practical use cases. This
>> use case doesn't looks like a complex one. As Ayoma mention, it is a good
>> idea to implement two filters to include and exclude.
>>
>> Considering the practical use, if url length is not a problem(i.e.
>> practically user will not have a requirement to use around 400 columns per
>> search, if we average word length to 5), we should go for GET.
>>
>> Otherwise, we can go for POST.
>>
>> Thanks.
>>
>> On Thu, Mar 24, 2016 at 9:01 AM, Sachith Withana 
>> wrote:
>>
>>> Hi Gimantha,
>>>
>>> I think the point made by Udara is valid.
>>> Anyways if the user wants to get a selected number of columns, the
>>> chances are it won't exceed the url limit.
>>> ( due to the that number being low).
>>>
>>> Thanks,
>>> Sachith
>>>
>>> On Thu, Mar 24, 2016 at 2:21 PM, Gimantha Bandara 
>>> wrote:
>>>
 Hi Sanjeewa,

 Thank you for the guidelines doc. The exact problem is discussed in
 10.2 in the above document. We will be filtering the record values in each
 records by providing the required columns, so only those column values will
 be returned with each record. According to the document the POST can be
 used either for updating/creating a resource or for initializing a
 processing function. In our case we will be simply retrieving records but
 need to provide a filter for the record values. So from users perspective,
 it will be doing some processing and returning filtered records.

 We can actually implement the following url, but we cannot exactly say
 if it will exceed the url length limit.
 GET /analytics/tables/{tableName}?columns=column1,column2]

 Or we can implement something like below,

 POST /analytics/tables/tableName/

 {
   from:
   to:
   start:
   count:
   columns :[c1,c2,c3]
 }

 or

 POST /analytics/

 {
   tableName :
   from:
   to:
   start:
   count:
   columns :[c1,c2,c3]
 }

 Considering the url length limit, I think the second option is better.
 WDYT?

 On Thu, Mar 24, 2016 at 12:33 PM, Sanjeewa Malalgoda  wrote:

> Hi Gimantha,
> Did you refer REST API guidelines document attached in this mail[1] in
> architecture mailing list.
> When we develop REST APIs please follow that document and if you see
> anything missed there please let us know.
>
> [1][Architecture] REST API Guidelines
>
>
> Thanks,
> sanjeewa.
>
> On Wed, Mar 23, 2016 at 8:01 PM, Gimantha Bandara 
> wrote:
>
>> Hi all,
>>
>>
>> We have a REST API in DAS to retrieve records in a specific table. It
>> supports GET method with the following url format.
>>
>> /analytics/tables/{tableName}/{from}/{to}/{start}/{count}
>>
>> Sending a GET request to above url will give the records between
>> given "from", "to" time range starting from index "start" with  "count"
>> page size.
>>
>> Now we need to change the API, so that the user can define the record
>> columns/fields he wants. Current API will return the records with all the
>> values/columns. To do that, we can allow the user to define the columns 
>> he
>> needs, in the payload. But it seems that having a payload with a GET is 
>> not
>> the convention/the best practice.
>>
>> POST can be used to send the column names as a payload, but here we
>> are not making any updates to {tableName} resource. We will be just
>> retrieving records using a POST. So it also seems not the convention/the
>> best practice.
>>
>> The only solution I can think of is, having a different resource path
>> to get the records with only specified fields/columns. Are there any 
>> other
>> solutions?
>>
>> 

Re: [Dev] [VOTE] Release WSO2 Dockerfiles 1.0.0 RC3

2016-04-03 Thread Chamila De Alwis
*[x] Stable *- Go ahead and release

Verified the following

   - Repository structure
   - Distribution
   - Helper Scripts (build, run, stop) for WSO2 MB and WSO2 AM, and smoke
   tests for basic product functionality
   - License headers
   - README content



Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Fri, Apr 1, 2016 at 3:54 PM, Isuru Haththotuwa  wrote:

> This is the third release candidate (RC3) of WSO2 Dockerfiles 1.0.0
> release.
>
> *Tag to be voted upon:*
> https://github.com/wso2/dockerfiles/tree/v1.0.0-rc3
>
> *Source and distribution packages:*
> https://github.com/wso2/dockerfiles/releases/tag/v1.0.0-rc3
>
> Please download, test, and vote. The README file under each product
> directory contains instructions on how to try it out locally.
>
> [ ] Broken - Do not release (explain why)
> [ ] Stable - Go ahead and release
>
> This vote will be open for 72 hours or as needed.
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* *
>
>
>
> ___
> 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] [Automation Framework]

2016-04-03 Thread Yashothara Shanmugarajah
Thanks Rajjaz

Best Regards,
Yashothara.S

Software Engineer
WSO2


On Fri, Apr 1, 2016 at 5:05 PM, Rajjaz Mohammed  wrote:

> Hi Yashothara,
>
> When your running the integration test ESB will start with axis2 service
> to test the synapse samples[1] in port 9000 because these samples[1] are
> written to test the service running on port 9000. so if you want to remove
> it you need to edit org.wso2.carbon.esbESBIntegrationTest.
>
> test/resources/artifacts/ESB/samples/synapse_sample_xx.xml
>
> On Fri, Apr 1, 2016 at 4:29 PM, Yashothara Shanmugarajah <
> yashoth...@wso2.com> wrote:
>
>> Hi,
>>
>> Shall I know the purpose of having "test_axis2_server_9000.xml" when we
>> are doing automation test? It is calling in
>> "org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server"
>>
>>
>> When I delete this file for running automation test in connector, it is
>> give giving error like below.
>>
>> ERROR
>> {org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server}
>> -  Error while initializing the configuration context
>> java.io.FileNotFoundException:
>> /home/yasho/Videos/servicenow/servicenow-connector/servicenow-connect-1.0.0/org.wso2.carbon.connector/src/test/resources/artifacts/AXIS2/config/test_axis2_server_9000.xml
>> (No such file or directory)
>> at java.io.FileInputStream.open(Native Method)
>> at java.io.FileInputStream.(FileInputStream.java:146)
>> at java.io.FileInputStream.(FileInputStream.java:101)
>> at
>> org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server.copyResourceToFileSystem(SampleAxis2Server.java:152)
>> at
>> org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server.(SampleAxis2Server.java:69)
>> at
>> org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server.(SampleAxis2Server.java:57)
>> at
>> org.wso2.carbon.automation.core.PlatformExecutionManager.startSimpleAxis2Server(PlatformExecutionManager.java:227)
>> at
>> org.wso2.carbon.automation.core.PlatformExecutionManager.startSevers(PlatformExecutionManager.java:190)
>> at
>> org.wso2.carbon.automation.core.PlatformExecutionManager.onExecutionStart(PlatformExecutionManager.java:76)
>> at org.testng.TestNG.runExecutionListeners(TestNG.java:1032)
>> at org.testng.TestNG.run(TestNG.java:983)
>> at
>> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)
>> at
>> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>> at
>> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:606)
>> at
>> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
>> at
>> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
>> at
>> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
>> at
>> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
>> at
>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
>> [2016-04-01 16:25:35,905]  INFO
>> {org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server}
>> -  Starting sample Axis2 server
>> org.apache.maven.surefire.util.SurefireReflectionException:
>> java.lang.reflect.InvocationTargetException; nested exception is
>> java.lang.reflect.InvocationTargetException: null
>> java.lang.reflect.InvocationTargetException
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:606)
>> at
>> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
>> at
>> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
>> at
>> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
>> at
>> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
>> at
>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
>> Caused by: java.lang.NullPointerException
>> at
>> org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:74)
>> at
>> org.wso2.carbon.automation.core.utils.axis2serverutils.SampleAxis2Server.start(SampleAxis2Server.java:85)
>> at
>> 

Re: [Dev] Unable to send SOAP call.

2016-04-03 Thread Shakila Sivagnanarajah
Hi Chiranga,

While debugging the code, I found that the class loader did not find the
package 'org.apache.axis2.saaj.SOAPConnectionFactoryImpl'. It throws the
class not found exception like
"*org.apache.axis2.saaj.SOAPConnectionFactoryImpl
cannot be found by geronimo-saaj_1.3_spec_1.0.0.wso2v3".*

Thanks

On Wed, Mar 30, 2016 at 1:30 PM, Shakila Sivagnanarajah 
wrote:

> Hi Chiranga,
>
> *DEFAULT_SOAP_CONNECTION_FACTORY* is set to
> org.apache.axis2.saaj.SOAPConnectionFactoryImpl and *SF_PROPERTY* is set
> to javax.xml.soap.SOAPConnectionFactory.
>
>
> [image: Inline image 1]
>
> On Tue, Mar 29, 2016 at 3:16 PM, Chiranga Alwis  wrote:
>
>> Hi,
>>
>> I just went through this issue. This is a notification of my findings, so
>> far. I discovered that abstract class javax.xml.soap.SOAPConnectionFactory
>> uses javax.xml.soap.SOAPConnectionFactory system property to lookup for the
>> implementation of this class. By default it uses
>> com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory
>> class as the implementation.
>>
>> Hence, in my belief simply importing the *"*org.apache.axis2.saaj.*"
>> package may not suffice.
>>
>> Plus I suggest that it would be better if you can debug, check the value
>> of the system property at the point where [2] is called and check if the
>> class it tries to lookup for, is available.
>>
>> [2] SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.
>> newInstance();
>>
>> On Tue, Mar 29, 2016 at 11:53 AM, Shakila Sivagnanarajah <
>> shak...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> I already imported org.apache.axis2.saaj.* package. Earlier I used the
>>> version as *1.6.1.wso2v10*. As Niranjan suggested, I changed the
>>> version as *1.6.1.wso2v16* (IS 5.1.0 uses axis2_1.6.1.wso2v16). Still
>>> getting the same issue. Please find the implementation [1] and
>>> documentation [2] to reproduce.
>>>
>>> [1] https://github.com/Shakila/vip
>>> [2]
>>> https://docs.wso2.com/display/ISCONNECTORS/Configuring+Symantec+VIP+Authenticator
>>>
>>> Thanks
>>>
>>> On Mon, Mar 21, 2016 at 12:10 PM, Malaka Silva  wrote:
>>>
 Hi Shakila,

 I had a offline discussion with Kishanthan.

 You need to import the org.apache.axis2.saaj.* package to
 your authenticator jar.

 On Thu, Mar 17, 2016 at 1:39 PM, Shakila Sivagnanarajah <
 shak...@wso2.com> wrote:

> Hi Chiranga,
>
> Please find the info below.
>
> Provider org.apache.axis2.saaj.SOAPConnectionFactoryImpl not found
> org.wso2.carbon.identity.application.authentication.framework.exception.AuthenticationFailedException:
> Error occurred while sending SOAP Request to Server: Unable to create SOAP
> connection factory: Provider
> org.apache.axis2.saaj.SOAPConnectionFactoryImpl not found
> at
> org.wso2.carbon.identity.authenticator.semanticvip.VIPManager.invokeSOAP(VIPManager.java:120)
> at
> org.wso2.carbon.identity.authenticator.semanticvip.SemanticVIPAuthenticator.processAuthenticationResponse(SemanticVIPAuthenticator.java:134)
> at
> org.wso2.carbon.identity.application.authentication.framework.AbstractApplicationAuthenticator.process(AbstractApplicationAuthenticator.java:66)
> at
> org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler.doAuthentication(DefaultStepHandler.java:432)
> at
> org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler.handleResponse(DefaultStepHandler.java:406)
> at
> org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler.handle(DefaultStepHandler.java:117)
> at
> org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler.handle(DefaultStepBasedSequenceHandler.java:171)
> at
> org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultAuthenticationRequestHandler.handle(DefaultAuthenticationRequestHandler.java:115)
> at
> org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator.handle(DefaultRequestCoordinator.java:135)
> at
> org.wso2.carbon.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doPost(CommonAuthenticationServlet.java:53)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at
> org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
> at
> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
> at
> 

Re: [Dev] Streaming File transfer with File Inbound/File Connector

2016-04-03 Thread Malaka Silva
Hi Yashothara,

Can you start working on this please.

On Mon, Mar 14, 2016 at 11:41 AM, Vivekananthan Sivanayagam <
vivekanant...@wso2.com> wrote:

> Hi Malaka,
>
> I have created Jira [1].
>
> [1] https://wso2.org/jira/browse/ESBCONNECT-86
>
>
>
>
> *Thank youVivekananthan Sivanayagam*
>
> *Associate Software Engineer | WSO2*
>
> *E:vivekanant...@wso2.com *
> *M:+94752786138 <%2B94752786138>*
>
> On Mon, Mar 14, 2016 at 10:59 AM, Malaka Silva  wrote:
>
>> Hi Vivekananthan,
>>
>> Can we create a Jira and follow up on this please?
>>
>> On Mon, Mar 14, 2016 at 10:40 AM, Kasun Indrasiri  wrote:
>>
>>>
>>>
>>> On Mon, Mar 14, 2016 at 9:57 AM, Malaka Silva  wrote:
>>>
 Hi Kasun,

 I don't think we have the same functionality of VFS sender in file
 connector. We have only focused on use cases not covered with VFS 
 transport.

>>>
>>> Ok. I think we need to make sure things are consistent across the
>>> transport and the file connector. Can we please include this as an
>>> improvement for the next version of the connector.
>>>
>>>

>>> @Vivekananthan - Please confirm this?

 On Sat, Mar 12, 2016 at 4:39 PM, Kasun Indrasiri 
 wrote:

> This is great. Thanks a lot Malaka.
> Also, if we use the file connector as the outbound channel, will it
> work in the same way?
>
> On Tue, Mar 1, 2016 at 12:36 PM, Malaka Silva  wrote:
>
>> Hi All,
>>
>> Please ignore my previous comments. This can be done with current
>> implementation.
>>
>> if (builder instanceof DataSourceMessageBuilder &&
>> "true".equals(streaming)) {
>> dataSource = ManagedDataSourceFactory.create(new
>> FileObjectDataSource(file, contentType));
>> in = null;
>> } else {
>> in = new
>> AutoCloseInputStream(file.getContent().getInputStream());
>> dataSource = null;
>> }
>> ..
>> OMElement documentElement;
>> if (in != null) {
>> documentElement = builder.processDocument(in,
>> contentType, axis2MsgCtx);
>> } else {
>> documentElement =
>> ((DataSourceMessageBuilder)builder).processDocument(dataSource,
>> contentType, axis2MsgCtx);
>> }
>> ...
>> if(dataSource != null) {
>> dataSource.destroy();
>> }
>>
>> This is
>> ​because ​
>> message builder able to build messages from
>> ​​
>> DataSource objects.
>> ​
>> ​
>> DataSource​
>>  by definition the data from a DataSource can be read
>> ​
>> multiple times,
>> ​builders that implement ​
>> this interface
>> ​can​
>>  avoid storing the message content in memory.
>> ​ ​
>> If a message builder implements this interface and the
>> ​file/vfs
>>  is able to provide the message payload as a data source, then the
>> method defined by this interface should be preferred over the method
>> defined by Builder.
>> ​ This
>>  helps optimizing
>> ​PT​
>>  with
>> ​vfs/file​.
>> The builder will typically expose the data source directly or
>> indirectly through the returned OMElement, e.g. by adding to the tree an
>> OMText or OMDataSource node referencing the data source.
>>
>> ​I have checked this with inbound but there is a fix we need to do. I
>> have done it in [1]. I have done several tests with and without streaming
>> from 5mb to 1gb files.
>>
>> Without streaming [2] and [3] will show the memory growth. With
>> streaming [4]. Without streaming most of the time ESB went OOM​.
>>
>> Find the related configs and axis2 changes in [5] and [6].
>>
>> [1] https://wso2.org/jira/browse/ESBJAVA-4458
>>
>> [2]
>>
>> [image: Inline image 1]
>>
>> [3]
>>
>> [image: Inline image 2]
>>
>> [4]
>>
>> [image: Inline image 3]
>>
>> [5]
>>
>> http://ws.apache.org/ns/synapse;
>>  name="load"  sequence="request"  onError="fault" protocol="file"
>> suspend="false">
>>
>>   1
>>   true
>>   > name="transport.vfs.ContentType">application/file
>>   > name="transport.vfs.LockReleaseSameNode">false
>>   > name="transport.vfs.AutoLockRelease">false
>>   > name="transport.vfs.ActionAfterFailure">DELETE
>>   true
>>   true
>>   > name="transport.vfs.ActionAfterProcess">DELETE
>>   > name="transport.vfs.FileURI">file:///home/wso2/work/tmp/file/in
>>   > name="transport.vfs.DistributedLock">false
>>   true
>>   enable
>>   > 

Re: [Dev] [Architecture] [REST APIs][Analytics] GET request with a payload

2016-04-03 Thread Gimantha Bandara
Hi all,

Thank you for your suggestions! We are going to use GET with the query
parameter "columns" to get the records filtered by a time range. So when
only a selected set of columns/fields are needed, Following format can be
used.

*Get the records within a specific time range.*

GET
/analytics/tables/{tableName}/{to}/{from}/{start}/{count}?fields=field1,field2,field3

*Drilldown and Search APIs*

Additional JSON element will be added as following

POST /analytics/drilldown or POST /analytics/search

{
  "tableName" : ,
   
   
  "fields: ["field1", field2", field3"]
}




On Thu, Mar 24, 2016 at 2:59 PM, Lahiru Sandaruwan  wrote:

> Hi all,
>
> POST for filterings is not an issue for special cases, as document also
> clearly confirms.
>
> However, I think the decision has to be made on practical use cases. This
> use case doesn't looks like a complex one. As Ayoma mention, it is a good
> idea to implement two filters to include and exclude.
>
> Considering the practical use, if url length is not a problem(i.e.
> practically user will not have a requirement to use around 400 columns per
> search, if we average word length to 5), we should go for GET.
>
> Otherwise, we can go for POST.
>
> Thanks.
>
> On Thu, Mar 24, 2016 at 9:01 AM, Sachith Withana  wrote:
>
>> Hi Gimantha,
>>
>> I think the point made by Udara is valid.
>> Anyways if the user wants to get a selected number of columns, the
>> chances are it won't exceed the url limit.
>> ( due to the that number being low).
>>
>> Thanks,
>> Sachith
>>
>> On Thu, Mar 24, 2016 at 2:21 PM, Gimantha Bandara 
>> wrote:
>>
>>> Hi Sanjeewa,
>>>
>>> Thank you for the guidelines doc. The exact problem is discussed in 10.2
>>> in the above document. We will be filtering the record values in each
>>> records by providing the required columns, so only those column values will
>>> be returned with each record. According to the document the POST can be
>>> used either for updating/creating a resource or for initializing a
>>> processing function. In our case we will be simply retrieving records but
>>> need to provide a filter for the record values. So from users perspective,
>>> it will be doing some processing and returning filtered records.
>>>
>>> We can actually implement the following url, but we cannot exactly say
>>> if it will exceed the url length limit.
>>> GET /analytics/tables/{tableName}?columns=column1,column2]
>>>
>>> Or we can implement something like below,
>>>
>>> POST /analytics/tables/tableName/
>>>
>>> {
>>>   from:
>>>   to:
>>>   start:
>>>   count:
>>>   columns :[c1,c2,c3]
>>> }
>>>
>>> or
>>>
>>> POST /analytics/
>>>
>>> {
>>>   tableName :
>>>   from:
>>>   to:
>>>   start:
>>>   count:
>>>   columns :[c1,c2,c3]
>>> }
>>>
>>> Considering the url length limit, I think the second option is better.
>>> WDYT?
>>>
>>> On Thu, Mar 24, 2016 at 12:33 PM, Sanjeewa Malalgoda 
>>> wrote:
>>>
 Hi Gimantha,
 Did you refer REST API guidelines document attached in this mail[1] in
 architecture mailing list.
 When we develop REST APIs please follow that document and if you see
 anything missed there please let us know.

 [1][Architecture] REST API Guidelines


 Thanks,
 sanjeewa.

 On Wed, Mar 23, 2016 at 8:01 PM, Gimantha Bandara 
 wrote:

> Hi all,
>
>
> We have a REST API in DAS to retrieve records in a specific table. It
> supports GET method with the following url format.
>
> /analytics/tables/{tableName}/{from}/{to}/{start}/{count}
>
> Sending a GET request to above url will give the records between given
> "from", "to" time range starting from index "start" with  "count"  page
> size.
>
> Now we need to change the API, so that the user can define the record
> columns/fields he wants. Current API will return the records with all the
> values/columns. To do that, we can allow the user to define the columns he
> needs, in the payload. But it seems that having a payload with a GET is 
> not
> the convention/the best practice.
>
> POST can be used to send the column names as a payload, but here we
> are not making any updates to {tableName} resource. We will be just
> retrieving records using a POST. So it also seems not the convention/the
> best practice.
>
> The only solution I can think of is, having a different resource path
> to get the records with only specified fields/columns. Are there any other
> solutions?
>
> Thanks,
> Gimantha
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --

 *Sanjeewa Malalgoda*
 WSO2 Inc.
 Mobile : +94713068779

 blog
 

[Dev] C5 - mention the port in use as part of error message

2016-04-03 Thread Sumedha Rubasinghe
It's port 8080 that is being used here. But no way to find that through the
exception through from
Netty HTTP Transport listener.



[2016-04-04 08:37:03,872]  INFO
{org.wso2.carbon.transport.http.netty.listener.NettyListener} - Starting
Netty Http Transport Listener
[2016-04-04 08:37:03,876]  INFO
{org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
org.wso2.carbon.uuf.UUFService@5f33122c
Exception in thread "Timer-0" java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at
io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
at
io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:485)
at
io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1089)
at
io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:430)
at
io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:415)
at
io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:903)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
at
io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348)
at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:356)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
at
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
at
io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
>>>


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


Re: [Dev] Kubernetes (and Openshift) modules

2016-04-03 Thread Chamila De Alwis
Hi Ramon,

One issue that can arise if a configuration step is introduced to Docker
images is the propagation of configuration changes in a running cluster. If
the configuration is done for a generic server at startup, the subsequent
changes to the config has to go live following either of two ways.

1. Kill the existing containers and let the PaaS healing component (ex: RC
in Kubernetes) to spawn new ones and let new config be applied to those
containers. This approach is the same for an already configured image.
2. Have some kind of an agent on the containers to poll and pull new config
to the existing containers. This approach is used in Apache Stratos, and it
tends to introduce another set of problems, when it comes to containers.

IMO, although the management of different, already configured, servers is
bit cumbersome, it can ease the already PaaS recommended approaches to
various problems at the cluster management layer. For example, Kubernetes
has a rolling-update, which takes an image name as the new version of the
server to gradually update the cluster. This encourages an immutable image
with changes that get written in to versioned images.

For the maintainability issue of the images, can a Puppet based image
building pipeline be applied? This would have a single Puppet server
(configuration automation layer) which would trigger (on demand or by a
hook of some kind) an image build with a certain set of parameters, that
would result in a (new version or an overwriting version for the) set of
Docker images in the local Docker registry. Additionally this event can
trigger another execution where the Kubernetes clusters are updated. This
way the configuration is preserved and effectively separated from the
images and image maintenance is simplified.


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Fri, Apr 1, 2016 at 4:58 PM, Imesh Gunaratne  wrote:

> Hi Ramon,
>
> On Thu, Mar 31, 2016 at 9:42 PM, Ramon Gordillo 
> wrote:
>
>> Hi.
>>
>> After doing some research and test on the puppet modules and dockerfiles
>> with WSO2 API Management, I have some thoughts to share on this list.
>>
>> Great! It's really nice to hear you thoughts on $subject.
>
>>
>> Some particular information, for example the DNS domain name for the
>> cluster, the namespace, etc, is a runtime configuration. That is, if we
>> want, for example, to deploy an instance of api management per project (aka
>> namespace), with the current approach it will require to build a set of
>> docker containers per project. Currently, we have 10 teams working in their
>> own projects, so you can figure out the maintainability of 10 different
>> sets.
>>
>> It's not a must create a container image with all the required
> configuration. It's just a best practice. If the startup time of the server
> is not a problem, running an orchestration tool at the startup should be
> fine. We followed the same pattern few months back with Stratos + K8S.
>
> However I personally prefer fully configured container images approach as
> they are less error prone and may not depend on any dynamic parameters. It
> would be much similar to a product archive which includes all
> configurations, the person who deploys the product just need to extract and
> run. If there are any security concerns on the credentials and keys
> packaged, we might need to use a tool like secure wallet.
>
>
>> Apart from it, there are some configuration information that can be
>> obtained from the kubernetes master instead of hardcoding it in the
>> container. Even the kubernetes master information is injected in the
>> containers in environment variables (
>> http://kubernetes.io/docs/user-guide/environment-guide/, see
>> KUBERNETES_SERVICE_HOST, KUBERNETES_SERVICE_PORT).
>>
>> With those considerations, I propose to use puppet also at runtime when
>> starting the container, for configuring it using template environment
>> variables (which are instanced at runtime), and getting as much information
>> as we could automatically instead of forcing the user to provide it.
>>
>
> Yes, as I mentioned above, it's a compromise between optimizing the
> startup time against the number of container images we need to maintain.
>
>>
>> Other than that, I also propose to have one script at startup per PaaS
>> solution. It will customize the peculiarities of this PaaS, and adapt it to
>> the agnostic configuration. For example, in kubernetes, some environment
>> variables are injected by default in the container, but in CloudFoundry,
>> for example, other variables with other structure is used. With this
>> approach, the container can be used for both of them (even with standalone
>> docker-compose for example) just having a simple and reusable script for
>> any PaaS solution.
>>
>
> AFAIU this would be only needed if we are to do configurations at the
> startup. If