Re: [Dev] Automating Single Sign on from Facebook to API Publisher/Store in APIM 2.2.0

2018-01-21 Thread Chamin Dias
On Mon, Jan 22, 2018 at 1:12 PM, Irham Iqbal  wrote:

> Hi Shanika,
>
> When we write test cases we normally keep the configured(already changed)
> file somewhere and replace that with the relevant file before running that
> particular test. Is it possible for you to do the same with test grid ?
>

You can have a look at [1] as a reference. It contains some relevant
example configurations.

[1]
https://github.com/wso2/product-apim/tree/v2.1.0/modules/integration/tests-platform/src/test/resources/artifacts/AM/configFiles

>
> Thanks,
> Iqbal
>
>
>
> On Mon, Jan 22, 2018 at 12:53 PM, Shanika Wickramasinghe <
> shani...@wso2.com> wrote:
>
>> Hi All,
>>
>> Under the APIM scenario Developer Enablement and Community building there
>> is a use case as Providing single sign on for Publisher/Store using Social
>> media. To automate this scenario to run in the test grid I need to change
>> some configurations as per [1] in
>>
>>
>> /repository/deployment/server/jaggeryapps/publisher/site/conf/site.json
>> file
>>
>>
>> /repository/deployment/server/jaggeryapps/store/site/conf/site.json
>> file
>>
>>
>> Appreciate your guidance on how can I automate this configuration
>> changes.
>>
>>
>> [1]. https://docs.wso2.com/display/AM2xx/Configuring+API+Manager+for+SSO
>>
>>
>> Thankyou,
>>
>> Shanika.
>>
>>
>> --
>> *Shanika Wickramasinghe*
>> Software Engineer - QA Team
>>
>> Email: shani...@wso2.com
>> Mobile  : +94713503563 <+94%2071%20350%203563>
>> Web : http://wso2.com
>>
>> 
>>
>
>
>
> --
> Irham Iqbal
> Software Engineer
> WSO2
> phone: +94 777888452
> 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Chamin Dias
Mobile : 0716097455
Email : cham...@wso2.com
LinkedIn : https://www.linkedin.com/in/chamindias
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Automating Single Sign on from Facebook to API Publisher/Store in APIM 2.2.0

2018-01-21 Thread Irham Iqbal
Hi Shanika,

When we write test cases we normally keep the configured(already changed)
file somewhere and replace that with the relevant file before running that
particular test. Is it possible for you to do the same with test grid ?

Thanks,
Iqbal



On Mon, Jan 22, 2018 at 12:53 PM, Shanika Wickramasinghe 
wrote:

> Hi All,
>
> Under the APIM scenario Developer Enablement and Community building there
> is a use case as Providing single sign on for Publisher/Store using Social
> media. To automate this scenario to run in the test grid I need to change
> some configurations as per [1] in
>
>
> /repository/deployment/server/jaggeryapps/publisher/site/conf/site.json
> file
>
>
> /repository/deployment/server/jaggeryapps/store/site/conf/site.json
> file
>
>
> Appreciate your guidance on how can I automate this configuration changes.
>
>
> [1]. https://docs.wso2.com/display/AM2xx/Configuring+API+Manager+for+SSO
>
>
> Thankyou,
>
> Shanika.
>
>
> --
> *Shanika Wickramasinghe*
> Software Engineer - QA Team
>
> Email: shani...@wso2.com
> Mobile  : +94713503563 <+94%2071%20350%203563>
> Web : http://wso2.com
>
> 
>



-- 
Irham Iqbal
Software Engineer
WSO2
phone: +94 777888452

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


Re: [Dev] Automating Single Sign on from Facebook to API Publisher/Store in APIM 2.2.0

2018-01-21 Thread Pubudu Gunatilaka
Hi Shanika,

Do you use any configuration automation tools such as puppet, Ansible, etc
?  If that is not the case, how do you update the configuration files such
as carbon.xml, api-manager.xml?

You can add site.json to puppet or any configuration automation tool.

Another option is to maintain separate json files with the required
configurations and copy the files. This is a maintenance overhead.

Thank you!

On Mon, Jan 22, 2018 at 12:53 PM, Shanika Wickramasinghe 
wrote:

> Hi All,
>
> Under the APIM scenario Developer Enablement and Community building there
> is a use case as Providing single sign on for Publisher/Store using Social
> media. To automate this scenario to run in the test grid I need to change
> some configurations as per [1] in
>
>
> /repository/deployment/server/jaggeryapps/publisher/site/conf/site.json
> file
>
>
> /repository/deployment/server/jaggeryapps/store/site/conf/site.json
> file
>
>
> Appreciate your guidance on how can I automate this configuration changes.
>
>
> [1]. https://docs.wso2.com/display/AM2xx/Configuring+API+Manager+for+SSO
>
>
> Thankyou,
>
> Shanika.
>
>
> --
> *Shanika Wickramasinghe*
> Software Engineer - QA Team
>
> Email: shani...@wso2.com
> Mobile  : +94713503563 <+94%2071%20350%203563>
> Web : http://wso2.com
>
> 
>



