Re: [Dev] Issues with JSON Schema in representing data types and in representing an array which contains non identical elements

2016-04-10 Thread Sohani Weerasinghe
Ok.  For an xml like below, let's have the value field as follows



   xyz

   071655339

   0112655333 


{

"$schema": "http://json-schema.org/draft-04/schema#;,

"title": "person",

"id": "http://wso2jsonschema.org;,

"type": "object",

"properties": {

"firstName": {

"id": "http://wso2jsonschema.org/firstName;,

"type": "string"

},

"phone": {

"id": "http://wso2jsonschema.org/phone;,

"type": "array",

"items": [{

* “value”:{*

* "id": "http://wso2jsonschema.org/phone/phone
",*

* "type": "number"*

* },*

"attributes": {

"primary": {

"id": "http://wso2jsonschema.org/phone/primary;,

"type": "boolean"

}

}

}]

}

}

}



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

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

On Mon, Apr 11, 2016 at 11:05 AM, Nuwan Pallewela  wrote:

> Hi Sohani,
>
> +1 for the above approaches.
>
> We have to decide on how to represent non identical elements with same
> name. Viraj is working on it.
>
> Thanks,
> Nuwan
>
> On Mon, Apr 11, 2016 at 10:44 AM, Sohani Weerasinghe 
> wrote:
>
>> Hi Viraj/Nuwan,
>>
>> Really appreciate your input on this
>>
>> Thanks,
>> Sohani
>>
>> Sohani Weerasinghe
>> Software Engineer
>> WSO2, Inc: http://wso2.com
>>
>> Mobile  : +94 716439774
>> Blog :http://christinetechtips.blogspot.com/
>> Twitter  : https://twitter.com/sohanichristine
>>
>> On Tue, Apr 5, 2016 at 12:06 PM, Sohani Weerasinghe 
>> wrote:
>>
>>> Hi All,
>>>
>>> This is regarding clarifying the $subject.
>>>
>>> If we consider an xml as below, we are currently generating the below
>>> json schema
>>>
>>> http://www.w3.org/TR/html4/;>
>>> susinda
>>> 07177101
>>> 011265565501
>>> 
>>>
>>>
>>> {
>>> "$schema": "http://json-schema.org/draft-04/schema#;,
>>> "title": "h:person",
>>> "id": "http://wso2jsonschema.org;,
>>> "type": "object",
>>> "properties": {
>>> "firstName": {
>>> "id": "http://wso2jsonschema.org/firstName;,
>>> "type": "string"
>>> },
>>> "phone": {
>>> "id": "http://wso2jsonschema.org/phone;,
>>> "type": "array",
>>> "items": [{
>>> "id": "http://wso2jsonschema.org/phone/0;,
>>> "type": "object",
>>> "properties": {
>>> "ext": {
>>> "id": "http://wso2jsonschema.org/phone/0/ext;,
>>> "type": "number"
>>> }
>>> },
>>> "attributes": {
>>> "primary": {
>>> "id": "http://wso2jsonschema.org/phone/0/primary;,
>>> "type": "boolean"
>>> }
>>> }
>>> }]
>>> }
>>> }
>>> }
>>>
>>> But the issue is, we don't have any field to define the data type for
>>> phone ( eg: number). So are we going to introduce a new field as below to
>>> define the type?
>>>
>>> "phone": {
>>> "id": "http://wso2jsonschema.org/phone;,
>>> "type": "array",
>>> "items": [{
>>> "id": "http://wso2jsonschema.org/phone/0;,
>>> "type": "object",
>>> "value":{
>>>   type: "number",
>>>   
>>>
>>>   } ,
>>> "properties": {
>>> "ext": {
>>> "id": "http://wso2jsonschema.org/phone/0/ext;,
>>> "type": "number"
>>> }
>>> },
>>> "attributes": {
>>> "primary": {
>>> "id": "http://wso2jsonschema.org/phone/0/primary;,
>>> "type": "boolean"
>>> }
>>> }
>>> }]
>>> }
>>>
>>> Please advice.
>>>
>>> Also, how are we going to represent an array which contains non
>>> identical elements. Are we going to introduce xsi:type?
>>>
>>> Really appreciate your input in proceeding with this.
>>>
>>> Thanks,
>>> Sohani
>>>
>>> Sohani Weerasinghe
>>> Software Engineer
>>> WSO2, Inc: http://wso2.com
>>>
>>> Mobile  : +94 716439774
>>> Blog :http://christinetechtips.blogspot.com/
>>> Twitter  : https://twitter.com/sohanichristine
>>>
>>
>>
>
>
> --
> --
>
> *Nuwan Chamara Pallewela*
>
>
> *Software Engineer*
>
> *WSO2, Inc. *http://wso2.com
> *lean . enterprise . middleware*
>
> Email   *nuw...@wso2.com *
> Mobile  *+94719079739 <%2B94719079739>@*
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to set dynamic width size When adding custom buttons/functions to gadget title in toolbar Dashboard Server

2016-04-10 Thread Rajeenthini Satkunam
Hi Dakshika,UX Team,

Brief Description about the feature and current implementation
===

Currently I am working on the feature "*Flexibility to add/remove more
functions/buttons in the gadget title bar", *that is giving more
flexibility to gadget author to add their custom buttons and hide/show
default buttons(configurations/maximize/remove) of the gadget title bar*.*You
can get more details from above replies as well.

- We need to show the disabled button/functions in design view and only
need to hide it from view mode of dashboard.

- We need to have a design for the indication of disabled buttons/functions
in design mode.Simply we can tell that it needs to give a proper impression
that the button/function will not be shown in view mode of dashboard.

- We need to have proper responsive User Interface in case of gadget author
adding more button/functions in gadget title bar.We came up with the
solution that we can add drop-down for these huge number of buttons.

As per offline discussions with Jerad,Sharon and Sinthuja we came up with
the idea to how to show the design and view level functions/buttons, how we
are going to show the disabled button in the design mode of dashboard and
drop-down list for gadget title bar functions/buttons.

Hope I have included all the points .@Jerad Please add if I have missed
anything.So it is really helpful that we can have quick meeting on these
above topics to proceed further implementation.



On Tue, Apr 5, 2016 at 9:37 AM, Jerad Rutnam  wrote:

> Hi Rajeenthini,
>
> Yes, +1. We should have both options, passing an icon class or image icon.
> May be we can handle it by giving an extra key-value.
>
> e.g.
>
> icon: 'image' || 'css',
> image: 'url-path',
> css: 'fw fw-icon'
>
> Cheers!
> Jerad
>
>
> On Tue, Apr 5, 2016 at 9:30 AM, Rajeenthini Satkunam  > wrote:
>
>> Hi Jerad,
>>
>> Thank you for your prompt reply.I also have this concern that "passing an
>> icon image" as you mentioned above reply since we are maintaining set of
>> default icons.But IMHO we need to handle the situation like if the gadget
>> author need to add a totally new function/button which icon image is not
>> exist already in default icon set.
>>
>> Your suggestion would be appreciated.
>>
>> On Tue, Apr 5, 2016 at 8:59 AM, Jerad Rutnam  wrote:
>>
>>> Hi Rajeenthini,
>>>
>>> IMO I think we should handle the width from css end. I will help you on
>>> it. And have concern in passing an icon image, is this optional? And do we
>>> have an option of passing an icon class instead?
>>>
>>> Regards,
>>> Jerad
>>>
>>>
>>> On Tue, Apr 5, 2016 at 7:33 AM, Rajeenthini Satkunam <
>>> rajeenth...@wso2.com> wrote:
>>>
 Hi All,

 Currently I am working on a task that "*Flexibility to add/remove more
 functions/buttons in the gadget title bar*".Previously we have
 distinct set of 3 buttons/functions(configuration,maximize,remove) in
 gadget title bar.By the task I am working on can have more than above three
 buttons/functions those are custom buttons specific to each and every
 gadgets add by gadget author.

 These custom buttons are adding by gadget author through the
 configuration file of gadget(Gadget.json) as below.

 "toolbarButtons":{
   "custom":[
 {
   "action": "REFRESH",
   "image": "icon://gadget/date-picker/images/stamp.png"
 },
 {
   "action": "DOWNLOAD",
   "image": "icon://gadget/date-picker/images/wifi.png"
 }
   ],
   "default":{
 "maximize": false,
 "configuration": true,
 "remove": true
   }
 }

 *Faced Problem*
 **

 When adding more than 3 buttons/functions, the issue that I am facing
 is those set of buttons are not present at the title bar it is situated
 just below the title bar.You can find the image below.


 ​

 In UI/UX perspective my finding is gadget title width is calculated as
 below

 .gadget .gadget-heading > .gadget-title {
 width: calc(100% - 154px);
 }


 *The proposed solution==*

 We can have a extra property called width for each and every custom
 button and we can get the addition(sum) of widths' of all custom buttons
 and can subtract from 100% of width of title tool bar.

 "toolbarButtons":{
   "custom":[
 {
   "action": "REFRESH",
   "image": "icon://gadget/date-picker/images/stamp.png",

   "width": "7px"

 }
   ],
   "default":{
 "maximize": false,
 "configuration": true,
 "remove": true
   }
 }

 .gadget .gadget-heading > .gadget-title {
 width: calc(100% - {Addition of widths});
 }

 *Limitations and problems of proposed solution above*
 

