[Dev] [Analytics] NoClassDefFoundError:com.codahale.metrics.json.MetricsModule when installing latest analytics features in IOT server

2016-10-03 Thread Waruna Jayaweera
Hi,
After moving to latest analytics version(1.2.8) , we are getting class not
found error [1].

This is due to the package import conflicts of spark bundle and
io.dropwizard.metrics.json which imports different version of jackson
packages. IOT server packs multiple jackson versions 2.4.4 and 2.8.2.
Spark bundle has jackson import range of [2.4.0,2.5.0), so wired to
jackson-core 2.4.4.
Io.dropwizard.metrics.json bundle has jackson import range of [2.4,3), so
wired to jackson-core 2.8.2.
Spark also required to import Io.dropwizard.metrics.json but it fails due
to two different version of jackson packages in spark bundle class space.
So we need to upgrade the spark jackson version range to  [2.4,3) or we
need to downgrade metrics jackson version to [2.4.0,2.5.0).
Appreciate any suggestions to fix the issue.

[1]
ERROR - AnalyticsComponent Error initializing analytics executor: Unable to
create analytics client. com/codahale/metrics/json/MetricsModule
org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException:
Unable to create analytics client. com/codahale/metrics/json/MetricsModule
at org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.
initializeSparkContext(SparkAnalyticsExecutor.java:321)
at org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.
initializeAnalyticsClientLocal(SparkAnalyticsExecutor.java:303)
at org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.
initializeAnalyticsClient(SparkAnalyticsExecutor.java:292)
at org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.
initializeSparkServer(SparkAnalyticsExecutor.java:180)
at org.wso2.carbon.analytics.spark.core.internal.
AnalyticsComponent.activate(AnalyticsComponent.java:88)
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.eclipse.equinox.internal.ds.model.ServiceComponent.
activate(ServiceComponent.java:260)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.
activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.
build(ServiceComponentProp.java:345)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(
InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(
InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(
SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.
serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(
BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.
dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.
dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.
publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.
publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.
register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.
registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.
registerService(BundleContextImpl.java:433)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.
registerService(BundleContextImpl.java:451)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.
registerService(BundleContextImpl.java:950)
at org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceComponent.
activate(AnalyticsDataServiceComponent.java:72)
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.eclipse.equinox.internal.ds.model.ServiceComponent.
activate(ServiceComponent.java:260)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.
activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.
build(ServiceComponentProp.java:345)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(
InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(
InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(
SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.
serviceChanged(Fil

[Dev] [ESB 490] Create empty named json array inside an xslt

2016-10-03 Thread Udara Liyanage
Hi,

I want to generate an empty json array ("addresses":[]) when addresses
count is zero. I tried below as [1] which resulted only in null.


 

  

  


[1] https://docs.wso2.com/display/ESB500/JSON+Support


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

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


Re: [Dev] [MB] Message Expiration Task and Messages shown in UI

2016-10-03 Thread Asanka Abeyweera
Hi Sirojan,

Yes, In user's perspective it is better not to show the expired messages.

How are we going to filter out the expired messages from UI? Since we have
the expiry time information in the database, I think we can use that
information to filter.

On Tue, Oct 4, 2016 at 12:00 PM, Sirojan Tharmakulasingam 
wrote:

> Hi All,
>
> Currently, we have two tasks to deal with expired messages.
>
> 1. Pre-delivery expiry message deletion task --> Will catch the expired
> messages at the Message flusher
> 2. Periodic message deletion task --> each 15 minutes it checks expired
> messages and deleted them for the messages which are not in our safety slot
> count region (we have this buffer assuming that those will be assigned to
> slot delivery worker in the near future)
>
> The problem:
>
> Even though the messages are expired, they are still residing in the
> database for some time.
>
> 1. Messages that are not in the safe-zone - 15 minutes (worst case) -
> until the periodic task runs
> 2. Messages that are in the safe-zone - until a subscription comes and
> messages tries to deliver and get caught at the flusher/
>
> During the above time,  those messages are in the DB even though they are
> expired. In the UI we are showing them as valid messages and valid message
> count during the aforementioned time.
>
> Solution:
>
> 1. We are not showing the messages in the UI even though they are in the
> DB (waiting for delete by the expiry tasks)
>
> WDYT? Suggestions, please?
>
> Regards,
> --
> Sirojan Tharmakulasingam
> Software Engineer, WSO2 Inc. http://wso2.com
> Email: siro...@wso2.com
> Mobile: +94779797913
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Asanka Abeyweera
Senior Software Engineer
WSO2 Inc.

Phone: +94 712228648
Blog: a5anka.github.io


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


[Dev] [MB] Message Expiration Task and Messages shown in UI

2016-10-03 Thread Sirojan Tharmakulasingam
Hi All,

Currently, we have two tasks to deal with expired messages.

1. Pre-delivery expiry message deletion task --> Will catch the expired
messages at the Message flusher
2. Periodic message deletion task --> each 15 minutes it checks expired
messages and deleted them for the messages which are not in our safety slot
count region (we have this buffer assuming that those will be assigned to
slot delivery worker in the near future)

The problem:

Even though the messages are expired, they are still residing in the
database for some time.

1. Messages that are not in the safe-zone - 15 minutes (worst case) - until
the periodic task runs
2. Messages that are in the safe-zone - until a subscription comes and
messages tries to deliver and get caught at the flusher/

During the above time,  those messages are in the DB even though they are
expired. In the UI we are showing them as valid messages and valid message
count during the aforementioned time.

Solution:

1. We are not showing the messages in the UI even though they are in the DB
(waiting for delete by the expiry tasks)

WDYT? Suggestions, please?

Regards,
-- 
Sirojan Tharmakulasingam
Software Engineer, WSO2 Inc. http://wso2.com
Email: siro...@wso2.com
Mobile: +94779797913
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Committers += Ashen Weerathunga

2016-10-03 Thread Nirmal Fernando
Hi all,

It is my pleasure to welcome Ashen Weerathunga as a WSO2 Committer. In
recognition of Ashen's contributions to ML, Siddhi and IoT analytics, he
has been voted as a Committer.

Ashen, welcome aboard and keep up the good work.

-- 

Thanks & regards,
Nirmal

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


Re: [Dev] Aggregate Mediator Disregarding 'enclosingElementProperty'

2016-10-03 Thread Isuru Haththotuwa
Thanks IsuruU.

On Tue, Oct 4, 2016 at 6:38 AM, Isuru Udana  wrote:

> Hi Isuru,
>
> Property name is "aggregated_response" and the value is following.
>
> * http://abc.com/>" />*
>
> So message is getting added to above element as a child.
>
> Thanks.
>
> On Mon, Oct 3, 2016 at 10:17 PM, Isuru Haththotuwa 
> wrote:
>
>> Hi,
>>
>> $subject. The relevant in and out sequences are at [1]. Here, I expect
>> the aggregated response to be in a root element element named
>> 'aggregated_response'. But the actual response has the root element as
>> 'Information' [2]. This is APIM 1.10, synapse version is 2.1.5.wso2v2. Any
>> idea why this is happening?
>>
>> [1].
>>   
>> 
>>  
>> 
>>>  expression="get-property('SYSTEM_TIME')"/>
>>
>>   
>>  
>>  
>>  
>>   
>>
>> 
>> 
>>
>>   
>>  http://demo44042
>> 22.mockable.io/test/hello"/>
>>   
>>
>> 
>>  
>>   
>>   
>>   
>>
>>
>> * 
>> http://abc.com>" />
>> *
>>   
>>  
>> 
>>  
>> * > enclosingElementProperty="aggregated_response">*
>> 
>>  
>>  
>>   
>>
>> [2].
>> {
>>   "Information": [
>> {
>>   "msg": "hello world!"
>> },
>> {
>>   "msg": "new Hello World!!"
>> }
>>   ]
>> }
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* *
>>
>>
>>
>
>
> --
> *Isuru Udana*
> Technical Lead
> WSO2 Inc.; http://wso2.com
> email: isu...@wso2.com cell: +94 77 3791887
> blog: http://mytecheye.blogspot.com/
>



-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APPM]Signature validation failed error when trying to login to publisher of APPM as a tenant admin

2016-10-03 Thread Prakhash Sivakumar
Hi Megala,

Those configuration parameters in authenticators.xml are related to the
IDP, in publisher the SP side validation should happen based on the
configurations in publisher.json.

But when I try to debug the scenario, the spId was taken from
authenticators.xml but it shouldn't happen like that. AFAIK it has to be
taken from sso-idp-config.xml.

Thanks

On Tue, Oct 4, 2016 at 9:11 AM, Megala Uthayakumar  wrote:

> Hi Thilini,
>
> Thank you for your explanation. The above mentioned error log got printed
> if the following are not included in authenticators.xml
>
>   false
>false
>
> under SAML2SSOAuthenticator configuration. Because in [1] those 2
> parameters are checked and if those are false, validate signature part is
> skipped. If those properties are not included in authenticators.xml,
> signature validation fails and the relevant error log got printed as in [2]
> and this happens when the code on [3] gets executed. My question was what
> is reasoning behind this?
>
> [1] https://github.com/wso2-extensions/identity-carbon-
> auth-saml2/blob/master/components/org.wso2.carbon.
> identity.authenticator.saml2.sso/src/main/java/org/wso2/
> carbon/identity/authenticator/saml2/sso/SAML2SSOAuthenticator.java#L415
> [2]https://github.com/wso2-extensions/identity-carbon-
> auth-saml2/blob/master/components/org.wso2.carbon.
> identity.authenticator.saml2.sso/src/main/java/org/wso2/
> carbon/identity/authenticator/saml2/sso/SAML2SSOAuthenticator.java#L135
> [3] https://github.com/wso2/carbon-appmgt/blob/master/
> features/org.wso2.carbon.appmgt.publisher.feature/src/
> main/resources/publisher/controllers/acs.jag#L135
>
> Thanks.
>
> Regards,
> Megala
>
> On Mon, Oct 3, 2016 at 12:55 PM, Thilini Shanika 
> wrote:
>
>> Hi Megala,
>>
>> When I try to login to carbon-appmgt publisher as a tenant admin in EMM,
>> it prints the following message in the console,
>> *[2016-10-02 20:23:46,814] ERROR
>> {org.wso2.carbon.identity.authenticator.saml2.sso.SAML2SSOAuthenticator} -
>>  Authentication Request is rejected. Signature validation failed.*
>>
>> But I tried the same with the APPM pack downloaded from jenkins. But the
>> relevant error message is not getting printed in the same scenario. While
>> further analyzing, I found that by default, AssertionSignatureValidation is
>> disabled in APPM [1]. What is the reason behind disabling this?
>>
>> The config in [1] is not related to Assertion signature validation. You
>> can find App manager publisher, store SAML response validation related
>> configs in [2] (publisher) and [3] (store) and you can enable/disable
>> signature validation via '*responseSigningEnabled*' property under 
>> ssoConfiguration.
>> By default, this property is enabled in App Manager.
>>
>> jaggery SSO module is responsible for processing SAML response and
>> validating it according to given configurations [4]. Please check whether
>> the changes done to SSO module are reflected in EMM branch.
>>
>> [1] - https://github.com/wso2/product-app-manager/blob/master/mo
>> dules/distribution/product/pom.xml#L107
>> [2] - https://github.com/wso2/carbon-appmgt/blob/master/features/
>> org.wso2.carbon.appmgt.publisher.feature/src/main/
>> resources/publisher/config/publisher.json#L52
>> [3] - https://github.com/wso2/carbon-appmgt/blob/master/features
>> /org.wso2.carbon.appmgt.store.feature/src/main/resources/
>> store/config/store.json#L17
>> [4] - https://github.com/wso2/carbon-store/blob/app-manager-4.4.
>> x-kernel/jaggery-modules/sso/scripts/sso.client.js#L142
>>
>> On Sun, Oct 2, 2016 at 8:53 PM, Megala Uthayakumar 
>> wrote:
>>
>>> Hi All,
>>>
>>> When I try to login to carbon-appmgt publisher as a tenant admin in EMM,
>>> it prints the following message in the console,
>>> *[2016-10-02 20:23:46,814] ERROR
>>> {org.wso2.carbon.identity.authenticator.saml2.sso.SAML2SSOAuthenticator} -
>>>  Authentication Request is rejected. Signature validation failed.*
>>>
>>> But I tried the same with the APPM pack downloaded from jenkins. But the
>>> relevant error message is not getting printed in the same scenario. While
>>> further analyzing, I found that by default, AssertionSignatureValidation is
>>> disabled in APPM [1]. What is the reason behind disabling this?
>>>
>>> [1] https://github.com/wso2/product-app-manager/blob/master/
>>> modules/distribution/product/pom.xml#L107
>>>
>>> Thanks.
>>>
>>> Regards,
>>> Megala
>>> --
>>> Megala Uthayakumar
>>>
>>> Software Engineer
>>> Mobile : 0779967122
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Thilini Shanika
>> Senior Software Engineer
>> WSO2, Inc.; http://wso2.com
>> 20, Palmgrove Avenue, Colombo 3
>>
>> E-mail: tgtshan...@gmail.com
>>
>>
>
>
> --
> Megala Uthayakumar
>
> Software Engineer
> Mobile : 0779967122
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/li

Re: [Dev] [APPM]Signature validation failed error when trying to login to publisher of APPM as a tenant admin

2016-10-03 Thread Megala Uthayakumar
Hi Thilini,

Thank you for your explanation. The above mentioned error log got printed
if the following are not included in authenticators.xml

  false
   false

under SAML2SSOAuthenticator configuration. Because in [1] those 2
parameters are checked and if those are false, validate signature part is
skipped. If those properties are not included in authenticators.xml,
signature validation fails and the relevant error log got printed as in [2]
and this happens when the code on [3] gets executed. My question was what
is reasoning behind this?

[1]
https://github.com/wso2-extensions/identity-carbon-auth-saml2/blob/master/components/org.wso2.carbon.identity.authenticator.saml2.sso/src/main/java/org/wso2/carbon/identity/authenticator/saml2/sso/SAML2SSOAuthenticator.java#L415
[2]
https://github.com/wso2-extensions/identity-carbon-auth-saml2/blob/master/components/org.wso2.carbon.identity.authenticator.saml2.sso/src/main/java/org/wso2/carbon/identity/authenticator/saml2/sso/SAML2SSOAuthenticator.java#L135
[3]
https://github.com/wso2/carbon-appmgt/blob/master/features/org.wso2.carbon.appmgt.publisher.feature/src/main/resources/publisher/controllers/acs.jag#L135

Thanks.

Regards,
Megala

On Mon, Oct 3, 2016 at 12:55 PM, Thilini Shanika  wrote:

> Hi Megala,
>
> When I try to login to carbon-appmgt publisher as a tenant admin in EMM,
> it prints the following message in the console,
> *[2016-10-02 20:23:46,814] ERROR
> {org.wso2.carbon.identity.authenticator.saml2.sso.SAML2SSOAuthenticator} -
>  Authentication Request is rejected. Signature validation failed.*
>
> But I tried the same with the APPM pack downloaded from jenkins. But the
> relevant error message is not getting printed in the same scenario. While
> further analyzing, I found that by default, AssertionSignatureValidation is
> disabled in APPM [1]. What is the reason behind disabling this?
>
> The config in [1] is not related to Assertion signature validation. You
> can find App manager publisher, store SAML response validation related
> configs in [2] (publisher) and [3] (store) and you can enable/disable
> signature validation via '*responseSigningEnabled*' property under 
> ssoConfiguration.
> By default, this property is enabled in App Manager.
>
> jaggery SSO module is responsible for processing SAML response and
> validating it according to given configurations [4]. Please check whether
> the changes done to SSO module are reflected in EMM branch.
>
> [1] - https://github.com/wso2/product-app-manager/blob/master/
> modules/distribution/product/pom.xml#L107
> [2] - https://github.com/wso2/carbon-appmgt/blob/master/
> features/org.wso2.carbon.appmgt.publisher.feature/src/
> main/resources/publisher/config/publisher.json#L52
> [3] - https://github.com/wso2/carbon-appmgt/blob/master/
> features/org.wso2.carbon.appmgt.store.feature/src/main/
> resources/store/config/store.json#L17
> [4] - https://github.com/wso2/carbon-store/blob/app-manager-
> 4.4.x-kernel/jaggery-modules/sso/scripts/sso.client.js#L142
>
> On Sun, Oct 2, 2016 at 8:53 PM, Megala Uthayakumar 
> wrote:
>
>> Hi All,
>>
>> When I try to login to carbon-appmgt publisher as a tenant admin in EMM,
>> it prints the following message in the console,
>> *[2016-10-02 20:23:46,814] ERROR
>> {org.wso2.carbon.identity.authenticator.saml2.sso.SAML2SSOAuthenticator} -
>>  Authentication Request is rejected. Signature validation failed.*
>>
>> But I tried the same with the APPM pack downloaded from jenkins. But the
>> relevant error message is not getting printed in the same scenario. While
>> further analyzing, I found that by default, AssertionSignatureValidation is
>> disabled in APPM [1]. What is the reason behind disabling this?
>>
>> [1] https://github.com/wso2/product-app-manager/blob/master/
>> modules/distribution/product/pom.xml#L107
>>
>> Thanks.
>>
>> Regards,
>> Megala
>> --
>> Megala Uthayakumar
>>
>> Software Engineer
>> Mobile : 0779967122
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thilini Shanika
> Senior Software Engineer
> WSO2, Inc.; http://wso2.com
> 20, Palmgrove Avenue, Colombo 3
>
> E-mail: tgtshan...@gmail.com
>
>


-- 
Megala Uthayakumar

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


Re: [Dev] Status code in the log never get print on response path!

2016-10-03 Thread Abimaran Kugathasan
Hi Vanji,

Thanks for the fix. Your PR was merged.

On Tue, Oct 4, 2016 at 6:15 AM, Vanjikumaran Sivajothy 
wrote:

> Hi APIM team,
>
> $subject due to wrong use of method. It should be isNotEmpty[1]. I have
> fixed that and the send the pull request. Further i have introduced HTTP
> method in the log for more granular level of information to analyzing the
> log with log analyzing tools
>
>
> if (DIRECTION_OUT.equals(direction)) {
> String statusCode = String.valueOf(axisMC.
> getProperty(NhttpConstants.HTTP_SC));
>
>   *  if (StringUtils.isEmpty(statusCode)) {*
> logMessage = logMessage + " , statusCode=" + statusCode;
> }
> }
>
>
> [1] https://github.com/wso2/carbon-apimgt/blob/master/
> components/apimgt/org.wso2.carbon.apimgt.gateway/src/
> main/java/org/wso2/carbon/apimgt/gateway/handlers/
> logging/APILogMessageHandler.java#L126
>
>
> [2] https://github.com/wso2/carbon-apimgt/pull/2949
>
>
> --
> Vanjikumaran Sivajothy
> *Associate Technical Lead*
> *WSO2 Inc. http://wso2.com *
>  *+1-925-464-6816*
> [image: Facebook]  [image: Twitter]
>  [image: LinkedIn]
>  [image:
> Blogger]  [image: SlideShare]
> 
>
> This communication may contain privileged or other
> confidential information and is intended exclusively for the addressee/s.
> If you are not the intended recipient/s, or believe that you may
> have received this communication in error, please reply to the
> sender indicating that fact and delete the copy you received and in
> addition, you should not print, copy, re-transmit, disseminate, or
> otherwise use the information contained in this communication.
> Internet communications cannot be guaranteed to be timely, secure, error
> or virus-free. The sender does not accept liability for any errors
> or omissions
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Email : abima...@wso2.com
Mobile : +94 773922820


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


Re: [Dev] Aggregate Mediator Disregarding 'enclosingElementProperty'

2016-10-03 Thread Isuru Udana
Hi Isuru,

Property name is "aggregated_response" and the value is following.

* http://abc.com/>" />*

So message is getting added to above element as a child.

Thanks.

On Mon, Oct 3, 2016 at 10:17 PM, Isuru Haththotuwa  wrote:

> Hi,
>
> $subject. The relevant in and out sequences are at [1]. Here, I expect the
> aggregated response to be in a root element element named
> 'aggregated_response'. But the actual response has the root element as
> 'Information' [2]. This is APIM 1.10, synapse version is 2.1.5.wso2v2. Any
> idea why this is happening?
>
> [1].
>   
> 
>  
> 
>  expression="get-property('SYSTEM_TIME')"/>
>
>   
>  
>  
>  
>   
>
> 
> 
>
>   
>  
>   
>
> 
>  
>   
>   
>   
>
>
> * 
> http://abc.com>" />
> *
>   
>  
> 
>  
> *  enclosingElementProperty="aggregated_response">*
> 
>  
>  
>   
>
> [2].
> {
>   "Information": [
> {
>   "msg": "hello world!"
> },
> {
>   "msg": "new Hello World!!"
> }
>   ]
> }
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* *
>
>
>


-- 
*Isuru Udana*
Technical Lead
WSO2 Inc.; http://wso2.com
email: isu...@wso2.com cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Status code in the log never get print on response path!

2016-10-03 Thread Vanjikumaran Sivajothy
Hi APIM team,

$subject due to wrong use of method. It should be isNotEmpty[1]. I have
fixed that and the send the pull request. Further i have introduced HTTP
method in the log for more granular level of information to analyzing the
log with log analyzing tools


if (DIRECTION_OUT.equals(direction)) {
String statusCode =
String.valueOf(axisMC.getProperty(NhttpConstants.HTTP_SC));

  *  if (StringUtils.isEmpty(statusCode)) {*
logMessage = logMessage + " , statusCode=" + statusCode;
}
}


[1]
https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/logging/APILogMessageHandler.java#L126


[2] https://github.com/wso2/carbon-apimgt/pull/2949


-- 
Vanjikumaran Sivajothy
*Associate Technical Lead*
*WSO2 Inc. http://wso2.com *
 *+1-925-464-6816*
[image: Facebook]  [image: Twitter]
 [image: LinkedIn]
 [image:
Blogger]  [image: SlideShare]


This communication may contain privileged or other confidential information
and is intended exclusively for the addressee/s. If you are not the
intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print,
copy, re-transmit, disseminate, or otherwise use the information contained
in this communication. Internet communications cannot be guaranteed to be
timely, secure, error or virus-free. The sender does not accept liability
for any errors or omissions
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Aggregate Mediator Disregarding 'enclosingElementProperty'

2016-10-03 Thread Isuru Haththotuwa
Hi,

$subject. The relevant in and out sequences are at [1]. Here, I expect the
aggregated response to be in a root element element named
'aggregated_response'. But the actual response has the root element as
'Information' [2]. This is APIM 1.10, synapse version is 2.1.5.wso2v2. Any
idea why this is happening?

[1].
  

 

   
   
  
 
 
 
  
   


   
  
 http://demo4404222.mockable.io/test/hello"/>
  
   

 
  
  
  


* 
http://abc.com>" />
*
  
 

 
* *

 
 
  

[2].
{
  "Information": [
{
  "msg": "hello world!"
},
{
  "msg": "new Hello World!!"
}
  ]
}


-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Scatter and Gather Pattern for Dynamic Endpoints

2016-10-03 Thread Isuru Haththotuwa
Thanks for the info IsuruU and Viraj. Will check this.

On Mon, Oct 3, 2016 at 10:03 AM, Viraj Rajaguru  wrote:

> Hi,
>
> On Mon, Oct 3, 2016 at 7:43 AM, Isuru Udana  wrote:
>
>> Hi Isuru,
>>
>> By looking at the synapse code of RecipientListEndpoint, I can see that
>> there is an option to pick endpoint list dynamically. I am not sure whether
>> that is configurable through tooling. You may have a look on that.
>>
>
> ESB Tooling supports RecipientListEndpoint configurations.
>
> Thanks,
> Viraj.
>
>>
>> Please note that I haven't tried it out.
>>
>> Thanks.
>>
>>
>> On Sun, Oct 2, 2016 at 11:12 AM, Isuru Haththotuwa 
>> wrote:
>>
>>> Missed the link:
>>>
>>> [1]. https://docs.wso2.com/display/IntegrationPatterns/Scatter-Gather
>>>
>>> On Sun, Oct 2, 2016 at 11:12 AM, Isuru Haththotuwa 
>>> wrote:
>>>
 Hi Devs,

 Do we support $subject with latest ESB? The use case is as follows:

- The endpoints are dynamically picked up during the mediation flow
(Ex. via a DB query, etc.). The number of endpoints are not fixed
- In the aggregation, need to wait till the all the endpoints to
which the request were sent returns a response

 In the EIP sample [1], we can achieve the same with a fixed number of
 endpoints. Can we do the same with a dynamic number of endpoints?

 --
 Thanks and Regards,

 Isuru H.
 +94 716 358 048* *



>>>
>>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> +94 716 358 048* *
>>>
>>>
>>>
>>
>>
>> --
>> *Isuru Udana*
>> Technical Lead
>> WSO2 Inc.; http://wso2.com
>> email: isu...@wso2.com cell: +94 77 3791887
>> blog: http://mytecheye.blogspot.com/
>>
>
>
>
> --
> Viraj Rajaguru
> Associate Technical Lead
> WSO2 Inc. : http://wso2.com
>
> Mobile: +94 77 3683068
>
>
>
>


-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APPM]Signature validation failed error when trying to login to publisher of APPM as a tenant admin

2016-10-03 Thread Thilini Shanika
Hi Megala,

When I try to login to carbon-appmgt publisher as a tenant admin in EMM, it
prints the following message in the console,
*[2016-10-02 20:23:46,814] ERROR
{org.wso2.carbon.identity.authenticator.saml2.sso.SAML2SSOAuthenticator} -
 Authentication Request is rejected. Signature validation failed.*

But I tried the same with the APPM pack downloaded from jenkins. But the
relevant error message is not getting printed in the same scenario. While
further analyzing, I found that by default, AssertionSignatureValidation is
disabled in APPM [1]. What is the reason behind disabling this?

The config in [1] is not related to Assertion signature validation. You can
find App manager publisher, store SAML response validation related configs
in [2] (publisher) and [3] (store) and you can enable/disable signature
validation via '*responseSigningEnabled*' property under ssoConfiguration.
By default, this property is enabled in App Manager.

jaggery SSO module is responsible for processing SAML response and
validating it according to given configurations [4]. Please check whether
the changes done to SSO module are reflected in EMM branch.

[1] - https://github.com/wso2/product-app-manager/blob/
master/modules/distribution/product/pom.xml#L107
[2] -
https://github.com/wso2/carbon-appmgt/blob/master/features/org.wso2.carbon.appmgt.publisher.feature/src/main/resources/publisher/config/publisher.json#L52

[3] -
https://github.com/wso2/carbon-appmgt/blob/master/features/org.wso2.carbon.appmgt.store.feature/src/main/resources/store/config/store.json#L17
[4] -
https://github.com/wso2/carbon-store/blob/app-manager-4.4.x-kernel/jaggery-modules/sso/scripts/sso.client.js#L142

On Sun, Oct 2, 2016 at 8:53 PM, Megala Uthayakumar  wrote:

> Hi All,
>
> When I try to login to carbon-appmgt publisher as a tenant admin in EMM,
> it prints the following message in the console,
> *[2016-10-02 20:23:46,814] ERROR
> {org.wso2.carbon.identity.authenticator.saml2.sso.SAML2SSOAuthenticator} -
>  Authentication Request is rejected. Signature validation failed.*
>
> But I tried the same with the APPM pack downloaded from jenkins. But the
> relevant error message is not getting printed in the same scenario. While
> further analyzing, I found that by default, AssertionSignatureValidation is
> disabled in APPM [1]. What is the reason behind disabling this?
>
> [1] https://github.com/wso2/product-app-manager/blob/
> master/modules/distribution/product/pom.xml#L107
>
> Thanks.
>
> Regards,
> Megala
> --
> Megala Uthayakumar
>
> Software Engineer
> Mobile : 0779967122
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


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

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