-- 
*Pubudu Gunatilaka*
Committer and PMC Member - Apache Stratos
Senior Software Engineer
WSO2, Inc.: http://wso2.com
mobile : +94774078049 <%2B94772207163>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IoT] Changing Geo Location Enabling Configuration

2018-01-21 Thread Charitha Goonetilleke
Hi Rasika & all,

BTW, with our current implementation we are publishing operation response
of DeviceInfo if *PublishOperationResponse* is enabled. So shall we changed
it as *PublishDeviceInfoResponse* ? Also since it is useful to publish
Operation response payloads to Analytics for further processing, shall we
add that capability to the IoTS? If so we might need to introduce a way to
filter out required operations which needs to send responses to the
Analytics. So I would like to suggest to change above configuration as
follows to accommodate that.


  true
  true
  
  true
  
  BATTERY_LEVEL
  CHECK_LOCK_STATUS
  
  


Also if we want to publish responses for all operations, we can set it as
follows:



  true
  true
  
  true
  
  *
  
  


In order to received operation responses, we also need to have Event
receiver and event stream in Analytics side.

WDYT?

Thanks & Regards,
/charithag


On Mon, Jan 22, 2018 at 12:46 PM, Inosh Perera  wrote:

> Hi Rasika,
>
> +1,
> I assume in the default configuration we will keep both these values to
> false since by default we would not need the publish info to DAS. Also,
> when you say publish operation response, does it mean we are publishing all
> operation info such as application list, device info and policy responses?
> If it's only device info, naming the config to PublishDeviceInfoResponse
> would make more sense IMO.
>
> Regards,
> Inosh
>
> On Mon, Jan 22, 2018 at 12:36 PM, Rasika Perera  wrote:
>
>> Hi All,
>>
>> In IoT Server v3.1.0 geo location services is enabled with the following
>> configuration;
>>
>> 
>>   true
>>   true> nOperationResponse>
>> 
>>
>> ​With the new feature developments; In latest IoT Server(master branch);
>> now we also allow publishing device-info responses through the same
>> configuration.
>>
>> 
>>   true
>>   true
>> 
>>
>> However; there might be use cases for enabling *geo location services* 
>> *without*
>> *publishing all the device-info* into IoT-Analytics server. Hence, As
>> per the discussion with Charitha; I am planning to change the above
>> configuration as below;
>>
>> 
>>   true
>>   true
>> 
>>
>> WDYT? Appreciate your comments and ideas.
>>
>> Best Regards,
>> ~Rasika
>>
>> --
>> With Regards,
>>
>> *Rasika Perera*
>> Senior Software Engineer
>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>
>> 
>>
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>>
>
>
>
> --
> Inosh Perera
> Senior Software Engineer, WSO2 Inc.
> Tel: 077813 7285, 0785293686
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Charitha Goonetilleke*
Senior Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 77 751 3669 <%2B94777513669>
Twitter:@CharithaWs , fb: charithag
, linkedin: charithag



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


Re: [Dev] [IoT] Changing Geo Location Enabling Configuration

2018-01-21 Thread Inosh Perera
Hi Rasika,

+1,
I assume in the default configuration we will keep both these values to
false since by default we would not need the publish info to DAS. Also,
when you say publish operation response, does it mean we are publishing all
operation info such as application list, device info and policy responses?
If it's only device info, naming the config to PublishDeviceInfoResponse
would make more sense IMO.

Regards,
Inosh

On Mon, Jan 22, 2018 at 12:36 PM, Rasika Perera  wrote:

> Hi All,
>
> In IoT Server v3.1.0 geo location services is enabled with the following
> configuration;
>
> 
>   true
>   true PublishLocationOperationResponse>
> 
>
> ​With the new feature developments; In latest IoT Server(master branch);
> now we also allow publishing device-info responses through the same
> configuration.
>
> 
>   true
>   true
> 
>
> However; there might be use cases for enabling *geo location services* 
> *without*
> *publishing all the device-info* into IoT-Analytics server. Hence, As per
> the discussion with Charitha; I am planning to change the above
> configuration as below;
>
> 
>   true
>   true
> 
>
> WDYT? Appreciate your comments and ideas.
>
> Best Regards,
> ~Rasika
>
> --
> With Regards,
>
> *Rasika Perera*
> Senior Software Engineer
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> 
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>