[Dev] [DEV][IOT][CDMF] Errors when building new device type in IoTS using cdmf-devicetype-archetype-master

2016-04-10 Thread 云展智创
Hi all,

I created a new device type using cdmf-devicetype-archetype-master tool, and 
updated the file device-deployer.xml (used IoTS-M3 SNAPSHOT, and copied file 
org.wso2.carbon.device.mgt.iot_2.0.4.SNAPSHOT.jar into the 
repository/components/plugins folder) with correct info of my device type, but 
when I built the file "device-deployer.xml”, I got the following errors:

Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Could 
not find artifact 
com.smartcloudex:com.smartcloudex.thermometer.feature:zip:1.0.0-SNAPSHOT in 
wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/)

I found that the feature target file had been built (but I didn’t know why the 
version is 1.0-SNAPSHOT, and not 1.0.0-SNAPSHOT) in the feature folder of my 
device type, so I used following command to install it, successfully finished.

mvn install:install-file -DgroupId=com.smartcloudex 
-DartifactId=com.smartcloudex.thermometer.feature -Dversion=1.0.0-SNAPSHOT 
-Dpackaging=zip 
-Dfile=/Users/zhanwen/Documents/WSO2/IOT/wso2iots-1.0.0-SNAPSHOT/samples/thermometer/feature/feature/target/com.smartcloudex.thermometer.feature-1.0-SNAPSHOT.zip

But when I executed the command “mvn clean install -f device-deployer.xml” 
again I got the following errors. Was there any mistake in my steps? Could 
anyone help me? Thanks.

[INFO] 
[INFO] --- carbon-p2-plugin:1.5.3:p2-profile-gen (feature-install) @ 
devicetype-feature-installation ---
[INFO] Running Equinox P2 Director Application
[INFO] Command line:
/bin/sh -c cd /Users/zhanwen/Documents/WSO2/IOT/wso2iots-1.0.0-SNAPSHOT 
&& /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/jre/bin/java 
-jar 
/Users/zhanwen/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110725-1610.jar
 -nosplash -application org.eclipse.equinox.p2.director -metadataRepository 
file:/Users/zhanwen/Documents/WSO2/IOT/wso2iots-1.0.0-SNAPSHOT/samples/p2-repo 
-artifactRepository 
file:/Users/zhanwen/Documents/WSO2/IOT/wso2iots-1.0.0-SNAPSHOT/samples/p2-repo 
-profileProperties org.eclipse.update.install.features=true -installIU 
org.coffeeking.connectedcup.feature.group/1.9.2.SNAPSHOT,org.homeautomation.currentsensor.feature.group/1.9.2.SNAPSHOT,com.smartcloudex.feature.group/1.0.0.SNAPSHOT,
 -bundlepool repository/components -shared repository/components/p2 
-destination repository/components/default -profile default -roaming
Installation failed.
The installable unit com.smartcloudex.feature.group/1.0.0.SNAPSHOT has not been 
found.
Application failed, log file location: 
/Users/zhanwen/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/configuration/1460350536316.log

[INFO] 
[INFO] Reactor Summary:
[INFO] 
[INFO] WSO2 IoTS(Device Types) - Connected Cup Component .. SUCCESS [  0.660 s]
[INFO] WSO2 IoTS(Device Types) - Connected Cup Component .. SUCCESS [  0.025 s]
[INFO] WSO2 IoTS(Device Types) - Connected Cup Analytics capp SUCCESS [  1.296 
s]
[INFO] WSO2 IoTS(Device Types) - Connected Cup CDMF Plugin  SUCCESS [  2.029 s]
[INFO] WSO2 IoTS(Device Types) - Connected Cup Controller Service SUCCESS [  
2.668 s]
[INFO] WSO2 IoTS(Device Types) - Connected Cup Manager Service SUCCESS [  1.366 
s]
[INFO] WSO2 IoTS(Device Types) - Connected Cup Agent Web app SUCCESS [  1.292 s]
[INFO] WSO2 IoTS(Device Types) - Connected Cup UI . SUCCESS [  0.137 s]
[INFO] WSO2 IoTS(Device Types) - Connected Cup Feature Parent SUCCESS [  0.017 
s]
[INFO] WSO2 IoTS(Device Types) - Connected Cup Feature  SUCCESS [  2.407 s]
[INFO] org.homeautomation.currentsensor.analytics . SUCCESS [  0.110 s]
[INFO] org.homeautomation.currentsensor.plugin for CDMF ... SUCCESS [  0.801 s]
[INFO] org.homeautomation.currentsensor.controller API  SUCCESS [  1.831 s]
[INFO] org.homeautomation.currentsensor.manager ... SUCCESS [  1.488 s]
[INFO] org.homeautomation.currentsensor.agent . SUCCESS [  0.057 s]
[INFO] org.homeautomation.currentsensor.ui  SUCCESS [  0.097 s]
[INFO] currentsensor .. SUCCESS [  0.015 s]
[INFO] WSO2 IoTS(Device Types) - Current Sensor Component . SUCCESS [  0.018 s]
[INFO] feature  SUCCESS [  0.015 s]
[INFO] org.homeautomation.currentsensor.feature ... SUCCESS [  1.742 s]
[INFO] thermometer  SUCCESS [  0.015 s]
[INFO] thermometer-component .. SUCCESS [  0.018 s]
[INFO] com.smartcloudex.thermometer.plugin  SUCCESS [  0.795 s]
[INFO] com.smartcloudex.thermometer.controller  SUCCESS [  1.297 s]
[INFO] com.smartcloudex.thermometer.manager ... SUCCESS [  0.815 s]
[INFO] com.smartcloudex.thermometer.analytics . SUCCESS [  0.226 s]
[INFO] com.smartcloudex.thermometer.ui 

Re: [Dev] Issues with JSON Schema in representing data types and in representing an array which contains non identical elements

2016-04-10 Thread Nuwan Pallewela
Hi Sohani,

+1 for the above approaches.

We have to decide on how to represent non identical elements with same
name. Viraj is working on it.

Thanks,
Nuwan

On Mon, Apr 11, 2016 at 10:44 AM, Sohani Weerasinghe 
wrote:

> Hi Viraj/Nuwan,
>
> Really appreciate your input on this
>
> Thanks,
> Sohani
>
> Sohani Weerasinghe
> Software Engineer
> WSO2, Inc: http://wso2.com
>
> Mobile  : +94 716439774
> Blog :http://christinetechtips.blogspot.com/
> Twitter  : https://twitter.com/sohanichristine
>
> On Tue, Apr 5, 2016 at 12:06 PM, Sohani Weerasinghe 
> wrote:
>
>> Hi All,
>>
>> This is regarding clarifying the $subject.
>>
>> If we consider an xml as below, we are currently generating the below
>> json schema
>>
>> http://www.w3.org/TR/html4/;>
>> susinda
>> 07177101
>> 011265565501
>> 
>>
>>
>> {
>> "$schema": "http://json-schema.org/draft-04/schema#;,
>> "title": "h:person",
>> "id": "http://wso2jsonschema.org;,
>> "type": "object",
>> "properties": {
>> "firstName": {
>> "id": "http://wso2jsonschema.org/firstName;,
>> "type": "string"
>> },
>> "phone": {
>> "id": "http://wso2jsonschema.org/phone;,
>> "type": "array",
>> "items": [{
>> "id": "http://wso2jsonschema.org/phone/0;,
>> "type": "object",
>> "properties": {
>> "ext": {
>> "id": "http://wso2jsonschema.org/phone/0/ext;,
>> "type": "number"
>> }
>> },
>> "attributes": {
>> "primary": {
>> "id": "http://wso2jsonschema.org/phone/0/primary;,
>> "type": "boolean"
>> }
>> }
>> }]
>> }
>> }
>> }
>>
>> But the issue is, we don't have any field to define the data type for
>> phone ( eg: number). So are we going to introduce a new field as below to
>> define the type?
>>
>> "phone": {
>> "id": "http://wso2jsonschema.org/phone;,
>> "type": "array",
>> "items": [{
>> "id": "http://wso2jsonschema.org/phone/0;,
>> "type": "object",
>> "value":{
>>   type: "number",
>>   
>>
>>   } ,
>> "properties": {
>> "ext": {
>> "id": "http://wso2jsonschema.org/phone/0/ext;,
>> "type": "number"
>> }
>> },
>> "attributes": {
>> "primary": {
>> "id": "http://wso2jsonschema.org/phone/0/primary;,
>> "type": "boolean"
>> }
>> }
>> }]
>> }
>>
>> Please advice.
>>
>> Also, how are we going to represent an array which contains non identical
>> elements. Are we going to introduce xsi:type?
>>
>> Really appreciate your input in proceeding with this.
>>
>> Thanks,
>> Sohani
>>
>> Sohani Weerasinghe
>> Software Engineer
>> WSO2, Inc: http://wso2.com
>>
>> Mobile  : +94 716439774
>> Blog :http://christinetechtips.blogspot.com/
>> Twitter  : https://twitter.com/sohanichristine
>>
>
>


-- 
--

*Nuwan Chamara Pallewela*


*Software Engineer*

*WSO2, Inc. *http://wso2.com
*lean . enterprise . middleware*

Email   *nuw...@wso2.com *
Mobile  *+94719079739@*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issues with JSON Schema in representing data types and in representing an array which contains non identical elements

2016-04-10 Thread Sohani Weerasinghe
Hi Viraj/Nuwan,

Really appreciate your input on this

Thanks,
Sohani

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

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

On Tue, Apr 5, 2016 at 12:06 PM, Sohani Weerasinghe  wrote:

> Hi All,
>
> This is regarding clarifying the $subject.
>
> If we consider an xml as below, we are currently generating the below json
> schema
>
> http://www.w3.org/TR/html4/;>
> susinda
> 07177101
> 011265565501
> 
>
>
> {
> "$schema": "http://json-schema.org/draft-04/schema#;,
> "title": "h:person",
> "id": "http://wso2jsonschema.org;,
> "type": "object",
> "properties": {
> "firstName": {
> "id": "http://wso2jsonschema.org/firstName;,
> "type": "string"
> },
> "phone": {
> "id": "http://wso2jsonschema.org/phone;,
> "type": "array",
> "items": [{
> "id": "http://wso2jsonschema.org/phone/0;,
> "type": "object",
> "properties": {
> "ext": {
> "id": "http://wso2jsonschema.org/phone/0/ext;,
> "type": "number"
> }
> },
> "attributes": {
> "primary": {
> "id": "http://wso2jsonschema.org/phone/0/primary;,
> "type": "boolean"
> }
> }
> }]
> }
> }
> }
>
> But the issue is, we don't have any field to define the data type for
> phone ( eg: number). So are we going to introduce a new field as below to
> define the type?
>
> "phone": {
> "id": "http://wso2jsonschema.org/phone;,
> "type": "array",
> "items": [{
> "id": "http://wso2jsonschema.org/phone/0;,
> "type": "object",
> "value":{
>   type: "number",
>   
>
>   } ,
> "properties": {
> "ext": {
> "id": "http://wso2jsonschema.org/phone/0/ext;,
> "type": "number"
> }
> },
> "attributes": {
> "primary": {
> "id": "http://wso2jsonschema.org/phone/0/primary;,
> "type": "boolean"
> }
> }
> }]
> }
>
> Please advice.
>
> Also, how are we going to represent an array which contains non identical
> elements. Are we going to introduce xsi:type?
>
> Really appreciate your input in proceeding with this.
>
> Thanks,
> Sohani
>
> Sohani Weerasinghe
> Software Engineer
> WSO2, Inc: http://wso2.com
>
> Mobile  : +94 716439774
> Blog :http://christinetechtips.blogspot.com/
> Twitter  : https://twitter.com/sohanichristine
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Include carbon.yml and other config files in Carbon Core feature

2016-04-10 Thread Niranjan Karunanandham
Hi all,

i have created a JIRA [1] for this. Along with the conf folder, shall we
include* bin folder* (in the distribution/carbon-home) as well into
org.wso2.carbon.core.server.feature? WDYT?

[1] - https://wso2.org/jira/browse/CARBON-15851

Regards,
Nira

On Tue, Apr 5, 2016 at 3:45 PM, Kishanthan Thangarajah 
wrote:

>
>
> On Tue, Apr 5, 2016 at 3:32 PM, Niranjan Karunanandham 
> wrote:
>
>> Hi Kishanthan,
>>
>> On Tue, Apr 5, 2016 at 3:23 PM, Kishanthan Thangarajah <
>> kishant...@wso2.com> wrote:
>>
>>> +1
>>>
>>> Also by default, we need to have place holders for name, id and version
>>> properties rather than having hard coded values. The product team can then
>>> put their relevant values at build time. Let's add this also along with
>>> this change.
>>>
>> By default shall we have the above values as empty in the carbon.yml. If
>> it is not defined pick it up from System properties (using the place holder
>> carbon.name, carbon.id and carbon.version for name, id and version
>> respectively). If both are not define then get the values from a Constant.
>> WDYT?
>>
>
> IMO, let's have it like this.
>
> id: ${server.key}
> name: ${server.name}
> version: ${server.version}
>
> If no value is set for this under system property or env property, we
> should use the default values which comes from the configuration bean. The
> product team can use their own values when building a product.
>
>
>>
>>>
>>>
>>> On Tue, Apr 5, 2016 at 3:14 PM, Aruna Karunarathna 
>>> wrote:
>>>
 On Fri, Apr 1, 2016 at 2:31 PM, Niranjan Karunanandham <
 niran...@wso2.com> wrote:

> Hi Devs,
>
> In Carbon 5, the carbon.yml, log4j2.xml and etc., are in the
> distribution folder and copied to the distribution pack via bin.xml. Why
> don't we add these configuration files to Carbon Server Feature
> (org.wso2.carbon.core.server.feature) which are copied to the packed when
> the feature is installed. WDYT?
>
> +1. we should bring the configurations also when we install the core
 feature.

 Regards,
> Nira
>
> --
>
> *Niranjan Karunanandham*
> Senior Software Engineer - WSO2 Inc.
> WSO2 Inc.: http://www.wso2.com
>
> ___
> 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


>>>
>>>
>>>
>>> --
>>> *Kishanthan Thangarajah*
>>> Associate Technical Lead,
>>> Platform Technologies Team,
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>>
>>> Mobile - +94773426635
>>> Blog - *http://kishanthan.wordpress.com
>>> *
>>> Twitter - *http://twitter.com/kishanthan
>>> *
>>>
>>
>>
>> Regards,
>> Nira
>>
>> --
>>
>> *Niranjan Karunanandham*
>> Senior Software Engineer - WSO2 Inc.
>> WSO2 Inc.: http://www.wso2.com
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Associate Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com *
> Twitter - *http://twitter.com/kishanthan *
>



-- 

*Niranjan Karunanandham*
Senior Software Engineer - WSO2 Inc.
WSO2 Inc.: http://www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Call mediator does not return the body for 202 response

2016-04-10 Thread Prabath Ariyarathna
Hi Niranjan.

Hope you talking about call mediator non-blocking mode. I have checked the
attached configuration with the ESB 4.9.0 and got the correct response to
the client side. Please check with the attached configuration.

[2016-04-10 00:48:51,839] DEBUG - wire >> "POST /services/Pass202
HTTP/1.1[\r][\n]"
[2016-04-10 00:48:51,839] DEBUG - wire >> "Host:
wso2s-macbook-pro-2.local:8280[\r][\n]"
[2016-04-10 00:48:51,839] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
[2016-04-10 00:48:51,839] DEBUG - wire >> "Content-Length: 0[\r][\n]"
[2016-04-10 00:48:51,840] DEBUG - wire >> "User-Agent: Mozilla/5.0
(Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/49.0.2623.110 Safari/537.36[\r][\n]"
[2016-04-10 00:48:51,840] DEBUG - wire >> "Cache-Control: no-cache[\r][\n]"
[2016-04-10 00:48:51,840] DEBUG - wire >> "Origin:
chrome-extension://mkhojklkhkdaghjjfdnphfphiaiohkef[\r][\n]"
[2016-04-10 00:48:51,840] DEBUG - wire >> "Accept: */*[\r][\n]"
[2016-04-10 00:48:51,840] DEBUG - wire >> "Accept-Encoding: gzip,
deflate[\r][\n]"
[2016-04-10 00:48:51,840] DEBUG - wire >> "Accept-Language:
en-US,en;q=0.8[\r][\n]"
[2016-04-10 00:48:51,840] DEBUG - wire >> "Cookie:
_js_datr=gKYAV5aKWlsDZ_YtuCr_q50T[\r][\n]"
[2016-04-10 00:48:51,840] DEBUG - wire >> "[\r][\n]"
[2016-04-10 00:48:51,888]  INFO - TimeoutHandler This engine will expire
all callbacks after : 120 seconds, irrespective of the timeout action,
after the specified or optional timeout
[2016-04-10 00:48:51,986] DEBUG - wire << "POST /test HTTP/1.1[\r][\n]"
[2016-04-10 00:48:51,986] DEBUG - wire << "Cookie:
_js_datr=gKYAV5aKWlsDZ_YtuCr_q50T[\r][\n]"
[2016-04-10 00:48:51,986] DEBUG - wire << "Origin:
chrome-extension://mkhojklkhkdaghjjfdnphfphiaiohkef[\r][\n]"
[2016-04-10 00:48:51,986] DEBUG - wire << "Accept: */*[\r][\n]"
[2016-04-10 00:48:51,986] DEBUG - wire << "Cache-Control: no-cache[\r][\n]"
[2016-04-10 00:48:51,986] DEBUG - wire << "Accept-Encoding: gzip,
deflate[\r][\n]"
[2016-04-10 00:48:51,987] DEBUG - wire << "Accept-Language:
en-US,en;q=0.8[\r][\n]"
[2016-04-10 00:48:51,987] DEBUG - wire << "Content-Type:
application/x-www-form-urlencoded; charset=UTF-8[\r][\n]"
[2016-04-10 00:48:51,987] DEBUG - wire << "Transfer-Encoding:
chunked[\r][\n]"
[2016-04-10 00:48:51,987] DEBUG - wire << "Host: demo4010703.mockable.io:80
[\r][\n]"
[2016-04-10 00:48:51,987] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
[2016-04-10 00:48:51,987] DEBUG - wire << "User-Agent:
Synapse-PT-HttpComponents-NIO[\r][\n]"
[2016-04-10 00:48:51,987] DEBUG - wire << "[\r][\n]"
[2016-04-10 00:48:51,987] DEBUG - wire << "0[\r][\n]"
[2016-04-10 00:48:51,987] DEBUG - wire << "[\r][\n]"
[2016-04-10 00:48:52,318] DEBUG - wire >> "HTTP/1.1 202 Accepted[\r][\n]"
[2016-04-10 00:48:52,318] DEBUG - wire >> "Content-Type: application/xml;
charset=UTF-8[\r][\n]"
[2016-04-10 00:48:52,318] DEBUG - wire >> "access-control-allow-origin:
*[\r][\n]"
[2016-04-10 00:48:52,318] DEBUG - wire >> "Date: Sat, 09 Apr 2016 19:18:52
GMT[\r][\n]"
[2016-04-10 00:48:52,318] DEBUG - wire >> "Server: Google Frontend[\r][\n]"
[2016-04-10 00:48:52,319] DEBUG - wire >> "Content-Length: 11[\r][\n]"
[2016-04-10 00:48:52,319] DEBUG - wire >> "[\r][\n]"
[2016-04-10 00:48:52,319] DEBUG - wire >> "test"
[2016-04-10 00:48:52,329] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
[2016-04-10 00:48:52,329] DEBUG - wire << "access-control-allow-origin:
*[\r][\n]"
[2016-04-10 00:48:52,329] DEBUG - wire << "Content-Type: application/xml;
charset=UTF-8[\r][\n]"
[2016-04-10 00:48:52,329] DEBUG - wire << "Date: Sat, 09 Apr 2016 19:18:52
GMT[\r][\n]"
[2016-04-10 00:48:52,329] DEBUG - wire << "Transfer-Encoding:
chunked[\r][\n]"
[2016-04-10 00:48:52,329] DEBUG - wire << "Connection: keep-alive[\r][\n]"
[2016-04-10 00:48:52,329] DEBUG - wire << "[\r][\n]"
[2016-04-10 00:48:52,330] DEBUG - wire << "b[\r][\n]"
[2016-04-10 00:48:52,330] DEBUG - wire << "test[\r][\n]"
[2016-04-10 00:48:52,330] DEBUG - wire << "0[\r][\n]"
[2016-04-10 00:48:52,330] DEBUG - wire << "[\r][\n]"

Thanks

On Sat, Apr 9, 2016 at 9:36 PM, Niranjan Karunanandham 
wrote:

> Hi ESB Team,
>
> In ESB 4.9.0, the call mediator is not sending the response body to the
> client when the backend sends a 202 response with body. The wirelogs are
> available [1]. Is this a known bug?
>
> [1] -
> [2016-04-08 10:52:41,048] DEBUG - wire >> "POST /services/test4
> HTTP/1.1[\r][\n]"
> [2016-04-08 10:52:41,048] DEBUG - wire >> "User-Agent: curl/7.35.0[\r][\n]"
> [2016-04-08 10:52:41,049] DEBUG - wire >> "Host: localhost:8243[\r][\n]"
> [2016-04-08 10:52:41,049] DEBUG - wire >> "Accept: application/xml[\r][\n]"
> [2016-04-08 10:52:41,049] DEBUG - wire >> "Content-Type:
> application/xml[\r][\n]"
> [2016-04-08 10:52:41,049] DEBUG - wire >> "Content-Length: 12[\r][\n]"
> [2016-04-08 10:52:41,049] DEBUG - wire >> "[\r][\n]"
> [2016-04-08 10:52:41,049] DEBUG - wire >> "hello"
> [2016-04-08 10:52:41,051]  INFO - LogMediator To: /services/test4,
> 

Re: [Dev] Call mediator does not return the body for 202 response

2016-04-10 Thread Niranjan Karunanandham
Hi Prabath,

If so, isn't this a bug? I have created a public JIRA [1] for this.

[1] - https://wso2.org/jira/browse/ESBJAVA-4552

Regards,
Nira

On Sun, Apr 10, 2016 at 10:28 AM, Prabath Ariyarathna 
wrote:

> Hi Niranjan.
>
> I think this only happens when you have content aware mediators in your
> sequence(You can check with removing full log mediators). Inside the
> RelayUtils we are checking status code equal to the 202[1] and ignore build
> the response body. So reason could be this. You can debug the RelayUtils to
> confirm the behavior.
>
> [1]
> https://github.com/wso2/wso2-synapse/blob/Apache-Synapse-2.1.3-wso2v11/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/passthru/util/RelayUtils.java#L92-L96
>
> Thanks.
>
> On Sun, Apr 10, 2016 at 3:04 AM, Niranjan Karunanandham  > wrote:
>
>> Hi Prabath,
>>
>> With the backend you have provided it works. I tested it with a backend
>> where the response header has Transfer-Encoding has chunked. I mocked the
>> backend in another ESB instance. I have attached attached both the proxy
>> services where proxy test4 (ESB instance with offset 0) calls MyMockProxy
>> (in another ESB instance with offset 1).
>>
>> Regards,
>> Nira
>>
>>
>> On Sun, Apr 10, 2016 at 12:51 AM, Prabath Ariyarathna > > wrote:
>>
>>> Hi Niranjan.
>>>
>>> Hope you talking about call mediator non-blocking mode. I have checked
>>> the attached configuration with the ESB 4.9.0 and got the correct response
>>> to the client side. Please check with the attached configuration.
>>>
>>> [2016-04-10 00:48:51,839] DEBUG - wire >> "POST /services/Pass202
>>> HTTP/1.1[\r][\n]"
>>> [2016-04-10 00:48:51,839] DEBUG - wire >> "Host:
>>> wso2s-macbook-pro-2.local:8280[\r][\n]"
>>> [2016-04-10 00:48:51,839] DEBUG - wire >> "Connection:
>>> keep-alive[\r][\n]"
>>> [2016-04-10 00:48:51,839] DEBUG - wire >> "Content-Length: 0[\r][\n]"
>>> [2016-04-10 00:48:51,840] DEBUG - wire >> "User-Agent: Mozilla/5.0
>>> (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko)
>>> Chrome/49.0.2623.110 Safari/537.36[\r][\n]"
>>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Cache-Control:
>>> no-cache[\r][\n]"
>>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Origin:
>>> chrome-extension://mkhojklkhkdaghjjfdnphfphiaiohkef[\r][\n]"
>>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Accept: */*[\r][\n]"
>>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Accept-Encoding: gzip,
>>> deflate[\r][\n]"
>>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Accept-Language:
>>> en-US,en;q=0.8[\r][\n]"
>>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Cookie:
>>> _js_datr=gKYAV5aKWlsDZ_YtuCr_q50T[\r][\n]"
>>> [2016-04-10 00:48:51,840] DEBUG - wire >> "[\r][\n]"
>>> [2016-04-10 00:48:51,888]  INFO - TimeoutHandler This engine will expire
>>> all callbacks after : 120 seconds, irrespective of the timeout action,
>>> after the specified or optional timeout
>>> [2016-04-10 00:48:51,986] DEBUG - wire << "POST /test HTTP/1.1[\r][\n]"
>>> [2016-04-10 00:48:51,986] DEBUG - wire << "Cookie:
>>> _js_datr=gKYAV5aKWlsDZ_YtuCr_q50T[\r][\n]"
>>> [2016-04-10 00:48:51,986] DEBUG - wire << "Origin:
>>> chrome-extension://mkhojklkhkdaghjjfdnphfphiaiohkef[\r][\n]"
>>> [2016-04-10 00:48:51,986] DEBUG - wire << "Accept: */*[\r][\n]"
>>> [2016-04-10 00:48:51,986] DEBUG - wire << "Cache-Control:
>>> no-cache[\r][\n]"
>>> [2016-04-10 00:48:51,986] DEBUG - wire << "Accept-Encoding: gzip,
>>> deflate[\r][\n]"
>>> [2016-04-10 00:48:51,987] DEBUG - wire << "Accept-Language:
>>> en-US,en;q=0.8[\r][\n]"
>>> [2016-04-10 00:48:51,987] DEBUG - wire << "Content-Type:
>>> application/x-www-form-urlencoded; charset=UTF-8[\r][\n]"
>>> [2016-04-10 00:48:51,987] DEBUG - wire << "Transfer-Encoding:
>>> chunked[\r][\n]"
>>> [2016-04-10 00:48:51,987] DEBUG - wire << "Host:
>>> demo4010703.mockable.io:80[\r][\n]"
>>> [2016-04-10 00:48:51,987] DEBUG - wire << "Connection:
>>> Keep-Alive[\r][\n]"
>>> [2016-04-10 00:48:51,987] DEBUG - wire << "User-Agent:
>>> Synapse-PT-HttpComponents-NIO[\r][\n]"
>>> [2016-04-10 00:48:51,987] DEBUG - wire << "[\r][\n]"
>>> [2016-04-10 00:48:51,987] DEBUG - wire << "0[\r][\n]"
>>> [2016-04-10 00:48:51,987] DEBUG - wire << "[\r][\n]"
>>> [2016-04-10 00:48:52,318] DEBUG - wire >> "HTTP/1.1 202 Accepted[\r][\n]"
>>> [2016-04-10 00:48:52,318] DEBUG - wire >> "Content-Type:
>>> application/xml; charset=UTF-8[\r][\n]"
>>> [2016-04-10 00:48:52,318] DEBUG - wire >> "access-control-allow-origin:
>>> *[\r][\n]"
>>> [2016-04-10 00:48:52,318] DEBUG - wire >> "Date: Sat, 09 Apr 2016
>>> 19:18:52 GMT[\r][\n]"
>>> [2016-04-10 00:48:52,318] DEBUG - wire >> "Server: Google
>>> Frontend[\r][\n]"
>>> [2016-04-10 00:48:52,319] DEBUG - wire >> "Content-Length: 11[\r][\n]"
>>> [2016-04-10 00:48:52,319] DEBUG - wire >> "[\r][\n]"
>>> [2016-04-10 00:48:52,319] DEBUG - wire >> "test"
>>> [2016-04-10 00:48:52,329] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
>>> [2016-04-10 00:48:52,329] 

Re: [Dev] Call mediator does not return the body for 202 response

2016-04-10 Thread Niranjan Karunanandham
Hi Prabath,

With the backend you have provided it works. I tested it with a backend
where the response header has Transfer-Encoding has chunked. I mocked the
backend in another ESB instance. I have attached attached both the proxy
services where proxy test4 (ESB instance with offset 0) calls MyMockProxy
(in another ESB instance with offset 1).

Regards,
Nira


On Sun, Apr 10, 2016 at 12:51 AM, Prabath Ariyarathna 
wrote:

> Hi Niranjan.
>
> Hope you talking about call mediator non-blocking mode. I have checked
> the attached configuration with the ESB 4.9.0 and got the correct response
> to the client side. Please check with the attached configuration.
>
> [2016-04-10 00:48:51,839] DEBUG - wire >> "POST /services/Pass202
> HTTP/1.1[\r][\n]"
> [2016-04-10 00:48:51,839] DEBUG - wire >> "Host:
> wso2s-macbook-pro-2.local:8280[\r][\n]"
> [2016-04-10 00:48:51,839] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
> [2016-04-10 00:48:51,839] DEBUG - wire >> "Content-Length: 0[\r][\n]"
> [2016-04-10 00:48:51,840] DEBUG - wire >> "User-Agent: Mozilla/5.0
> (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/49.0.2623.110 Safari/537.36[\r][\n]"
> [2016-04-10 00:48:51,840] DEBUG - wire >> "Cache-Control: no-cache[\r][\n]"
> [2016-04-10 00:48:51,840] DEBUG - wire >> "Origin:
> chrome-extension://mkhojklkhkdaghjjfdnphfphiaiohkef[\r][\n]"
> [2016-04-10 00:48:51,840] DEBUG - wire >> "Accept: */*[\r][\n]"
> [2016-04-10 00:48:51,840] DEBUG - wire >> "Accept-Encoding: gzip,
> deflate[\r][\n]"
> [2016-04-10 00:48:51,840] DEBUG - wire >> "Accept-Language:
> en-US,en;q=0.8[\r][\n]"
> [2016-04-10 00:48:51,840] DEBUG - wire >> "Cookie:
> _js_datr=gKYAV5aKWlsDZ_YtuCr_q50T[\r][\n]"
> [2016-04-10 00:48:51,840] DEBUG - wire >> "[\r][\n]"
> [2016-04-10 00:48:51,888]  INFO - TimeoutHandler This engine will expire
> all callbacks after : 120 seconds, irrespective of the timeout action,
> after the specified or optional timeout
> [2016-04-10 00:48:51,986] DEBUG - wire << "POST /test HTTP/1.1[\r][\n]"
> [2016-04-10 00:48:51,986] DEBUG - wire << "Cookie:
> _js_datr=gKYAV5aKWlsDZ_YtuCr_q50T[\r][\n]"
> [2016-04-10 00:48:51,986] DEBUG - wire << "Origin:
> chrome-extension://mkhojklkhkdaghjjfdnphfphiaiohkef[\r][\n]"
> [2016-04-10 00:48:51,986] DEBUG - wire << "Accept: */*[\r][\n]"
> [2016-04-10 00:48:51,986] DEBUG - wire << "Cache-Control: no-cache[\r][\n]"
> [2016-04-10 00:48:51,986] DEBUG - wire << "Accept-Encoding: gzip,
> deflate[\r][\n]"
> [2016-04-10 00:48:51,987] DEBUG - wire << "Accept-Language:
> en-US,en;q=0.8[\r][\n]"
> [2016-04-10 00:48:51,987] DEBUG - wire << "Content-Type:
> application/x-www-form-urlencoded; charset=UTF-8[\r][\n]"
> [2016-04-10 00:48:51,987] DEBUG - wire << "Transfer-Encoding:
> chunked[\r][\n]"
> [2016-04-10 00:48:51,987] DEBUG - wire << "Host: demo4010703.mockable.io:80
> [\r][\n]"
> [2016-04-10 00:48:51,987] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
> [2016-04-10 00:48:51,987] DEBUG - wire << "User-Agent:
> Synapse-PT-HttpComponents-NIO[\r][\n]"
> [2016-04-10 00:48:51,987] DEBUG - wire << "[\r][\n]"
> [2016-04-10 00:48:51,987] DEBUG - wire << "0[\r][\n]"
> [2016-04-10 00:48:51,987] DEBUG - wire << "[\r][\n]"
> [2016-04-10 00:48:52,318] DEBUG - wire >> "HTTP/1.1 202 Accepted[\r][\n]"
> [2016-04-10 00:48:52,318] DEBUG - wire >> "Content-Type: application/xml;
> charset=UTF-8[\r][\n]"
> [2016-04-10 00:48:52,318] DEBUG - wire >> "access-control-allow-origin:
> *[\r][\n]"
> [2016-04-10 00:48:52,318] DEBUG - wire >> "Date: Sat, 09 Apr 2016 19:18:52
> GMT[\r][\n]"
> [2016-04-10 00:48:52,318] DEBUG - wire >> "Server: Google Frontend[\r][\n]"
> [2016-04-10 00:48:52,319] DEBUG - wire >> "Content-Length: 11[\r][\n]"
> [2016-04-10 00:48:52,319] DEBUG - wire >> "[\r][\n]"
> [2016-04-10 00:48:52,319] DEBUG - wire >> "test"
> [2016-04-10 00:48:52,329] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
> [2016-04-10 00:48:52,329] DEBUG - wire << "access-control-allow-origin:
> *[\r][\n]"
> [2016-04-10 00:48:52,329] DEBUG - wire << "Content-Type: application/xml;
> charset=UTF-8[\r][\n]"
> [2016-04-10 00:48:52,329] DEBUG - wire << "Date: Sat, 09 Apr 2016 19:18:52
> GMT[\r][\n]"
> [2016-04-10 00:48:52,329] DEBUG - wire << "Transfer-Encoding:
> chunked[\r][\n]"
> [2016-04-10 00:48:52,329] DEBUG - wire << "Connection: keep-alive[\r][\n]"
> [2016-04-10 00:48:52,329] DEBUG - wire << "[\r][\n]"
> [2016-04-10 00:48:52,330] DEBUG - wire << "b[\r][\n]"
> [2016-04-10 00:48:52,330] DEBUG - wire << "test[\r][\n]"
> [2016-04-10 00:48:52,330] DEBUG - wire << "0[\r][\n]"
> [2016-04-10 00:48:52,330] DEBUG - wire << "[\r][\n]"
>
> Thanks
>
> On Sat, Apr 9, 2016 at 9:36 PM, Niranjan Karunanandham 
> wrote:
>
>> Hi ESB Team,
>>
>> In ESB 4.9.0, the call mediator is not sending the response body to the
>> client when the backend sends a 202 response with body. The wirelogs are
>> available [1]. Is this a known bug?
>>
>> [1] -
>> [2016-04-08 10:52:41,048] DEBUG - wire 

Re: [Dev] Call mediator does not return the body for 202 response

2016-04-10 Thread Prabath Ariyarathna
Hi Niranjan.

I think this only happens when you have content aware mediators in your
sequence(You can check with removing full log mediators). Inside the
RelayUtils we are checking status code equal to the 202[1] and ignore build
the response body. So reason could be this. You can debug the RelayUtils to
confirm the behavior.

[1]
https://github.com/wso2/wso2-synapse/blob/Apache-Synapse-2.1.3-wso2v11/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/passthru/util/RelayUtils.java#L92-L96

Thanks.

On Sun, Apr 10, 2016 at 3:04 AM, Niranjan Karunanandham 
wrote:

> Hi Prabath,
>
> With the backend you have provided it works. I tested it with a backend
> where the response header has Transfer-Encoding has chunked. I mocked the
> backend in another ESB instance. I have attached attached both the proxy
> services where proxy test4 (ESB instance with offset 0) calls MyMockProxy
> (in another ESB instance with offset 1).
>
> Regards,
> Nira
>
>
> On Sun, Apr 10, 2016 at 12:51 AM, Prabath Ariyarathna 
> wrote:
>
>> Hi Niranjan.
>>
>> Hope you talking about call mediator non-blocking mode. I have checked
>> the attached configuration with the ESB 4.9.0 and got the correct response
>> to the client side. Please check with the attached configuration.
>>
>> [2016-04-10 00:48:51,839] DEBUG - wire >> "POST /services/Pass202
>> HTTP/1.1[\r][\n]"
>> [2016-04-10 00:48:51,839] DEBUG - wire >> "Host:
>> wso2s-macbook-pro-2.local:8280[\r][\n]"
>> [2016-04-10 00:48:51,839] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
>> [2016-04-10 00:48:51,839] DEBUG - wire >> "Content-Length: 0[\r][\n]"
>> [2016-04-10 00:48:51,840] DEBUG - wire >> "User-Agent: Mozilla/5.0
>> (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko)
>> Chrome/49.0.2623.110 Safari/537.36[\r][\n]"
>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Cache-Control:
>> no-cache[\r][\n]"
>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Origin:
>> chrome-extension://mkhojklkhkdaghjjfdnphfphiaiohkef[\r][\n]"
>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Accept: */*[\r][\n]"
>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Accept-Encoding: gzip,
>> deflate[\r][\n]"
>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Accept-Language:
>> en-US,en;q=0.8[\r][\n]"
>> [2016-04-10 00:48:51,840] DEBUG - wire >> "Cookie:
>> _js_datr=gKYAV5aKWlsDZ_YtuCr_q50T[\r][\n]"
>> [2016-04-10 00:48:51,840] DEBUG - wire >> "[\r][\n]"
>> [2016-04-10 00:48:51,888]  INFO - TimeoutHandler This engine will expire
>> all callbacks after : 120 seconds, irrespective of the timeout action,
>> after the specified or optional timeout
>> [2016-04-10 00:48:51,986] DEBUG - wire << "POST /test HTTP/1.1[\r][\n]"
>> [2016-04-10 00:48:51,986] DEBUG - wire << "Cookie:
>> _js_datr=gKYAV5aKWlsDZ_YtuCr_q50T[\r][\n]"
>> [2016-04-10 00:48:51,986] DEBUG - wire << "Origin:
>> chrome-extension://mkhojklkhkdaghjjfdnphfphiaiohkef[\r][\n]"
>> [2016-04-10 00:48:51,986] DEBUG - wire << "Accept: */*[\r][\n]"
>> [2016-04-10 00:48:51,986] DEBUG - wire << "Cache-Control:
>> no-cache[\r][\n]"
>> [2016-04-10 00:48:51,986] DEBUG - wire << "Accept-Encoding: gzip,
>> deflate[\r][\n]"
>> [2016-04-10 00:48:51,987] DEBUG - wire << "Accept-Language:
>> en-US,en;q=0.8[\r][\n]"
>> [2016-04-10 00:48:51,987] DEBUG - wire << "Content-Type:
>> application/x-www-form-urlencoded; charset=UTF-8[\r][\n]"
>> [2016-04-10 00:48:51,987] DEBUG - wire << "Transfer-Encoding:
>> chunked[\r][\n]"
>> [2016-04-10 00:48:51,987] DEBUG - wire << "Host:
>> demo4010703.mockable.io:80[\r][\n]"
>> [2016-04-10 00:48:51,987] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
>> [2016-04-10 00:48:51,987] DEBUG - wire << "User-Agent:
>> Synapse-PT-HttpComponents-NIO[\r][\n]"
>> [2016-04-10 00:48:51,987] DEBUG - wire << "[\r][\n]"
>> [2016-04-10 00:48:51,987] DEBUG - wire << "0[\r][\n]"
>> [2016-04-10 00:48:51,987] DEBUG - wire << "[\r][\n]"
>> [2016-04-10 00:48:52,318] DEBUG - wire >> "HTTP/1.1 202 Accepted[\r][\n]"
>> [2016-04-10 00:48:52,318] DEBUG - wire >> "Content-Type: application/xml;
>> charset=UTF-8[\r][\n]"
>> [2016-04-10 00:48:52,318] DEBUG - wire >> "access-control-allow-origin:
>> *[\r][\n]"
>> [2016-04-10 00:48:52,318] DEBUG - wire >> "Date: Sat, 09 Apr 2016
>> 19:18:52 GMT[\r][\n]"
>> [2016-04-10 00:48:52,318] DEBUG - wire >> "Server: Google
>> Frontend[\r][\n]"
>> [2016-04-10 00:48:52,319] DEBUG - wire >> "Content-Length: 11[\r][\n]"
>> [2016-04-10 00:48:52,319] DEBUG - wire >> "[\r][\n]"
>> [2016-04-10 00:48:52,319] DEBUG - wire >> "test"
>> [2016-04-10 00:48:52,329] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
>> [2016-04-10 00:48:52,329] DEBUG - wire << "access-control-allow-origin:
>> *[\r][\n]"
>> [2016-04-10 00:48:52,329] DEBUG - wire << "Content-Type: application/xml;
>> charset=UTF-8[\r][\n]"
>> [2016-04-10 00:48:52,329] DEBUG - wire << "Date: Sat, 09 Apr 2016
>> 19:18:52 GMT[\r][\n]"
>> [2016-04-10 00:48:52,329] DEBUG - wire << "Transfer-Encoding:
>> chunked[\r][\n]"
>> 

Re: [Dev] Handling Kubernetes Specific Configurations in Puppet/Hiera

2016-04-10 Thread Chamila De Alwis
Hi Isuru, Imesh,

IMO we shouldn't have any platform specific restructuring in
wso2/puppet-modules. This should be done at the end user's setup. Another
point is that we have now decoupled wso2/puppet-modules from
wso2/dockerfiles and users are not required to incorporate puppet-modules
in their container setup.

If the intention is to ease the deployment process (at least one) for the
user, we should ship the Kubernetes related Puppet manifests and Hiera data
with wso2/kubernetes-artifacts (or wso2/dockerfiles as it is the repository
involved in the image creation step in this process).

IMO Docker images will not be able to run OOB on Kubernetes using
wso2/puppet-modules and wso2/kubernetes-artifacts. There will anyway be
changes related to the Kubernetes Membership Scheme in wso2/puppet-modules
and in wso2/kubernetes-artifacts where environment dependent changes such
as image names, SecureVault passwords, etc. need to be adjusted.


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



On Mon, Apr 11, 2016 at 1:36 AM, Imesh Gunaratne  wrote:

> Hi Gayan,
>
> On Sun, Apr 10, 2016 at 5:02 PM, Gayan Gunarathne  wrote:
>
>> IMO this will create maintainability issue. We need to maintain all the
>> separate hieradata structure for each scenarios.For the one particular
>> alternation we need to change whole set of files.
>>
>
> In this scenario user experience is much more important than the
> maintainability of few yaml files. If we do not do this, users will not be
> able to use puppet modules OOB until they manually update configuration
> values in above files. The whole idea of this effort is to let users do
> following:
>
>- Setup a K8S cluster
>- Download puppet modules zip file(s).
>- Download docker files
>- Build docker images using puppet for different product profiles
>- Deploy WSO2 product on K8S using K8S artifacts
>
> The above process will allow users to deploy any WSO2 product (with
> mutlitple deployment patterns) on K8S with zero configurations. This will
> be true for any VM based platform or any other container cluster management
> system.
>
>>
>> Why can't we do this by using defined types in Hiera and lookup
>> parameters for a given instance? Based on the identify keys we set for
>> each vm, docker, K8S etc we can select the appropriate data set from
>> Hiera file.
>>
>
> Will you be able to provide a sample?
>
> Thanks
>
>>
>> Thanks,
>> Gayan
>>
>>
>> On Sat, Apr 9, 2016 at 8:28 AM, Imesh Gunaratne  wrote:
>>
>>>
>>> On Fri, Apr 8, 2016 at 7:48 PM, Isuru Haththotuwa 
>>> wrote:


 hieradata
 |--- dev
|--- wso2
| 
  |--- 
|-- *vm*
 |--
 default.yaml
 |--
 manager.yaml
 |--
 worker.yaml
|--* docker*
 |--
 default.yaml
 |--
 manager.yaml
 |--
 worker.yaml
|-- *kubernetes*

 |--
 default.yaml
 |--
 manager.yaml
 |--
 worker.yaml


>>> +1 for the suggestion Isuru, will proceed with this. We can add other
>>> platforms such as OpenShift, Mesos, Cloud Foundry on the same level.
>>>
>>> Thanks
>>>


 Thanks
>
> --
> *Imesh Gunaratne*
> Senior Technical Lead
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: http://imesh.io
> Lean . Enterprise . Middleware
>
>


 --
 Thanks and Regards,

 Isuru H.
 +94 716 358 048* *



>>>
>>>
>>> --
>>> *Imesh Gunaratne*
>>> Senior Technical Lead
>>> WSO2 Inc: http://wso2.com
>>> T: +94 11 214 5345 M: +94 77 374 2057
>>> W: http://imesh.io
>>> Lean . Enterprise . Middleware
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>> Committer & PMC Member, Apache Stratos
>> email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
>>
>>
>>
>> 

Re: [Dev] Handling Kubernetes Specific Configurations in Puppet/Hiera

2016-04-10 Thread Imesh Gunaratne
Hi Gayan,

On Sun, Apr 10, 2016 at 5:02 PM, Gayan Gunarathne  wrote:

> IMO this will create maintainability issue. We need to maintain all the
> separate hieradata structure for each scenarios.For the one particular
> alternation we need to change whole set of files.
>

In this scenario user experience is much more important than the
maintainability of few yaml files. If we do not do this, users will not be
able to use puppet modules OOB until they manually update configuration
values in above files. The whole idea of this effort is to let users do
following:

   - Setup a K8S cluster
   - Download puppet modules zip file(s).
   - Download docker files
   - Build docker images using puppet for different product profiles
   - Deploy WSO2 product on K8S using K8S artifacts

The above process will allow users to deploy any WSO2 product (with
mutlitple deployment patterns) on K8S with zero configurations. This will
be true for any VM based platform or any other container cluster management
system.

>
> Why can't we do this by using defined types in Hiera and lookup
> parameters for a given instance? Based on the identify keys we set for
> each vm, docker, K8S etc we can select the appropriate data set from
> Hiera file.
>

Will you be able to provide a sample?

Thanks

>
> Thanks,
> Gayan
>
>
> On Sat, Apr 9, 2016 at 8:28 AM, Imesh Gunaratne  wrote:
>
>>
>> On Fri, Apr 8, 2016 at 7:48 PM, Isuru Haththotuwa 
>> wrote:
>>>
>>>
>>> hieradata
>>> |--- dev
>>>|--- wso2
>>>| 
>>>  |--- 
>>>|-- *vm*
>>> |--
>>> default.yaml
>>> |--
>>> manager.yaml
>>> |--
>>> worker.yaml
>>>|--* docker*
>>> |--
>>> default.yaml
>>> |--
>>> manager.yaml
>>> |--
>>> worker.yaml
>>>|-- *kubernetes*
>>>
>>> |--
>>> default.yaml
>>> |--
>>> manager.yaml
>>> |--
>>> worker.yaml
>>>
>>>
>> +1 for the suggestion Isuru, will proceed with this. We can add other
>> platforms such as OpenShift, Mesos, Cloud Foundry on the same level.
>>
>> Thanks
>>
>>>
>>>
>>> Thanks

 --
 *Imesh Gunaratne*
 Senior Technical Lead
 WSO2 Inc: http://wso2.com
 T: +94 11 214 5345 M: +94 77 374 2057
 W: http://imesh.io
 Lean . Enterprise . Middleware


>>>
>>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> +94 716 358 048* *
>>>
>>>
>>>
>>
>>
>> --
>> *Imesh Gunaratne*
>> Senior Technical Lead
>> WSO2 Inc: http://wso2.com
>> T: +94 11 214 5345 M: +94 77 374 2057
>> W: http://imesh.io
>> Lean . Enterprise . Middleware
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Imesh Gunaratne*
Senior Technical Lead
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: http://imesh.io
Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Automation Framework]

2016-04-10 Thread Rajjaz Mohammed
+1

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

If we modify  the connector integrationBase we can optimize the integration
test time.

-- 
Thank you
Best Regards

*Rajjaz HM*
Associate Software Engineer
Platform Extension Team
WSO2 Inc. 
lean | enterprise | middleware
Mobile | +94752833834|+94777226874
Email   | raj...@wso2.com
LinkedIn  | Blogger
 | WSO2 Profile

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


Re: [Dev] [APIM][BPS] Configure API-Subscription Workflow for APIM packed with IoTS

2016-04-10 Thread Shabir Mohamed
Hi All,

Found the reason for the above. IoTSever pack was missing the
proxy-service *"WorkflowCallbackService.xml"
*thats available in the APIM 1.10.0.

It is this service that is set as the callback URL in the workflow creation
request sent to BPS. Hence when the task is approved and BPS tries to
contact this service it is unable to find it. When I included this service
in the IoTS pack all worked fine.

However, it is strange that there was no error or warning that was printed
on the BPS console with regards to this.
In addition, shouldn't this callback proxy-service be part of the apimgt
feature if someone installs it another product?

*@Lalaji: Got your reply whilst typing this.*

Yeah, that's right. I have been debugging for sometime trying to find out
where this method was getting called. And checked the request sent to BPS
which has the callback URL and found that it was not there in the IoTS Pack.


Thanks Very Much

-
*Shabir Mohamed*
*Software Engineer*
WSO2 Inc.; http://wso2.com
Email: sha...@wso2.com 
Mobile: +94 77 3516019 | +94 71 6583393

On Sun, Apr 10, 2016 at 5:25 PM, Shabir Mohamed  wrote:

> Hi All,
>
> I am trying to do $subject for the IoTServer as explained in [1]
> 
> .
>
> However, since the jaggeryapp *"admin-dashboard"* is not copied from the
> *bin.xml* whilst the distribution is packed I have copied it manually to
> the jaggeryapp folder in the IoTS pack.
>
> In addition given that the jaggeryapp *"store"* and the corresponding
> jaggery-modules are renamed as *"apimstore"* in the IoTS pack I have
> changed all places in the admin-dashboard jaggeryapp which says
> *"require('apistore')"* to *'require(apimstore)'.*
>
> I have also configured BPS accordingly as explained in [1]. I have written
> my custom extension for APISubscription workflow and engaged it in
> *"wokflow-extensions.xml"*.
>
> When I create an API the *"execute()"* method of the WorkflowExecutor gets
> triggered and my custom logic is executed. However, when I approve a
> subscription task in the admin-dashboard jaggeryapp the *"complete()"*
> method of the WorkflowExecutor is not triggered as expected.
>
> This behaviour is only evident when I try the custom extension in the IoTS
> Pack. Works fine for the APIM 1.10.0 pack.
>
> *IoTServer users the carbon-apimgt component version: 5.0.3*
>
> Any guidance & insight with regards to this will be a huge help :).
>
>
> [1]
> https://docs.wso2.com/display/AM1100/Adding+an+API+Subscription+Workflow
> -
> *Shabir Mohamed*
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> Email: sha...@wso2.com 
> Mobile: +94 77 3516019 | +94 71 6583393
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM][BPS] Configure API-Subscription Workflow for APIM packed with IoTS