-- 
Inosh Perera
Senior Software Engineer, WSO2 Inc.
Tel: 077813 7285, 0785293686
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IoT] Changing Geo Location Enabling Configuration

2018-01-21 Thread Imesh Chandrasiri
Hi Rasika,

In a UX point of view, IMHO it's better to have both options as
configurations giving the user more flexibility of using the product.
Furthermore it would avoid sending in unnecessary data if only one option
is needed.

+1 for having separate configurations IMO.


On Mon, Jan 22, 2018 at 12:36 PM, Rasika Perera  wrote:

> Hi All,
>
> In IoT Server v3.1.0 geo location services is enabled with the following
> configuration;
>
> 
>   true
>   true PublishLocationOperationResponse>
> 
>
> ​With the new feature developments; In latest IoT Server(master branch);
> now we also allow publishing device-info responses through the same
> configuration.
>
> 
>   true
>   true
> 
>
> However; there might be use cases for enabling *geo location services* 
> *without*
> *publishing all the device-info* into IoT-Analytics server. Hence, As per
> the discussion with Charitha; I am planning to change the above
> configuration as below;
>
> 
>   true
>   true
> 
>
> WDYT? Appreciate your comments and ideas.
>
> Best Regards,
> ~Rasika
>
> --
> With Regards,
>
> *Rasika Perera*
> Senior Software Engineer
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> 
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>
> --
> You received this message because you are subscribed to the Google Groups
> "WSO2 IoT Team Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to iot-group+unsubscr...@wso2.com.
> For more options, visit https://groups.google.com/a/wso2.com/d/optout.
>



-- 
*Thanks and Best Regards,*
Imesh Ashandimal Chandrasiri
*Software Engineer*
WSO2, Inc.
lean . enterprise . middleware
*E:* ime...@wso2.com | *P:* 0716519187


Disclaimer: This communication may contain privileged or other confidential
information and is intended exclusively for the addressee/s. If you are not
the intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print, copy,
retransmit, 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


Re: [Dev] [IoT] Changing Geo Location Enabling Configuration

2018-01-21 Thread Ruwan Yatawara
Hi Rasika,

+1 for the change, but how about :



  true
  true


IMO, this wording makes a bit more sense. Also, let's make sure to include
explanations as to what these params enable.

Thanks and Regards,

Ruwan Yatawara

Technical Lead,
WSO2 Inc.

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


On Mon, Jan 22, 2018 at 12:36 PM, Rasika Perera  wrote:

> Hi All,
>
> In IoT Server v3.1.0 geo location services is enabled with the following
> configuration;
>
> 
>   true
>   true PublishLocationOperationResponse>
> 
>
> ​With the new feature developments; In latest IoT Server(master branch);
> now we also allow publishing device-info responses through the same
> configuration.
>
> 
>   true
>   true
> 
>
> However; there might be use cases for enabling *geo location services* 
> *without*
> *publishing all the device-info* into IoT-Analytics server. Hence, As per
> the discussion with Charitha; I am planning to change the above
> configuration as below;
>
> 
>   true
>   true
> 
>
> WDYT? Appreciate your comments and ideas.
>
> Best Regards,
> ~Rasika
>
> --
> With Regards,
>
> *Rasika Perera*
> Senior Software Engineer
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> 
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [BPMN] Rest task json response with null values gives NPE

2018-01-21 Thread Waruna Jayaweera
Hi,
Do we need to filter the data type here. If result is not a Map or List Can
we return the result as it is?

Thanks,
Waruna

On Mon, Jan 22, 2018 at 12:18 PM, Vinod Kavinda  wrote:

> Hi All,
> I'm working on fixing the issue [1]. The reason for the issue is we have
> not considered the *null *in the code line [2]. According to the JSON
> spec [3], null also treated he same way like other primitive types.
>
> Any particular reason for not to add *null?*
> Shall we add the null also in the line [2] ?
>
> [1] - https://github.com/wso2/product-ei/issues/1406
> [2] - https://github.com/wso2/carbon-business-process/blob/
> master/components/bpmn/org.wso2.carbon.bpmn/src/main/
> java/org/wso2/carbon/bpmn/core/types/datatypes/json/api/
> JsonNodeObject.java#L77
> [3]  - http://www.json.org/
>
> Regards,
> Vinod
>
> --
> Vinod Kavinda
> Senior Software Engineer
> *WSO2 Inc. - lean . enterprise . middleware .*
> Mobile : +94 (0) 712 415544
> Blog : http://soatechflicks.blogspot.com/
> [image: http://wso2.com/signature]
> 
>
>


-- 
Regards,

Waruna Lakshitha Jayaweera
Senior Software Engineer
WSO2 Inc; http://wso2.com
phone: +94713255198
http://waruapz.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [IoT] Changing Geo Location Enabling Configuration

2018-01-21 Thread Rasika Perera
Hi All,

In IoT Server v3.1.0 geo location services is enabled with the following
configuration;


  true
  true



​With the new feature developments; In latest IoT Server(master branch);
now we also allow publishing device-info responses through the same
configuration.


  true
  true


However; there might be use cases for enabling *geo location services*
*without*
*publishing all the device-info* into IoT-Analytics server. Hence, As per
the discussion with Charitha; I am planning to change the above
configuration as below;


  true
  true


WDYT? Appreciate your comments and ideas.

Best Regards,
~Rasika

-- 
With Regards,

*Rasika Perera*
Senior Software Engineer
LinkedIn: http://lk.linkedin.com/in/rasika90



WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [BPMN] Rest task json response with null values gives NPE

2018-01-21 Thread Milinda Perera
+1, no exact reason for not considering null, as I remember, most probably
missed it.

On Mon, Jan 22, 2018 at 12:18 PM, Vinod Kavinda  wrote:

> Hi All,
> I'm working on fixing the issue [1]. The reason for the issue is we have
> not considered the *null *in the code line [2]. According to the JSON
> spec [3], null also treated he same way like other primitive types.
>
> Any particular reason for not to add *null?*
> Shall we add the null also in the line [2] ?
>
> [1] - https://github.com/wso2/product-ei/issues/1406
> [2] - https://github.com/wso2/carbon-business-process/blob/
> master/components/bpmn/org.wso2.carbon.bpmn/src/main/
> java/org/wso2/carbon/bpmn/core/types/datatypes/json/api/
> JsonNodeObject.java#L77
> [3]  - http://www.json.org/
>
> Regards,
> Vinod
>
> --
> Vinod Kavinda
> Senior Software Engineer
> *WSO2 Inc. - lean . enterprise . middleware .*
> Mobile : +94 (0) 712 415544
> Blog : http://soatechflicks.blogspot.com/
> [image: http://wso2.com/signature]
> 
>
>


-- 
Milinda Perera
Senior Software Engineer;
WSO2 Inc. http://wso2.com ,
Mobile: (+94) 714 115 032
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [BPMN] Rest task json response with null values gives NPE

2018-01-21 Thread Vinod Kavinda
Hi All,
I'm working on fixing the issue [1]. The reason for the issue is we have
not considered the *null *in the code line [2]. According to the JSON spec
[3], null also treated he same way like other primitive types.

Any particular reason for not to add *null?*
Shall we add the null also in the line [2] ?

[1] - https://github.com/wso2/product-ei/issues/1406
[2] -
https://github.com/wso2/carbon-business-process/blob/master/components/bpmn/org.wso2.carbon.bpmn/src/main/java/org/wso2/carbon/bpmn/core/types/datatypes/json/api/JsonNodeObject.java#L77
[3]  - http://www.json.org/

Regards,
Vinod

-- 
Vinod Kavinda
Senior Software Engineer
*WSO2 Inc. - lean . enterprise . middleware .*
Mobile : +94 (0) 712 415544
Blog : http://soatechflicks.blogspot.com/
[image: http://wso2.com/signature]

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


Re: [Dev] Common Parent for AbstractUserStoreManger, JDBCAuthorizationManager and HybridRoleManager

2018-01-21 Thread Rushmin Fernando
Hi Ruwan and Jayanga,

The term 'secured' is only related to the 'callSecure()' call right?

And that is only an internal method which should be called from every other
method which needs secured access.

IMO 'Secured' is a valid name if we have a have something like template
method which provides security for the inherited classes automatically.

So I suggest that we need to remove the 'Secured' part of the name.
AbstractIdentityManager is fine.

And can't we move callSecure functionality as a utility method, as it has
generic privileged action and has nothing to do with identity management
functionality.

Best Regards,
Rushmin

On Fri, Jan 19, 2018 at 9:43 PM, Ruwan Abeykoon  wrote:

> Hi Rushmin,
> Yes, that is valid point.
> how about AbstractSecuredIdentityManager ?
>
> Cheers,
> Ruwan
>
> On Fri, Jan 19, 2018 at 8:07 PM, Rushmin Fernando 
> wrote:
>
>> I'm concerned thinking that whether there is a real is-a relationship
>> here.
>>
>> The parent class name is AbstractSecuredEntityManager which gives the
>> feeling that this is a parent class which provides some security
>> functionality. (e.g. secured invocations)
>>
>> But it has a method called initUserRolesCache which is not relevant.
>>
>> On Fri, Jan 19, 2018 at 6:07 PM, Jayanga Kaushalya 
>> wrote:
>>
>>> Hi all,
>>>
>>> We have identified there are few common methods(callSecure(),
>>> initUserRolesCache(), etc..) in $subject mentioned classes in UserCore[1].
>>> So we have decided to create a common parent(AbstractSecuredEntityManager)
>>> for those classes to minimize the code duplication.
>>>
>>> Please provide your thoughts.
>>>
>>> [1] https://github.com/wso2/carbon-kernel/tree/4.4.x/core/or
>>> g.wso2.carbon.user.core
>>>
>>> Thanks!
>>>
>>> *Jayanga Kaushalya*
>>> Senior Software Engineer
>>> Mobile: +94777860160 <+94%2077%20786%200160>
>>> WSO2 Inc. | http://wso2.com
>>> lean.enterprise.middleware
>>>
>>>
>>>
>>
>>
>> --
>> *Best Regards*
>>
>> *Rushmin Fernando*
>> *Technical Lead*
>>
>> WSO2 Inc.  - Lean . Enterprise . Middleware
>>
>> mobile : +94775615183
>>
>>
>>
>


-- 
*Best Regards*

*Rushmin Fernando*
*Technical Lead*

WSO2 Inc.  - Lean . Enterprise . Middleware

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


Re: [Dev] Removing root element above an array in wso2. Please guide

2018-01-21 Thread Gihan Anuruddha
Have you tried something like this [1]? You need to add another XSLT
processing after you get the original output.

[1] -
https://stackoverflow.com/questions/1571083/how-to-remove-root-element-from-xml-file

Regards,
Gihan

On Mon, Jan 22, 2018 at 8:12 AM, Vinod Kavinda  wrote:

> Hi Vikram,
> This is happening because your XPath generates multiple elements with
> below structure, which not your desired output.
> **
> * 26*
> * box*
> * 2019-01-17T00:00:00*
> *  *
>
> In an XML point of view, you are expecting an xml content like below,
> which is not a valid XML content since it does not have a root element. You
> can test this with an online XPath evaluator and verify.
>
> * *
> * 40*
> * car*
> * 2019-01-17T00:00:00*
> * *
> * *
> * 37*
> * table*
> * 2019-01-17T00:00:00*
> * *
>
>
> I don't think you can achieve your requirement with the enrich mediator
> since it only supports Xpaths. Please try using the Payload Factory
> mediator[1] with Jsonpath. Then you can extract the "Detail" element from
> the converted JSON and set it to the body.
>
> [1] - https://docs.wso2.com/display/EI611/PayloadFactory+Mediator
>
> On Sun, Jan 21, 2018 at 8:37 PM, vikram nayak 
> wrote:
>
>>
>>
>> On Sunday, 21 January 2018 8:14 PM, vikram nayak 
>> wrote:
>>
>>
>> Hi All,,
>>
>> I have output like below from my xslt :
>>
>> 
>> http://schemas.
>> xmlsoap.org/soap/envelope/">
>> 
>> 
>> 
>> 40
>> car
>> 2019-01-17T00:00:00
>> 
>> 
>> 37
>> table
>> 2019-01-17T00:00:00
>> 
>> 
>> 35
>> book
>> 2019-01-17T00:00:00
>> 
>> 
>> 26
>> box
>> 2019-01-17T00:00:00
>> 
>> 
>> 
>> 
>>
>> which gets converted into below json in postman :
>>
>> {
>> "Result": {
>> "Detail": [
>> {
>> "a": "40",
>> "b": "car",
>> "c": "2019-01-17T00:00:00"
>> },
>> {
>> "a": "37",
>> "b": "table",
>> "c": "2019-01-17T00:00:00"
>> },
>> {
>> "a": "35",
>> "b": "book",
>> "c": "2019-01-17T00:00:00"
>> },
>> {
>> "a": "26",
>> "b": "box",
>> "c": "2019-01-17T00:00:00"
>> }
>> ]
>> }
>> }
>>
>> but in my desired output response . I do not want root element "Result".
>>
>> Desired output :
>>
>> {
>> "Detail": [
>> {
>> "a": "40",
>> "b": "car",
>> "c": "2019-01-17T00:00:00"
>> },
>> {
>> "a": "37",
>> "b": "table",
>> "c": "2019-01-17T00:00:00"
>> },
>> {
>> "a": "35",
>> "b": "book",
>> "c": "2019-01-17T00:00:00"
>> },
>> {
>> "a": "26",
>> "b": "box",
>> "c": "2019-01-17T00:00:00"
>> }
>> ]
>> }
>> }
>>
>> Going through some online documents I tried below enrich after xslt.
>>
>> 
>> 
>> 
>> 
>>
>> But it gives only one element from my output  like below :
>>
>> {
>> "Detail": {
>> "insuranceNumber": "40",
>> "policyName": "Laptop insurance - 4 star",
>> "agreementValidTill": "2019-01-17T00:00:00"
>> }
>> }
>>
>> Please guide.
>>
>> Thanks,
>> Vikram
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Vinod Kavinda
> Senior Software Engineer
> *WSO2 Inc. - lean . enterprise . middleware .*
> Mobile : +94 (0) 712 415544
> Blog : http://soatechflicks.blogspot.com/
> [image: http://wso2.com/signature]
> 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
W.G. Gihan Anuruddha
Associate Technical Lead | WSO2, Inc.
M: +94772272595
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fix wso2/product-ei/issues/1760

2018-01-21 Thread Lahiru Madushanka
Hi Malaka,

Thanks



On Mon, Jan 22, 2018 at 10:06 AM, Malaka Gangananda 
wrote:

> Hi Lahiru,
>
> Changes have been committed.
>
> Thanks,
>
> On Mon, Jan 22, 2018 at 9:55 AM, Malaka Gangananda 
> wrote:
>
>> Hi Lahiru,
>>
>> I will do the needful.
>>
>> Thanks,
>>
>> On Mon, Jan 22, 2018 at 9:51 AM, Lahiru Madushanka 
>> wrote:
>>
>>> Hi all,
>>>
>>> This issue is fixed now.
>>>
>>> I am attaching the diff of the fix below.
>>>
>>> Could someone please add this to the SVN
>>>
>>> Thanks,
>>> Lahiru
>>>
>>
>>
>>
>> --
>> Malaka.
>> --
>> Malaka Gangananda - Software Engineer | WSO2
>> Email : mala...@wso2.com
>> Mobile : +94713564340 <+94%2071%20356%204340>
>> Web : http://wso2.com
>>   
>>
>
>
>
> --
> Malaka.
> --
> Malaka Gangananda - Software Engineer | WSO2
> Email : mala...@wso2.com
> Mobile : +94713564340 <+94%2071%20356%204340>
> Web : http://wso2.com
>   
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fix wso2/product-ei/issues/1760

2018-01-21 Thread Malaka Gangananda
Hi Lahiru,

Changes have been committed.

Thanks,

On Mon, Jan 22, 2018 at 9:55 AM, Malaka Gangananda  wrote:

> Hi Lahiru,
>
> I will do the needful.
>
> Thanks,
>
> On Mon, Jan 22, 2018 at 9:51 AM, Lahiru Madushanka 
> wrote:
>
>> Hi all,
>>
>> This issue is fixed now.
>>
>> I am attaching the diff of the fix below.
>>
>> Could someone please add this to the SVN
>>
>> Thanks,
>> Lahiru
>>
>
>
>
> --
> Malaka.
> --
> Malaka Gangananda - Software Engineer | WSO2
> Email : mala...@wso2.com
> Mobile : +94713564340 <+94%2071%20356%204340>
> Web : http://wso2.com
>   
>



-- 
Malaka.
-- 
Malaka Gangananda - Software Engineer | WSO2
Email : mala...@wso2.com
Mobile : +94713564340
Web : http://wso2.com
  
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fix wso2/product-ei/issues/1760

2018-01-21 Thread Malaka Gangananda
Hi Lahiru,

I will do the needful.

Thanks,

On Mon, Jan 22, 2018 at 9:51 AM, Lahiru Madushanka 
wrote:

> Hi all,
>
> This issue is fixed now.
>
> I am attaching the diff of the fix below.
>
> Could someone please add this to the SVN
>
> Thanks,
> Lahiru
>



-- 
Malaka.
-- 
Malaka Gangananda - Software Engineer | WSO2
Email : mala...@wso2.com
Mobile : +94713564340
Web : http://wso2.com
  
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Fix wso2/product-ei/issues/1760

2018-01-21 Thread Lahiru Madushanka
Hi all,

This issue is fixed now.

I am attaching the diff of the fix below.

Could someone please add this to the SVN

Thanks,
Lahiru
Index: 
modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java
===
--- 
modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java
(revision 55887)
+++ 
modules/core/src/main/java/org/apache/synapse/config/SynapseConfigUtils.java
(working copy)
@@ -447,16 +447,19 @@
 "HostName verification disabled");
 }
 
-connection.setHostnameVerifier(new 
javax.net.ssl.HostnameVerifier() {
-public boolean verify(String hostname, 
javax.net.ssl.SSLSession session) {
+HostnameVerifier hostnameVerifier = new HostnameVerifier() 
{
+@Override
+public boolean verify(String hostname, SSLSession 
sslSession) {
 if (log.isTraceEnabled()) {
 log.trace("HostName verification disabled");
 log.trace("Host:   " + hostname);
-log.trace("Peer Host:  " + 
session.getPeerHost());
+log.trace("Peer Host:  " + 
sslSession.getPeerHost());
 }
 return true;
 }
-});
+};
+connection.setHostnameVerifier(hostnameVerifier);
+
 } else {
 if (log.isDebugEnabled()) {
 log.debug("Using default HostName verifier...");
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Removing root element above an array in wso2. Please guide

2018-01-21 Thread Vinod Kavinda
Hi Vikram,
This is happening because your XPath generates multiple elements with below
structure, which not your desired output.
**
* 26*
* box*
* 2019-01-17T00:00:00*
*  *

In an XML point of view, you are expecting an xml content like below, which
is not a valid XML content since it does not have a root element. You can
test this with an online XPath evaluator and verify.

* *
* 40*
* car*
* 2019-01-17T00:00:00*
* *
* *
* 37*
* table*
* 2019-01-17T00:00:00*
* *


I don't think you can achieve your requirement with the enrich mediator
since it only supports Xpaths. Please try using the Payload Factory
mediator[1] with Jsonpath. Then you can extract the "Detail" element from
the converted JSON and set it to the body.

[1] - https://docs.wso2.com/display/EI611/PayloadFactory+Mediator

On Sun, Jan 21, 2018 at 8:37 PM, vikram nayak 
wrote:

>
>
> On Sunday, 21 January 2018 8:14 PM, vikram nayak 
> wrote:
>
>
> Hi All,,
>
> I have output like below from my xslt :
>
> 
> http://schemas.xmlsoap.org/soap/envelope/
> ">
> 
> 
> 
> 40
> car
> 2019-01-17T00:00:00
> 
> 
> 37
> table
> 2019-01-17T00:00:00
> 
> 
> 35
> book
> 2019-01-17T00:00:00
> 
> 
> 26
> box
> 2019-01-17T00:00:00
> 
> 
> 
> 
>
> which gets converted into below json in postman :
>
> {
> "Result": {
> "Detail": [
> {
> "a": "40",
> "b": "car",
> "c": "2019-01-17T00:00:00"
> },
> {
> "a": "37",
> "b": "table",
> "c": "2019-01-17T00:00:00"
> },
> {
> "a": "35",
> "b": "book",
> "c": "2019-01-17T00:00:00"
> },
> {
> "a": "26",
> "b": "box",
> "c": "2019-01-17T00:00:00"
> }
> ]
> }
> }
>
> but in my desired output response . I do not want root element "Result".
>
> Desired output :
>
> {
> "Detail": [
> {
> "a": "40",
> "b": "car",
> "c": "2019-01-17T00:00:00"
> },
> {
> "a": "37",
> "b": "table",
> "c": "2019-01-17T00:00:00"
> },
> {
> "a": "35",
> "b": "book",
> "c": "2019-01-17T00:00:00"
> },
> {
> "a": "26",
> "b": "box",
> "c": "2019-01-17T00:00:00"
> }
> ]
> }
> }
>
> Going through some online documents I tried below enrich after xslt.
>
> 
> 
> 
> 
>
> But it gives only one element from my output  like below :
>
> {
> "Detail": {
> "insuranceNumber": "40",
> "policyName": "Laptop insurance - 4 star",
> "agreementValidTill": "2019-01-17T00:00:00"
> }
> }
>
> Please guide.
>
> Thanks,
> Vikram
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Vinod Kavinda
Senior Software Engineer
*WSO2 Inc. - lean . enterprise . middleware .*
Mobile : +94 (0) 712 415544
Blog : http://soatechflicks.blogspot.com/
[image: http://wso2.com/signature]

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


Re: [Dev] Removing root element above an array in wso2. Please guide

2018-01-21 Thread vikram nayak
 

On Sunday, 21 January 2018 8:14 PM, vikram nayak  
wrote:
 

 Hi All,,
I have output like below from my xslt :
http://schemas.xmlsoap.org/soap/envelope/;>  
  40 car 2019-01-17T00:00:00  
 37 table 2019-01-17T00:00:00   
35 book 2019-01-17T00:00:00   26 
box 2019-01-17T00:00:00   

which gets converted into below json in postman :
{    "Result": {        "Detail": [            {                "a": "40",      
          "b": "car",                "c": "2019-01-17T00:00:00"            },   
         {                "a": "37",                "b": "table",               
 "c": "2019-01-17T00:00:00"            },            {                "a": 
"35",                "b": "book",                "c": "2019-01-17T00:00:00"     
       },            {                "a": "26",                "b": "box",     
           "c": "2019-01-17T00:00:00"            }        ]    }}
but in my desired output response . I do not want root element "Result".
Desired output :
{    "Detail": [            {                "a": "40",                "b": 
"car",                "c": "2019-01-17T00:00:00"            },            {     
           "a": "37",                "b": "table",                "c": 
"2019-01-17T00:00:00"            },            {                "a": "35",      
          "b": "book",                "c": "2019-01-17T00:00:00"            },  
          {                "a": "26",                "b": "box",                
"c": "2019-01-17T00:00:00"            }        ]    }}
Going through some online documents I tried below enrich after xslt.
          
But it gives only one element from my output  like below :
{    "Detail": {        "insuranceNumber": "40",        "policyName": "Laptop 
insurance - 4 star",        "agreementValidTill": "2019-01-17T00:00:00"    }}
Please guide.
Thanks,Vikram

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


[Dev] Removing root element above an array in wso2. Please guide

2018-01-21 Thread vikram nayak
Hi All,,
I have output like below from my xslt :
http://schemas.xmlsoap.org/soap/envelope/;>  
  40 car 2019-01-17T00:00:00  
 37 table 2019-01-17T00:00:00   
35 book 2019-01-17T00:00:00   26 
box 2019-01-17T00:00:00   

which gets converted into below json in postman :
{    "Result": {        "Detail": [            {                "a": "40",      
          "b": "car",                "c": "2019-01-17T00:00:00"            },   
         {                "a": "37",                "b": "table",               
 "c": "2019-01-17T00:00:00"            },            {                "a": 
"35",                "b": "book",                "c": "2019-01-17T00:00:00"     
       },            {                "a": "26",                "b": "box",     
           "c": "2019-01-17T00:00:00"            }        ]    }}
but in my desired output response . I do not want root element "Result".
Desired output :
{    "Detail": [            {                "a": "40",                "b": 
"car",                "c": "2019-01-17T00:00:00"            },            {     
           "a": "37",                "b": "table",                "c": 
"2019-01-17T00:00:00"            },            {                "a": "35",      
          "b": "book",                "c": "2019-01-17T00:00:00"            },  
          {                "a": "26",                "b": "box",                
"c": "2019-01-17T00:00:00"            }        ]    }}
Going through some online documents I tried below enrich after xslt.
          
But it gives only one element from my output  like below :
{    "Detail": {        "insuranceNumber": "40",        "policyName": "Laptop 
insurance - 4 star",        "agreementValidTill": "2019-01-17T00:00:00"    }}
Please guide.
Thanks,Vikram___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Carbon JNDI cannot find com.sun.jndi.ldap.LdapCtxFactory

2018-01-21 Thread Rukshan Premathunga
Hi thusitha,

On 21 Jan 2018 1:18 pm, "Thusitha Thilina Dayaratne" <
thusithathil...@gmail.com> wrote:

Hi Rukshan,

Does your environment contains anything or is it a just empty map?


Yes it contain the ldap context factory and other connection url and
credentials data.


Thanks
Thusitha

On Sun, Jan 21, 2018 at 3:35 AM, Rukshan Premathunga 
wrote:

> Hi All,
>
> Recently we started to write a LDAP client and observed following
> exception when i create context instance.
> context = new InitialDirContext(environment);
>
> Error obtaining connection. Cannot find the InitialContextFactory
> com.sun.jndi.ldap.LdapCtxFactory. javax.naming.NoInitialContextException:
> Cannot find the InitialContextFactory com.sun.jndi.ldap.LdapCtxFactory.
> at org.wso2.carbon.jndi.internal.osgi.JNDIContextManagerImpl.la
> mbda$getInitialContextInternal$20(JNDIContextManagerImpl.java:118)
> at java.util.Optional.orElseThrow(Optional.java:290)
> at org.wso2.carbon.jndi.internal.osgi.JNDIContextManagerImpl.ge
> tInitialContextInternal(JNDIContextManagerImpl.java:118)
> at org.wso2.carbon.jndi.internal.osgi.JNDIContextManagerImpl.ne
> wInitialContext(JNDIContextManagerImpl.java:68)
> at org.wso2.carbon.jndi.internal.osgi.factory.DefaultContextFac
> tory.lambda$getInitialContext$23(DefaultContextFactory.java:68)
> at org.wso2.carbon.jndi.internal.util.LambdaExceptionUtils.lamb
> da$rethrowFunction$4(LambdaExceptionUtils.java:120)
> at java.util.Optional.map(Optional.java:215)
> at org.wso2.carbon.jndi.internal.osgi.factory.DefaultContextFac
> tory.getInitialContext(DefaultContextFactory.java:68)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManag
> er.java:684)
>
>
> I was able to get the context successfully using following workaround. But
> since it is not the proper way can we have a way to solve this issue? It
> seems carbon jndi cannot find the LdapCtxFactory.
>
> LdapCtxFactory.getLdapCtxInstance(environment.get(Context.PROVIDER_URL),
> environment);
>
>
> Thanks and Regards
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
> +94711822074 <071%20182%202074>
>
> ___
> 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