2016-04-10 Thread Lalaji Sureshika
Hi Shabir,

The admin-dashboard workflow view will useful only if the workflow is a BPS
based business process and if it contains human tasks.The admin dashboard
workflow view will be used for approving/disproving human tasks associated
in BPS side triggered process by the workflow.Once the user
approve/disaprove the task from this UI,the next steps of BPS process will
triger and then it'll call the callback url of APIM.From the callback url
of APIM ,it'll call 'complete' method of WorkflowExecutor. Thing to note is
admin-dashboard,workflow related UIs are BPS human task related UIs and
those UIs are not  triggering WorkFlowExecutor 'complete' method.

Thanks;

On Sun, Apr 10, 2016 at 5:25 PM, Shabir Mohamed  wrote:

> Hi All,
>
> I am trying to do $subject for the IoTServer as explained in [1]
> 
> .
>
> However, since the jaggeryapp *"admin-dashboard"* is not copied from the
> *bin.xml* whilst the distribution is packed I have copied it manually to
> the jaggeryapp folder in the IoTS pack.
>
> In addition given that the jaggeryapp *"store"* and the corresponding
> jaggery-modules are renamed as *"apimstore"* in the IoTS pack I have
> changed all places in the admin-dashboard jaggeryapp which says
> *"require('apistore')"* to *'require(apimstore)'.*
>
> I have also configured BPS accordingly as explained in [1]. I have written
> my custom extension for APISubscription workflow and engaged it in
> *"wokflow-extensions.xml"*.
>
> When I create an API the *"execute()"* method of the WorkflowExecutor gets
> triggered and my custom logic is executed. However, when I approve a
> subscription task in the admin-dashboard jaggeryapp the *"complete()"*
> method of the WorkflowExecutor is not triggered as expected.
>
> This behaviour is only evident when I try the custom extension in the IoTS
> Pack. Works fine for the APIM 1.10.0 pack.
>
> *IoTServer users the carbon-apimgt component version: 5.0.3*
>
> Any guidance & insight with regards to this will be a huge help :).
>
>
> [1]
> https://docs.wso2.com/display/AM1100/Adding+an+API+Subscription+Workflow
> -
> *Shabir Mohamed*
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> Email: sha...@wso2.com 
> Mobile: +94 77 3516019 | +94 71 6583393
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Lalaji Sureshika
WSO2, Inc.;  http://wso2.com/
email: lal...@wso2.com; cell: +94 71 608 6811
blog: http://lalajisureshika.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM][BPS] Configure API-Subscription Workflow for APIM packed with IoTS

2016-04-10 Thread Shabir Mohamed
Hi All,

I am trying to do $subject for the IoTServer as explained in [1]
.

However, since the jaggeryapp *"admin-dashboard"* is not copied from the
*bin.xml* whilst the distribution is packed I have copied it manually to
the jaggeryapp folder in the IoTS pack.

In addition given that the jaggeryapp *"store"* and the corresponding
jaggery-modules are renamed as *"apimstore"* in the IoTS pack I have
changed all places in the admin-dashboard jaggeryapp which says
*"require('apistore')"* to *'require(apimstore)'.*

I have also configured BPS accordingly as explained in [1]. I have written
my custom extension for APISubscription workflow and engaged it in
*"wokflow-extensions.xml"*.

When I create an API the *"execute()"* method of the WorkflowExecutor gets
triggered and my custom logic is executed. However, when I approve a
subscription task in the admin-dashboard jaggeryapp the *"complete()"*
method of the WorkflowExecutor is not triggered as expected.

This behaviour is only evident when I try the custom extension in the IoTS
Pack. Works fine for the APIM 1.10.0 pack.

*IoTServer users the carbon-apimgt component version: 5.0.3*

Any guidance & insight with regards to this will be a huge help :).


[1] https://docs.wso2.com/display/AM1100/Adding+an+API+Subscription+Workflow
-
*Shabir Mohamed*
*Software Engineer*
WSO2 Inc.; http://wso2.com
Email: sha...@wso2.com 
Mobile: +94 77 3516019 | +94 71 6583393
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Handling Kubernetes Specific Configurations in Puppet/Hiera

2016-04-10 Thread Gayan Gunarathne
IMO this will create maintainability issue. We need to maintain all the
separate hieradata structure for each scenarios.For the one particular
alternation we need to change whole set of files.

Why can't we do this by using defined types in Hiera and lookup parameters
for a given instance? Based on the identify keys we set for each vm,
docker, K8S etc we can select the appropriate data set from Hiera file.

Thanks,
Gayan


On Sat, Apr 9, 2016 at 8:28 AM, Imesh Gunaratne  wrote:

>
> On Fri, Apr 8, 2016 at 7:48 PM, Isuru Haththotuwa  wrote:
>>
>>
>> hieradata
>> |--- dev
>>|--- wso2
>>| 
>>  |--- 
>>|-- *vm*
>> |--
>> default.yaml
>> |--
>> manager.yaml
>> |--
>> worker.yaml
>>|--* docker*
>> |--
>> default.yaml
>> |--
>> manager.yaml
>> |--
>> worker.yaml
>>|-- *kubernetes*
>>
>> |--
>> default.yaml
>> |--
>> manager.yaml
>> |--
>> worker.yaml
>>
>>
> +1 for the suggestion Isuru, will proceed with this. We can add other
> platforms such as OpenShift, Mesos, Cloud Foundry on the same level.
>
> Thanks
>
>>
>>
>> Thanks
>>>
>>> --
>>> *Imesh Gunaratne*
>>> Senior Technical Lead
>>> WSO2 Inc: http://wso2.com
>>> T: +94 11 214 5345 M: +94 77 374 2057
>>> W: http://imesh.io
>>> Lean . Enterprise . Middleware
>>>
>>>
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* *
>>
>>
>>
>
>
> --
> *Imesh Gunaratne*
> Senior Technical Lead
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: http://imesh.io
> Lean . Enterprise . Middleware
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev