[Dev] WSO2 Committers += Nipuna Ranasinghe

2019-01-02 Thread Joseph Fonseka
Hi All,

It's my pleasure to announce Nipuna Ranasinghe as a WSO2 Committer.  He has
been a valuable contributor to WSO2 and Ballerina.

Congratulations Nipuna and keep up the good work...!


-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Committers += Pahan Sarathchandra

2017-07-11 Thread Joseph Fonseka
Hi All

It's my pleasure to announce Pahan Sarathchandra as a WSO2 Committer !

Congratulations! Pahan

Cheers
Jo

-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Content-Length of the message header is missing when it goes through the API Gateway

2017-01-10 Thread Joseph Fonseka
Hi Hasunie

It would be ideal if we can enable this only for the specific APIs but the
way IoT publisher's the APIs it will be hard to achieve.

Thanks
Jo

On Wed, Jan 11, 2017 at 4:18 AM, Hasunie Adikari <hasu...@wso2.com> wrote:

> Hi all,
>
> IOT backend server gives Content-length header of the response as
> expected, But Issue is arisen while passing it through the API Gateway,
> Content-Length of the response header is missing. We have already created
>  a public JIRA [1]
> for the issue in APIM 2.1.0 RC1.
> Since the issue is affected only for few of APIS, We are trying to add
> some custom sequence (outSequence) by creating per API Extensions [2].
>
> 
>  value="true"/>
>  value="true" scope="axis2"/>
> 
>  
>
> [1] https://wso2.org/jira/browse/APIMANAGER-5573
> [2] https://docs.wso2.com/display/AM1100/Adding+Mediation+Extensions
>
>
> Thanks
> Hasunie
>
> --
> *Hasunie Adikari*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
> blog http://hasuniea.blogspot.com
> Mobile:+94713350904 <+94%2071%20335%200904>
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM][CORS] Caching preflight response in API Console

2016-11-03 Thread Joseph Fonseka
+1 to merge the fix to carry this forward better if we can add this to the
publisher UI as well.

Thanks
Jo

On Thu, Nov 3, 2016 at 11:28 AM, Abimaran Kugathasan <abima...@wso2.com>
wrote:

> Hi Dev,
>
> CORS specification allows caching the preflight response for a certain
> number of seconds through Access-Control-Max-Age header [1] .
>
> Some browsers have this feature by default which overrides this header if
> the value specified is greater than their value[2]
>
> Firefox - 24 hours
> Chrome - 10 minutes
> Chromium - 5 seconds
>
> Mathieu(https://github.com/mathieu-pousse) has sent a PR though [3].
> Please review and provide feedback.
>
>
> [1] : https://www.w3.org/TR/cors/#access-control-max-age-response-header
> [2] : https://developer.mozilla.org/en-US/docs/Web/HTTP/
> Headers/Access-Control-Max-Age
> [3] : https://github.com/wso2/carbon-apimgt/pull/3114
>
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer - API Technologies
>
> Email : abima...@wso2.com
> Mobile : +94 773922820
>
> <http://stackoverflow.com/users/515034>
> <http://lk.linkedin.com/in/abimaran>
> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimarank>
> <https://twitter.com/abimaran>
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [dev][APIM 1.7] Alternatives for API creation/deletion audit logs

2016-10-27 Thread Joseph Fonseka
Hi

I guess you would need to capture user details as well for an audit log
entry. Do you have a plan on getting the user data at db level.

Thanks
Jo

On Thu, Oct 27, 2016 at 3:27 PM, Thilini Cooray <thili...@wso2.com> wrote:

> Hi Uvindra,
>
> Details in AM_API will be enough for the audit log.
> If we want to capture lifecycle state details I understand that we need to
> look at registry resources as well.
>
> Thanks.
>
> On Thu, Oct 27, 2016 at 3:21 PM, Uvindra Dias Jayasinha <uvin...@wso2.com>
> wrote:
>
>> HI Thilini,
>>
>> If all you want to check is when an API is added or deleted then the same
>> approach of using trigger for AM_API table is enough. But what information
>> exactly do you need to collect for the audit?
>>
>> On 27 October 2016 at 14:23, Thilini Cooray <thili...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> APIM 1.7 does not support audit logs for operations such as API creation
>>> and deletion, application creation and deletion.
>>> I am looking for alternatives which can be used for collecting audit
>>> data.
>>>
>>> Since application data are only stored in AM_DB, we can collect
>>> application related audit data by adding a database trigger for
>>> AM_APPLICATION table.
>>>
>>> However, API details are stored in both AM_DB and Registry DB.
>>> Therefore what is the recommended way for collecting audit data for API
>>> creation and deletion?
>>>
>>> Will it be reliable enough to just add a database trigger for AM_API
>>> table for insertions and deletions ?
>>>
>>> Thanks.
>>>
>>> --
>>> Best Regards,
>>>
>>> *Thilini Cooray*
>>> Software Engineer
>>> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20774%20570112>
>>> E-mail : thili...@wso2.com
>>>
>>> WSO2 Inc. www.wso2.com
>>> lean.enterprise.middleware
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Regards,
>> Uvindra
>>
>> Mobile: 33962
>>
>
>
>
> --
> Best Regards,
>
> *Thilini Cooray*
> Software Engineer
> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20774%20570112>
> E-mail : thili...@wso2.com
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM 1.9.1] Sorting options for listed APIs

2016-10-04 Thread Joseph Fonseka
@Abimaran I guess Dakshika is asking if we allow to sort based on other
criteria ie created time, updated time.

@Dakshika currently we do not have this feature in the implementation which
means it is not available in the UI or in the REST APIs ATM.  And this is
something we have planed to implement in the future.

Regards
Jo



On Wed, Oct 5, 2016 at 9:54 AM, Abimaran Kugathasan <abima...@wso2.com>
wrote:

> Yes, Store Jaggery APIs are sorting the APIs in the order of provider,
> API name and version. If there are two APIs with same provider, then those
> APIs will be sorted using name,
>
> On Tue, Oct 4, 2016 at 8:24 PM, Dakshika Jayathilaka <daksh...@wso2.com>
> wrote:
>
>> Hi All,
>>
>> Do we have $subject out of the box?
>>
>> Regards,
>>
>> *Dakshika Jayathilaka*
>> PMC Member & Committer of Apache Stratos
>> Associate Technical Lead
>> WSO2, Inc.
>> lean.enterprise.middleware
>> 0771100911
>>
>> ___
>> 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
>
> <http://stackoverflow.com/users/515034>
> <http://lk.linkedin.com/in/abimaran>
> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimarank>
> <https://twitter.com/abimaran>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Integration Cloud] Swagger Support for ESB REST APIs

2016-09-28 Thread Joseph Fonseka
Hi Jagath

It is the same case weather we provide users to add swagger
annotations/notes to define additional parameters in synapse. If we have
such approch we can use it to define the path parameter type.

Since we are supporting above in the next iteration we could resolve to
create the path parameter with a default type preferably *string* since it
is less restrictive.

Also please note swagger spec do not support full URI template
specification.

Thanks
Jo

On Tue, Sep 27, 2016 at 11:12 AM, Jagath Sisirakumara Ariyarathne <
jaga...@wso2.com> wrote:

> Hi,
>
> While implementing swagger definition for uri-template based APIs, we have
> following problem.
>
> If we have a template like "/view/{symbol}", we need to define "symbol" as
> a parameter in swagger definition. According to the swagger spec for
> parameters[1], if it is a query or path parameter, then it is required to
> have a type (string, number etc) for this parameter. But this information
> is not available in existing synapse configurations of APIs. The possible
> option is to provide all parameters as "string" as Maheeka mentioned
> earlier.
>
> Appreciate any thoughts on this.
>
> [1] - http://swagger.io/specification/#parameterObject
>
> Thanks.
>
> On Tue, Sep 27, 2016 at 5:38 AM, Jagath Sisirakumara Ariyarathne <
> jaga...@wso2.com> wrote:
>
>> Hi All,
>>
>> I have completed initial implementation for url-mapping based APIs.
>> Attached sample API and its definitions. I am further working on supporting
>> uri-templates based definitions.
>>
>> Thanks.
>>
>> On Thu, Sep 22, 2016 at 2:09 PM, Jagath Sisirakumara Ariyarathne <
>> jaga...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> In this particular implementation for Integration Cloud, we planned to
>>> go with an extension which uses existing information in synapse
>>> configurations without updating synapse code base. Therefore as Maheeka
>>> mentioned in [1], we are going to provide limited information at initial
>>> phase. But in long run, we need to extend this to store all required API
>>> definitions in synapse configurations.
>>>
>>> [1] - https://gist.github.com/maheeka/ec23751f21d8d7d5abaa4f9130f233f2
>>>
>>> Thanks.
>>>
>>> On Thu, Sep 22, 2016 at 8:23 AM, Joseph Fonseka <jos...@wso2.com> wrote:
>>>
>>>> Hi
>>>>
>>>> On Tue, Sep 20, 2016 at 4:18 PM, Maheeka Jayasuriya <mahe...@wso2.com>
>>>> wrote:
>>>>
>>>>>
>>>>> Please note these changes were done based on the level of information
>>>>> we have on the API by referring to it's configuration. For example, we do
>>>>> not have a way of determining the request format or uri parameter types 
>>>>> and
>>>>> content-types of the API. This will require further digging and analyzing
>>>>> on the configuration.
>>>>>
>>>>
>>>> Have you consider adding additional information as annotations/notes in
>>>> the config. AFAIK we do not have a config to add annotations so currently
>>>> we can define them as properties but going forward may be we can add some
>>>> way to annotate synapse.
>>>>
>>>> In the longer run mostly synapse APIs will be generated out of swagger
>>>> definitions thus having the ability to contain all the API definition
>>>> information in the synapse file would be important.
>>>>
>>>> Thanks
>>>> Jo
>>>>
>>>>
>>>>>
>>>>> Find the diff of these changes done to the Swagger definition at [4]
>>>>>
>>>>> To get the required information from the Rest API configuration we can
>>>>> invoke RestApiAdminServices's getApiByName operation which returns the
>>>>> following response [5] for an API created that has the PetStore resources.
>>>>> We can identify the methods and uri-template and mappings from this
>>>>> response.
>>>>>
>>>>> Please let know your thoughts.
>>>>>
>>>>> Thanks,
>>>>> Maheeka
>>>>>
>>>>> [1] http://petstore.swagger.io/#/pet
>>>>> [2] https://gist.github.com/maheeka/4eaedd2e2e0765959a4166865bf9adf9
>>>>> [3] https://gist.github.com/maheeka/ec23751f21d8d7d5abaa4f9130f233f2
>>>>> [4] https://www.diffchecker.com/xEu0NSNz
>>>>> [5] http://schemas.
>>>>&g

Re: [Dev] [Integration Cloud] Swagger Support for ESB REST APIs

2016-09-21 Thread Joseph Fonseka
Hi

On Tue, Sep 20, 2016 at 4:18 PM, Maheeka Jayasuriya <mahe...@wso2.com>
wrote:

>
> Please note these changes were done based on the level of information we
> have on the API by referring to it's configuration. For example, we do not
> have a way of determining the request format or uri parameter types and
> content-types of the API. This will require further digging and analyzing
> on the configuration.
>

Have you consider adding additional information as annotations/notes in the
config. AFAIK we do not have a config to add annotations so currently we
can define them as properties but going forward may be we can add some way
to annotate synapse.

In the longer run mostly synapse APIs will be generated out of swagger
definitions thus having the ability to contain all the API definition
information in the synapse file would be important.

Thanks
Jo


>
> Find the diff of these changes done to the Swagger definition at [4]
>
> To get the required information from the Rest API configuration we can
> invoke RestApiAdminServices's getApiByName operation which returns the
> following response [5] for an API created that has the PetStore resources.
> We can identify the methods and uri-template and mappings from this
> response.
>
> Please let know your thoughts.
>
> Thanks,
> Maheeka
>
> [1] http://petstore.swagger.io/#/pet
> [2] https://gist.github.com/maheeka/4eaedd2e2e0765959a4166865bf9adf9
> [3] https://gist.github.com/maheeka/ec23751f21d8d7d5abaa4f9130f233f2
> [4] https://www.diffchecker.com/xEu0NSNz
> [5] http://schemas.
> xmlsoap.org/soap/envelope/">
>
>   http://org.apache.axis2/xsd;>
>  http://api.rest.carbon.wso2.org/xsd; xmlns:xsi="http://www.w3.org/
> 2001/XMLSchema-instance">
> 
> /pet
> PetstoreAPI.xml
> 
> false
> PetstoreAPI
> -1
> 
>
>
>
>
>
>POST
>PUT
>
>
>0
>
>/
>
> 
> 
>
>
>
>
>
>POST
>DELETE
>GET
>
>
>0
>/{petId}
>    
>
> 
> false
> false
>  
>   
>
> 
>
>
> Thanks,
>
> Maheeka Jayasuriya
> Senior Software Engineer
> Mobile : +9450661
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Reverse Proxy issues in APIM Log Analyzer

2016-08-24 Thread Joseph Fonseka
Hi Tishan

As I understand the issue is not related to CORS. basically what is failing
here is that log-analyzer-proxy.jag
<https://localhost/apimanager/admin/modules/la/log-analyzer-proxy.jag?type=14=LOGANALYZER>
 script is not exposed via revers-proxy or the script path is not
re-written correctly by the application.

1. Is the log-analyzer-proxy.jag
<https://localhost/apimanager/admin/modules/la/log-analyzer-proxy.jag?type=14=LOGANALYZER>
 hard-coded in a script ?
2. Check if you can access the log-analyzer-proxy.jag
<https://localhost/apimanager/admin/modules/la/log-analyzer-proxy.jag?type=14=LOGANALYZER>
 after providing the mapped domain.
3. If above is working you can dynamically generate the script path in the
app based on the revers-proxy config.

Cheers
Jo

On Wed, Aug 24, 2016 at 7:49 AM, Tishan Dahanayakage <tis...@wso2.com>
wrote:

> Hi all,
>
> I am testing reverse proxy support in APIM log analyzer dashboard and came
> though encountered following issue.
>
> When loading the gadgets we make the following call.
> https://localhost/apimanager/admin/modules/la/log-analyzer-
> proxy.jag?type=14=LOGANALYZER
>
> Because of the reverse proxy configuration origin and the request URL
> domain does not match. This results in a CORS preflight request to the
> destination. But since cookies are not allowed in preflight request,
> jsessionID is not sent. This results in a redirection to login page.
> Because of the redirection status code, preflight request is failed.
>
> Patching BE jaggery file to handle the OPTIONS preflight call will solve
> this issue AFAIU. Is it the way we practice in /store /publisher? Or is
> there any other way to avoid origin mismatch?
>
> Thanks
> /Tishan
>
> --
> Tishan Dahanayakage
> Senior Software Engineer
> WSO2, Inc.
> Mobile:+94 716481328
>
> 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, 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.
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [VOTE] Release WSO2 API Manager 2.0.0 RC5

2016-07-28 Thread Joseph Fonseka
Tested the following

1. Store & Publisher functionality.
2. Swagger Editor & Swagger UI with YAML import.
3. Latest security fixes.
4. Scopes and Grant-types.

No Issues found.

[+] Stable - go ahead and release.

On Thu, Jul 28, 2016 at 2:34 PM, Chamalee De Silva <chama...@wso2.com>
wrote:

> Hi,
> I have done following tests.
>
>  Basic API Flow
>  SAML2 Grant type with IS 5.2.0 beta2
>
>
> No issues found.
>
> [+] Stable - go ahead and release
>
>
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] SDK Generation using Swagger Code Generator

2016-07-11 Thread Joseph Fonseka
IMO combining API definition can lead to many conflicts not just the
resources eg. Definitions , Parameters. Thus +1 for suggested approach
which is a better solution then combining definitions.

Regards
Jo

On Tue, Jul 12, 2016 at 7:58 AM, Abimaran Kugathasan <abima...@wso2.com>
wrote:

> Hi All,
>
> In API Manager 2.0, we are supporting generating SDK of APIs through
> Swagger. Currently, we are combining APIs a user has subscribed through an
> OAuth application and generates one SDK for all his APIs.
>
> Problem with this approach is, we are combining subscribed APIs together
> and generate the SDK, and the generated SDK has one Java class (in case of
> JAVA SDK) to represent the subscribed APIs. And, for each resource we
> defined in the APIs, Swagger generates corresponding method with that
> resource name. If we have two resource with same name in two different
> APIs, then there will be only one method and it's not consistent.
>
>
> As I checked, we can provide one Swagger json file to Swagger Generator
> for generating SDK. What will be the best approach to generate SDK for
> subscribed APIs.
>
> Shall we generate SDK for each subscribed API rather than for each Oauth
> Application? Because there are lesser chances for requirement to have one
> SDK for all the subscribed APIs
>
>
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer
>
> Email : abima...@wso2.com
> Mobile : +94 773922820
>
> <http://stackoverflow.com/users/515034>
> <http://lk.linkedin.com/in/abimaran>
> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimarank>
> <https://twitter.com/abimaran>
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [API Store] Switching through Side Panes and them moving around while switching does not look cool

2016-06-30 Thread Joseph Fonseka
>From the experience we had thus far with the new store theme almost all the
new users complained / mentioned about this behavior. But after some time
they get used to it.

On Fri, Jul 1, 2016 at 7:54 AM, Chamara Ariyarathne <chama...@wso2.com>
wrote:

> Totally agree. and I'm not suggesting something like a T pattern or
> something.
>
> My concern is the Menu Items in the F moving around in a weird way.
> If those heat graphs in that article are true then I'm pretty sure the
> reader will get totally distracted by that action.
>
> On Fri, Jul 1, 2016 at 4:36 AM, Dakshika Jayathilaka <daksh...@wso2.com>
> wrote:
>
>> Hi all,
>>
>> IMO this is the expected behavior for this type of menu. If the user view
>> this page first time, they can see related menu options which are available
>> and corresponding actions to each menu item will display within the action
>> bar(next to the menu in same level).
>>
>> Intentionally we don't maintain the order in this menu, cause user can
>> select appropriate action, depending on his or her desire. We consider
>> F-pattern[1] on this and user will drive accordingly.
>>
>> [1]
>> https://www.nngroup.com/articles/f-shaped-pattern-reading-web-content/
>>
>> Regards,
>>
>> *Dakshika Jayathilaka*
>> PMC Member & Committer of Apache Stratos
>> Associate Technical Lead
>> WSO2, Inc.
>> lean.enterprise.middleware
>> 0771100911
>>
>> On Tue, Jun 28, 2016 at 3:11 PM, Roshan Wijesena <ros...@wso2.com> wrote:
>>
>>> [+ adding Joe/Thusitha]
>>>
>>> On Tue, Jun 28, 2016 at 3:08 PM, Chamara Ariyarathne <chama...@wso2.com>
>>> wrote:
>>>
>>>> Created a jira for this.
>>>> https://wso2.org/jira/browse/APIMANAGER-5131
>>>>
>>>> Please share your ideas on this.
>>>>
>>>> --
>>>> *Chamara Ariyarathne*
>>>> Associate Technical Lead - QA
>>>> WSO2 Inc; http://www.wso2.com/
>>>> Mobile; *+94772786766 <%2B94772786766>*
>>>>
>>>
>>>
>>>
>>> --
>>> Roshan Wijesena.
>>> Senior Software Engineer-WSO2 Inc.
>>> Mobile: *+94719154640 <%2B94719154640>*
>>> Email: ros...@wso2.com
>>> *WSO2, Inc. :** wso2.com <http://wso2.com/>*
>>> lean.enterprise.middleware.
>>>
>>
>>
>
>
> --
> *Chamara Ariyarathne*
> Associate Technical Lead - QA
> WSO2 Inc; http://www.wso2.com/
> Mobile; *+94772786766 <%2B94772786766>*
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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

2016-06-15 Thread Joseph Fonseka
>> server and should not be used anymore which is wrong. It's a
>>>>>>>> defined resource collection that can exist in the server with 0 to many
>>>>>>>> items.
>>>>>>>>
>>>>>>>> Therefore, in such instances where we do not query for exact
>>>>>>>> resources, but for a possible collection of resources in the server 
>>>>>>>> using
>>>>>>>> query parameters, it's much better to return an empty set with a 200 
>>>>>>>> rather
>>>>>>>> than a 404 if there exist zero items by the time of request.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Dilan.
>>>>>>>>
>>>>>>>> On Wednesday, June 15, 2016, Kamidu Punchihewa <sachi...@wso2.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi All,
>>>>>>>>>
>>>>>>>>> Agreed with Geeth and Harshan, When it come to the OOB User
>>>>>>>>> interface of EMM the request with an 404 is detect as an error and 
>>>>>>>>> your is
>>>>>>>>> prompted with an error message since the error handling is handling 
>>>>>>>>> in a
>>>>>>>>> Central controller witch acts in general so if there are no error 
>>>>>>>>> occurred
>>>>>>>>> in the sever side best approach not to return status code in 400 - 499
>>>>>>>>> range.
>>>>>>>>>
>>>>>>>>> Thanks & Best Regards,
>>>>>>>>>
>>>>>>>>> Kamidu Sachith Punchihewa
>>>>>>>>> *Software Engineer*
>>>>>>>>> WSO2, Inc.
>>>>>>>>> lean . enterprise . middleware
>>>>>>>>> Mobile : +94 (0) 770566749 <%2B94%20%280%29%20773%20451194>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Disclaimer: This communication may contain privileged or other
>>>>>>>>> confidential information and is intended exclusively for the 
>>>>>>>>> addressee/s.
>>>>>>>>> If you are not the intended recipient/s, or believe that you may have
>>>>>>>>> received this communication in error, please reply to the sender 
>>>>>>>>> indicating
>>>>>>>>> that fact and 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.
>>>>>>>>>
>>>>>>>>> On Wed, Jun 15, 2016 at 12:18 AM, Harshan Liyanage <
>>>>>>>>> hars...@wso2.com> wrote:
>>>>>>>>>
>>>>>>>>>> +1
>>>>>>>>>>
>>>>>>>>>> Harshan Liyanage
>>>>>>>>>> Senior Software Engineer
>>>>>>>>>> Mobile: *+94724423048*
>>>>>>>>>> Email: hars...@wso2.com
>>>>>>>>>> Blog : http://harshanliyanage.blogspot.com/
>>>>>>>>>> *WSO2, Inc. :** wso2.com <http://wso2.com/>*
>>>>>>>>>> lean.enterprise.middleware.
>>>>>>>>>>
>>>>>>>>>> On Tue, Jun 14, 2016 at 1:42 PM, Geeth Munasinghe <ge...@wso2.com
>>>>>>>>>> > wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi all,
>>>>>>>>>>>
>>>>>>>>>>> I think we should make relevant changes in APIs to send 200
>>>>>>>>>>> status code for no content responses. This should only be done if 
>>>>>>>>>>> the
>>>>>>>>>>> request is with query or form params, but not for request with path
>>>>>>>>>>> parameters (Which is an exact resource, should return 404).
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>> Geeth
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> *G. K. S. Munasinghe*
>>>>>>>>>>> *Senior Software Engineer,*
>>>>>>>>>>> *WSO2, Inc. http://wso2.com <http://wso2.com/> *
>>>>>>>>>>> *lean.enterprise.middleware.*
>>>>>>>>>>>
>>>>>>>>>>> email: ge...@wso2.com
>>>>>>>>>>> phone:(+94) 777911226
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Jun 14, 2016 at 11:48 PM, Harshan Liyanage <
>>>>>>>>>>> hars...@wso2.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Geeth,
>>>>>>>>>>>>
>>>>>>>>>>>> Agreed. In such cases I guess sending 200 with empty body will
>>>>>>>>>>>> be more appropriate because there are some cases where the server 
>>>>>>>>>>>> responds
>>>>>>>>>>>> with 204 when the service does not return data (i.e in some 
>>>>>>>>>>>> DELETE, POST
>>>>>>>>>>>> requests).
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>
>>>>>>>>>>>> Harshan Liyanage
>>>>>>>>>>>> Senior Software Engineer
>>>>>>>>>>>> Mobile: *+94724423048*
>>>>>>>>>>>> Email: hars...@wso2.com
>>>>>>>>>>>> Blog : http://harshanliyanage.blogspot.com/
>>>>>>>>>>>> *WSO2, Inc. :** wso2.com <http://wso2.com/>*
>>>>>>>>>>>> lean.enterprise.middleware.
>>>>>>>>>>>>
>>>>>>>>>>>> On Tue, Jun 14, 2016 at 12:42 PM, Geeth Munasinghe <
>>>>>>>>>>>> ge...@wso2.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Ayyoob
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Tue, Jun 14, 2016 at 11:01 PM, Ayyoob Hamza <
>>>>>>>>>>>>> ayy...@wso2.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Yes I agree with Harshan,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> It is a question about whether we are looking this as a
>>>>>>>>>>>>>> resource or an endpoint. We should look at the url in the 
>>>>>>>>>>>>>> resource
>>>>>>>>>>>>>> context(restful approach) even though it is built on top of 
>>>>>>>>>>>>>> http. Therefore
>>>>>>>>>>>>>> IMO we need to think that we are mapping a resource to the url 
>>>>>>>>>>>>>> and
>>>>>>>>>>>>>> therefore suitable response would be 404.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>> /devices/{device_idenitifier} - this should return 404 if
>>>>>>>>>>>>> requested for non-existence device. I have no argument about it. 
>>>>>>>>>>>>> But my
>>>>>>>>>>>>> concern is at /devices?{query_parameter}. This is different. 
>>>>>>>>>>>>> Actual
>>>>>>>>>>>>> resource is /devices, but it returns no content due to filtering 
>>>>>>>>>>>>> criteria
>>>>>>>>>>>>> associated with query parameters, That is, in my opinion is a 
>>>>>>>>>>>>> valid request
>>>>>>>>>>>>> which deserves a 200 or 204 response code.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>> Geeth
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> *Dilan U. Ariyaratne*
>>>>>>>> Senior Software Engineer
>>>>>>>> WSO2 Inc. <http://wso2.com/>
>>>>>>>> Mobile: +94766405580 <%2B94766405580>
>>>>>>>> lean . enterprise . middleware
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> With Regards,
>>>>>>>
>>>>>>> *Rasika Perera*
>>>>>>> Software Engineer
>>>>>>> M: +94 71 680 9060 E: rasi...@wso2.com
>>>>>>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>>>>>>
>>>>>>> WSO2 Inc. www.wso2.com
>>>>>>> lean.enterprise.middleware
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> With Regards,
>>>>
>>>> *Rasika Perera*
>>>> Software Engineer
>>>> M: +94 71 680 9060 E: rasi...@wso2.com
>>>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>>>
>>>> WSO2 Inc. www.wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>
>>>
>>
>
>
> --
> Regards,
>
> Chatura Dilan Perera
> *Associate Tech Lead** - WSO2 Inc.*
> www.dilan.me
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] REST-API: Fine Grained resources vs Coarse Grained resources

2016-03-29 Thread Joseph Fonseka
Hi

Having different ways to retrieve the configs of the resource will affect
the intuitiveness of the API so IMO having a uniform way of retrieving the
configs will be more beneficial.

Alternate solutions for the given problem.
1. You always return the configs as part of the specific resource. Ex. /
analysis/{analysis_id} and give the option of turning off configs as a
query parameter Ex /analysis/{analysis_id}?configs=false.
2. Further more you can filter configs with /analysis/{
analysis_id}?configs=attribute.
3. If you want to do a partial update of configs you can use sub resource
or a controller resource. Ex. /analysis/{analysis_id}/configs,  /
analysis/update-config

Regards
Jo

On Tue, Mar 29, 2016 at 3:31 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> When designing API, we need to let the clients know the API endpoints so
> they can invoke relevant  endpoint to fetch expected resource. Assuming
> size of the configuration/analytic object payload is a dynamic thing, how
> can the client know which endpoints to invoke to fetch the required
> resource. How does the client know the size of the analytic payload. In
> this case how does a client know which API endpoint to invoke if he want to
> get configs. It may be GET /analysis if analysis size is low, otherwise GET
> /analysis/configs .
>
> Yes, we can not go extreme in fine grain or coarse grain. IMO best
> approach is to go in middle path, define a reasonable set of endpoints to
> fetch resources.
>
> On Tue, Mar 29, 2016 at 3:08 PM, Thamali Wijewardhana <tham...@wso2.com>
> wrote:
>
>> Hi,
>>
>> When creating a REST API to WSO2 machine learner, one of the important
>> problems I faced was selection among fine grained resources and coarse
>> grained resources. In other words, whether to define something as a
>> separate resource or a part of a large resource.
>>
>> Fine grained Resources are low complex and easy to maintain. But it can
>> make data become an inconsistent state and the server will end up receiving
>> higher number of HTTP requests possibly impacting its ability to serve
>> multiple API consumers.
>>
>> In using coarse grained resources, the data inconsistency and higher load
>> on the server is reduced. But it may be difficult to maintain and higher
>> JSON payload may be returned.
>>
>> For example, we have an API GET api/analysis/analysis_id/configs which
>> retrieves configurations of an API. The problem is whether to use a
>> separate resource for configs or return configs with the analysis resource.
>> If we consider configuration as a separate resource, we have to define an
>> API, GET api/analysis/analysis_id/configs. But if we return configs with
>> analysis resource, then it may be only the API GET
>> api/analysis/analysis_id  and the configuration should be added to analysis
>> resource and returned with it.
>>
>> I have found an approach to solve the problem and given below is what I
>> have understood.
>>
>> The decision should be taken considering the situation.
>>
>> Here, the decision is based on the size of the configuration object. If
>> it has a large size, then if we return it with analysis resource, it may be
>> a large JSON payload and time wastage because every time an analysis
>> resource is returned configuration also have to be returned even not
>> necessary. Therefore, if configuration is large, it is better to use a
>> separate resource for configurations and use a separate API as
>> api/analysis/analysis_id/configs
>>
>> But, when we have to access a simple property such as algorithm-name of
>> the analysis, then it is better to return it with algorithm resource.
>>
>> This is the approach I have decided and highly appreciate your
>> suggestions on this.
>>
>>
>> Thanks
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Adding new API store themes for tenants via admin-dashboard

2016-03-10 Thread Joseph Fonseka
The sample must have been done for an older version and the js files in it
must be replacing the new ones. So the issue is with the sample thus you
can modify the sample only including the necessary files for a theme
change.

On Thu, Mar 10, 2016 at 2:31 PM, Shenavi de Mel <shen...@wso2.com> wrote:

> Hi Jo,
>
> I also noticed that when uploading a tenant theme with the sample that you
> have given in the tutorial [1] breaks the swagger console for the api store
> of that tenant. when i removed the templates folder inside the tenant's
> theme i was able to resolve the issue. Should the template folder also not
> be added seems it is causing some issues. Please see the attached
> screenshot. Any reason for this?
>
> [1] https://docs.wso2.com/display/AM191/Adding+a+new+API+Store+Theme
>
> Best Regards
> Shenavi.
>
> *Shenavi de Mel*
> Software Engineer
> WSO2 Inc: http://wso2.com
> email: shen...@wso2.com
> mobile: 0711644470
>
>
> On Thu, Mar 3, 2016 at 10:10 AM, Shenavi de Mel <shen...@wso2.com> wrote:
>
>> Hi Jo,
>>
>> At the moment it is a blocker since we have customer who wants to change
>> the web fonts and customize the theme. Ideally since web fonts are harmless
>> it might not make sense to tell him that we do not support the
>> customization of them. WDYT?
>>
>> Regards
>> Shenavi
>>
>> *Shenavi de Mel*
>> Software Engineer
>> WSO2 Inc: http://wso2.com
>> email: shen...@wso2.com
>> mobile: 0711644470
>>
>>
>> On Thu, Mar 3, 2016 at 10:05 AM, Joseph Fonseka <jos...@wso2.com> wrote:
>>
>>> Is this a blocker can we fix this in the next release ?
>>>
>>> Thanks
>>> Jo
>>>
>>> On Thu, Mar 3, 2016 at 10:02 AM, Shenavi de Mel <shen...@wso2.com>
>>> wrote:
>>>
>>>> Hi Jo,
>>>>
>>>> Yeah that would be a better approach. Is there any possibility we could
>>>> get this changes incorporated to the 1.10.0 release? If not we would need
>>>> to patch it and would have to maintain it from the cloud end. We would
>>>> appreciate if this could be issued as a patch for 1.10.0 since we would be
>>>> migrating to that version soon. Let us know the feedback.
>>>>
>>>> Thanks
>>>> Shenavi
>>>>
>>>> *Shenavi de Mel*
>>>> Software Engineer
>>>> WSO2 Inc: http://wso2.com
>>>> email: shen...@wso2.com
>>>> mobile: 0711644470
>>>>
>>>>
>>>> On Wed, Mar 2, 2016 at 8:14 PM, Joseph Fonseka <jos...@wso2.com> wrote:
>>>>
>>>>> I don't think font files can harm the system lets make white-list
>>>>> configurable so we can add file types which are safe.
>>>>>
>>>>> Regards
>>>>> Jo
>>>>>
>>>>> On Wed, Mar 2, 2016 at 8:28 AM, Shenavi de Mel <shen...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Jo,
>>>>>>
>>>>>> Just another concern. Is there a particular reason why the deployment
>>>>>> of web fonts with the theme is also not allowed. If user wants to change
>>>>>> the default web fonts is that going to be of any harm to the product and
>>>>>> it's functions?
>>>>>>
>>>>>> Regards
>>>>>> Shenavi
>>>>>>
>>>>>> *Shenavi de Mel*
>>>>>> Software Engineer
>>>>>> WSO2 Inc: http://wso2.com
>>>>>> email: shen...@wso2.com
>>>>>> mobile: 0711644470
>>>>>>
>>>>>>
>>>>>> On Tue, Mar 1, 2016 at 12:15 PM, Shenavi de Mel <shen...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Jo,
>>>>>>>
>>>>>>> Thanks for the quick response. For the first issue we can remove the
>>>>>>> files which are included in the sample and provide that for the users 
>>>>>>> and
>>>>>>> probably mention the supported file extensions as well in the
>>>>>>> documentation. I guess the 2nd issue would have to be fixed and i 
>>>>>>> created a
>>>>>>> JIRA to track it [1]. It would be great if you could let us know if this
>>>>>>> would be fixed in the upcoming release of APIM.
>>>>>>>
>>>>>>> [1] https://wso2.org/jira/

Re: [Dev] [APIM] Adding new API store themes for tenants via admin-dashboard

2016-03-02 Thread Joseph Fonseka
Is this a blocker can we fix this in the next release ?

Thanks
Jo

On Thu, Mar 3, 2016 at 10:02 AM, Shenavi de Mel <shen...@wso2.com> wrote:

> Hi Jo,
>
> Yeah that would be a better approach. Is there any possibility we could
> get this changes incorporated to the 1.10.0 release? If not we would need
> to patch it and would have to maintain it from the cloud end. We would
> appreciate if this could be issued as a patch for 1.10.0 since we would be
> migrating to that version soon. Let us know the feedback.
>
> Thanks
> Shenavi
>
> *Shenavi de Mel*
> Software Engineer
> WSO2 Inc: http://wso2.com
> email: shen...@wso2.com
> mobile: 0711644470
>
>
> On Wed, Mar 2, 2016 at 8:14 PM, Joseph Fonseka <jos...@wso2.com> wrote:
>
>> I don't think font files can harm the system lets make white-list
>> configurable so we can add file types which are safe.
>>
>> Regards
>> Jo
>>
>> On Wed, Mar 2, 2016 at 8:28 AM, Shenavi de Mel <shen...@wso2.com> wrote:
>>
>>> Hi Jo,
>>>
>>> Just another concern. Is there a particular reason why the deployment of
>>> web fonts with the theme is also not allowed. If user wants to change the
>>> default web fonts is that going to be of any harm to the product and it's
>>> functions?
>>>
>>> Regards
>>> Shenavi
>>>
>>> *Shenavi de Mel*
>>> Software Engineer
>>> WSO2 Inc: http://wso2.com
>>> email: shen...@wso2.com
>>> mobile: 0711644470
>>>
>>>
>>> On Tue, Mar 1, 2016 at 12:15 PM, Shenavi de Mel <shen...@wso2.com>
>>> wrote:
>>>
>>>> Hi Jo,
>>>>
>>>> Thanks for the quick response. For the first issue we can remove the
>>>> files which are included in the sample and provide that for the users and
>>>> probably mention the supported file extensions as well in the
>>>> documentation. I guess the 2nd issue would have to be fixed and i created a
>>>> JIRA to track it [1]. It would be great if you could let us know if this
>>>> would be fixed in the upcoming release of APIM.
>>>>
>>>> [1] https://wso2.org/jira/browse/APIMANAGER-4570
>>>>
>>>> Thanks
>>>> Shenavi
>>>>
>>>> *Shenavi de Mel*
>>>> Software Engineer
>>>> WSO2 Inc: http://wso2.com
>>>> email: shen...@wso2.com
>>>> mobile: 0711644470
>>>>
>>>>
>>>> On Tue, Mar 1, 2016 at 11:53 AM, Joseph Fonseka <jos...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi Shenavi
>>>>>
>>>>> Both issues you mention are valid.
>>>>> 1. The reason to add a white list is to prevent users from uploading
>>>>> malicious script. And we should remove the unsupported files from the
>>>>> sample. Also we might need to move the white-list to a config file.
>>>>>
>>>>> 2. And yes we should replace the entire directory instead of copying
>>>>> the files in to the existing theme.
>>>>>
>>>>> Regards
>>>>> Jo
>>>>>
>>>>> On Tue, Mar 1, 2016 at 10:44 AM, Shenavi de Mel <shen...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi APIM team,
>>>>>>
>>>>>> I have a few question regarding the uploading of tenant themes to the
>>>>>> APIM.
>>>>>>
>>>>>> 1. When i was uploading a tenant theme for a tenant following the
>>>>>> tutorial [1] i noticed some warn logs in my console. Further i noticed 
>>>>>> that
>>>>>> the files mentioned in those warnings are not deployed as well and are
>>>>>> mentioned as unsupported. Only thing i did not follow according to this
>>>>>> document is that i did not delete the folders that i did not change. 
>>>>>> When i
>>>>>> went through the code of TenantManagerHostObject.java class i
>>>>>> noticed that the file extensions other than "css", "jpg", "png", "gif",
>>>>>> "svg", "ttf", "html", "js are not considered as valid extensions and will
>>>>>> not be deployed with the theme. In that case is there any reason why 
>>>>>> those
>>>>>> unsupported files are included in the sample template [1] given for the
>>>>>>

Re: [Dev] [APIM] Adding new API store themes for tenants via admin-dashboard

2016-03-02 Thread Joseph Fonseka
I don't think font files can harm the system lets make white-list
configurable so we can add file types which are safe.

Regards
Jo

On Wed, Mar 2, 2016 at 8:28 AM, Shenavi de Mel <shen...@wso2.com> wrote:

> Hi Jo,
>
> Just another concern. Is there a particular reason why the deployment of
> web fonts with the theme is also not allowed. If user wants to change the
> default web fonts is that going to be of any harm to the product and it's
> functions?
>
> Regards
> Shenavi
>
> *Shenavi de Mel*
> Software Engineer
> WSO2 Inc: http://wso2.com
> email: shen...@wso2.com
> mobile: 0711644470
>
>
> On Tue, Mar 1, 2016 at 12:15 PM, Shenavi de Mel <shen...@wso2.com> wrote:
>
>> Hi Jo,
>>
>> Thanks for the quick response. For the first issue we can remove the
>> files which are included in the sample and provide that for the users and
>> probably mention the supported file extensions as well in the
>> documentation. I guess the 2nd issue would have to be fixed and i created a
>> JIRA to track it [1]. It would be great if you could let us know if this
>> would be fixed in the upcoming release of APIM.
>>
>> [1] https://wso2.org/jira/browse/APIMANAGER-4570
>>
>> Thanks
>> Shenavi
>>
>> *Shenavi de Mel*
>> Software Engineer
>> WSO2 Inc: http://wso2.com
>> email: shen...@wso2.com
>> mobile: 0711644470
>>
>>
>> On Tue, Mar 1, 2016 at 11:53 AM, Joseph Fonseka <jos...@wso2.com> wrote:
>>
>>> Hi Shenavi
>>>
>>> Both issues you mention are valid.
>>> 1. The reason to add a white list is to prevent users from uploading
>>> malicious script. And we should remove the unsupported files from the
>>> sample. Also we might need to move the white-list to a config file.
>>>
>>> 2. And yes we should replace the entire directory instead of copying the
>>> files in to the existing theme.
>>>
>>> Regards
>>> Jo
>>>
>>> On Tue, Mar 1, 2016 at 10:44 AM, Shenavi de Mel <shen...@wso2.com>
>>> wrote:
>>>
>>>> Hi APIM team,
>>>>
>>>> I have a few question regarding the uploading of tenant themes to the
>>>> APIM.
>>>>
>>>> 1. When i was uploading a tenant theme for a tenant following the
>>>> tutorial [1] i noticed some warn logs in my console. Further i noticed that
>>>> the files mentioned in those warnings are not deployed as well and are
>>>> mentioned as unsupported. Only thing i did not follow according to this
>>>> document is that i did not delete the folders that i did not change. When i
>>>> went through the code of TenantManagerHostObject.java class i noticed
>>>> that the file extensions other than "css", "jpg", "png", "gif", "svg",
>>>> "ttf", "html", "js are not considered as valid extensions and will not be
>>>> deployed with the theme. In that case is there any reason why those
>>>> unsupported files are included in the sample template [1] given for the
>>>> users to customize?
>>>>
>>>> If you could confirm or point to a documentation of what are the
>>>> supported file types which can be customized in the custom theme uploaded
>>>> via the admin-dashboard of the tenant if it is not already in the docs i
>>>> feel it might be better to include them in the docs to avoid confusion [1].
>>>>
>>>> 2. Also i noticed if i upload a theme for the tenant and say I include
>>>> a custom css file. And later upload another theme for the same tenant
>>>> hoping to replace the previously uploaded theme and remove that css file it
>>>> will still be available. I assume it replaces the existing folder with the
>>>> new theme hence old files will not get deleted. Is there a way to make sure
>>>> the old theme is deleted and replaced by the new theme when uploading via
>>>> the admin-dashboard application or is that the default and expected
>>>> behavior?
>>>>
>>>> Your thoughts would be much appreciated to understand this better and
>>>> also improve our documentation [2] to avoid confusion and provide more
>>>> information for the users.
>>>>
>>>> [1] https://docs.wso2.com/display/AM191/Adding+a+new+API+Store+Theme
>>>> [2]
>>>> https://docs.wso2.com/display/APICloud/Customize+the+API+Store+Theme
>>>>
>>>> Thanks and Regards
>>>> Shenavi.
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> --
>>> *Joseph Fonseka*
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: +94 772 512 430
>>> skype: jpfonseka
>>>
>>> * <http://lk.linkedin.com/in/rumeshbandara>*
>>>
>>>
>>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Adding new API store themes for tenants via admin-dashboard

2016-02-29 Thread Joseph Fonseka
Hi Shenavi

Both issues you mention are valid.
1. The reason to add a white list is to prevent users from uploading
malicious script. And we should remove the unsupported files from the
sample. Also we might need to move the white-list to a config file.

2. And yes we should replace the entire directory instead of copying the
files in to the existing theme.

Regards
Jo

On Tue, Mar 1, 2016 at 10:44 AM, Shenavi de Mel <shen...@wso2.com> wrote:

> Hi APIM team,
>
> I have a few question regarding the uploading of tenant themes to the APIM.
>
> 1. When i was uploading a tenant theme for a tenant following the tutorial
> [1] i noticed some warn logs in my console. Further i noticed that the
> files mentioned in those warnings are not deployed as well and are
> mentioned as unsupported. Only thing i did not follow according to this
> document is that i did not delete the folders that i did not change. When i
> went through the code of TenantManagerHostObject.java class i noticed
> that the file extensions other than "css", "jpg", "png", "gif", "svg",
> "ttf", "html", "js are not considered as valid extensions and will not be
> deployed with the theme. In that case is there any reason why those
> unsupported files are included in the sample template [1] given for the
> users to customize?
>
> If you could confirm or point to a documentation of what are the supported
> file types which can be customized in the custom theme uploaded via the
> admin-dashboard of the tenant if it is not already in the docs i feel it
> might be better to include them in the docs to avoid confusion [1].
>
> 2. Also i noticed if i upload a theme for the tenant and say I include a
> custom css file. And later upload another theme for the same tenant hoping
> to replace the previously uploaded theme and remove that css file it will
> still be available. I assume it replaces the existing folder with the new
> theme hence old files will not get deleted. Is there a way to make sure the
> old theme is deleted and replaced by the new theme when uploading via the
> admin-dashboard application or is that the default and expected behavior?
>
> Your thoughts would be much appreciated to understand this better and also
> improve our documentation [2] to avoid confusion and provide more
> information for the users.
>
> [1] https://docs.wso2.com/display/AM191/Adding+a+new+API+Store+Theme
> [2] https://docs.wso2.com/display/APICloud/Customize+the+API+Store+Theme
>
> Thanks and Regards
> Shenavi.
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Implementing Geographical based Analytics in API Manager

2016-02-21 Thread Joseph Fonseka
Please find the inline comments.

On Mon, Feb 22, 2016 at 11:46 AM, Tharindu Dharmarathna <tharin...@wso2.com>
wrote:

1. When events publish from APIM to DAS we can extract the location and
> send it through the stream
>

This is quite possible but you need to cache resolved locations to reduce
the number of service calls to resolve locations. Usually you only need to
resolve the location when a new client connects.


>
> 2. When we running the spark script on top of stream data we can write a
> new function to extract this from DAS and do the sumarization As necessary.
> This way will reduce the # of checks to get Location.
>

This seems to be the most appropriate place to do the resolution IMO.


> 3. Running from the Graph side.
>

This is a no go since we cannot aggregate data when rendering on the client
and even if we can will be costly.

Also we might want to look for what levels of location data available (Ex.
country, state, latlong) for ip address if possible we should support
graphing at any level.

Regards
Jo




I think from 2nd way is the best way to do this.
>
>
> @ Mohan,
>
> Shall we make a Interface which people can plug any type of implementation
> which can extract the location . As default we can use MAXMIND database.
>
> Thanks
> Tharindu
>
> On Sun, Feb 21, 2016 at 10:53 PM, Mohanadarshan Vivekanandalingam <
> mo...@wso2.com> wrote:
>
>> AFAIR, there is an external third party API used to find the location of
>> IP address in fraud detection tool-kit.. But I think, it has many
>> restrictions..
>>
>> I agree with Jo where some customers might want to use paid services for
>> that, we need to implement the feature in such a way.. Yes, going with a
>> free database by default would be good or can't we host a service in our
>> end and use it in the pack ?
>>
>> Thanks,
>> Mohan
>>
>>
>> On Sun, Feb 21, 2016 at 10:34 PM, Joseph Fonseka <jos...@wso2.com> wrote:
>>
>>> Hi Tharindu
>>>
>>> They both use the same source of data from MaxMind. And the database is
>>> licensed under "CC Attribution-ShareAlike" thus we should attribute them if
>>> we are using it. see [1]
>>>
>>> On an on premise deployment customers might want to use a paid service
>>> to get the location so I think we should support that. And to ship with the
>>> product like suggested we can use a free database.
>>>
>>> Also when will the location be resolved ? will it be a background task
>>> or are you planing to do it real-time ?
>>>
>>> Regards
>>> Jo
>>>
>>>
>>>
>>> [1] http://dev.maxmind.com/geoip/geoip2/geolite2/
>>>
>>> On Sun, Feb 21, 2016 at 8:27 PM, Tharindu Dharmarathna <
>>> tharin...@wso2.com> wrote:
>>>
>>>> HI Nuwan,
>>>>
>>>> There are two lightweight databases we can use as I found from [1] and
>>>> [2] and those are open source projects.
>>>>
>>>> [1] - https://freegeoip.net/
>>>> [2] -
>>>> http://gis.stackexchange.com/questions/88/how-can-i-determine-the-location-of-a-visitor-to-my-website
>>>>
>>>> Thanks
>>>> Tharindu
>>>>
>>>> On Sun, Feb 21, 2016 at 8:23 PM, Nirmal Fernando <nir...@wso2.com>
>>>> wrote:
>>>>
>>>>> @Seshika any thoughts?
>>>>>
>>>>> On Sun, Feb 21, 2016 at 8:19 PM, Nuwan Dias <nuw...@wso2.com> wrote:
>>>>>
>>>>>> I have doubts on using an HTTP API to get these details because,
>>>>>>
>>>>>> 1. It will be costly in terms of performance to call these APIs (and
>>>>>> they might not be free as well).
>>>>>> 2. We have no control nor guarantee on their availability (they can
>>>>>> shutdown whenever they want).
>>>>>> 3. They will only work if the stats visualizing agent
>>>>>> (store/publisher) or DAS has access to internet.
>>>>>>
>>>>>> Can we look for a light-weight open-source database which has region
>>>>>> information based on IP ranges?
>>>>>>
>>>>>> Thanks,
>>>>>> NuwanD.
>>>>>>
>>>>>> On Sun, Feb 21, 2016 at 10:29 AM, Tharindu Dharmarathna <
>>>>>> tharin...@wso2.com> wrote:
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> We are going to implement $Subject

Re: [Dev] Implementing Geographical based Analytics in API Manager

2016-02-21 Thread Joseph Fonseka
Hi Tharindu

They both use the same source of data from MaxMind. And the database is
licensed under "CC Attribution-ShareAlike" thus we should attribute them if
we are using it. see [1]

On an on premise deployment customers might want to use a paid service to
get the location so I think we should support that. And to ship with the
product like suggested we can use a free database.

Also when will the location be resolved ? will it be a background task or
are you planing to do it real-time ?

Regards
Jo



[1] http://dev.maxmind.com/geoip/geoip2/geolite2/

On Sun, Feb 21, 2016 at 8:27 PM, Tharindu Dharmarathna <tharin...@wso2.com>
wrote:

> HI Nuwan,
>
> There are two lightweight databases we can use as I found from [1] and [2]
> and those are open source projects.
>
> [1] - https://freegeoip.net/
> [2] -
> http://gis.stackexchange.com/questions/88/how-can-i-determine-the-location-of-a-visitor-to-my-website
>
> Thanks
> Tharindu
>
> On Sun, Feb 21, 2016 at 8:23 PM, Nirmal Fernando <nir...@wso2.com> wrote:
>
>> @Seshika any thoughts?
>>
>> On Sun, Feb 21, 2016 at 8:19 PM, Nuwan Dias <nuw...@wso2.com> wrote:
>>
>>> I have doubts on using an HTTP API to get these details because,
>>>
>>> 1. It will be costly in terms of performance to call these APIs (and
>>> they might not be free as well).
>>> 2. We have no control nor guarantee on their availability (they can
>>> shutdown whenever they want).
>>> 3. They will only work if the stats visualizing agent (store/publisher)
>>> or DAS has access to internet.
>>>
>>> Can we look for a light-weight open-source database which has region
>>> information based on IP ranges?
>>>
>>> Thanks,
>>> NuwanD.
>>>
>>> On Sun, Feb 21, 2016 at 10:29 AM, Tharindu Dharmarathna <
>>> tharin...@wso2.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> We are going to implement $Subject on latest release . I want to know
>>>> is there any best way to extract Geographical location from IP . And here
>>>> are my findings of the ways of do.
>>>>
>>>> [1] - http://www.geoplugin.com
>>>> Thi will retrive all the data according to the location as json
>>>>
>>>> [2] - http://www.telize.com/
>>>>
>>>> This is another REST API which can used to extract location.
>>>>
>>>> *Thanks*
>>>> *Tharindu Dharmarathna*
>>>> Associate Software Engineer
>>>> WSO2 Inc.; http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> mobile: *+94779109091 <%2B94779109091>*
>>>>
>>>
>>>
>>>
>>> --
>>> Nuwan Dias
>>>
>>> Technical Lead - WSO2, Inc. http://wso2.com
>>> email : nuw...@wso2.com
>>> Phone : +94 777 775 729
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> Thanks & regards,
>> Nirmal
>>
>> Team Lead - WSO2 Machine Learner
>> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
>> Mobile: +94715779733
>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>
>
>
> --
>
> *Tharindu Dharmarathna*Associate Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94779109091 <%2B94779109091>*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM]Generating client side sdk for subscribed APIs

2016-02-03 Thread Joseph Fonseka
Hi Randika

Swagger codegen also can be hosted as a service (API) you can find the war
file under "swagger-generator" module. You can ship the war file with APIM
or host a a public service to generate code.

Regards
Jo

On Wed, Feb 3, 2016 at 6:25 PM, Randika Navagamuwa <randi...@wso2.com>
wrote:

> Hi all,
>  I'm currently developing a feature for APIM which generates client side
> sdks for subscribed APIs. To generate the client side SDK I'm using swagger
> codegen[1]. To get the required sdk i had to do some minor changes to
> swagger codegen. There are two approaches to use the swagger codegen
>
>1. We can simply build the swagger codegen and use that jar file to
>generate sdks and this is the easiest way.
>2. The other way is we can add swagger codegen maven modules into APIM
>source code and directly call methods.
>
> As you may all know swagger is a developing project and they use their own
> dependencies. If we create a single jar using current swagger codegen
> version there will be no issue. So what would be the best approach?
>
> [1]https://github.com/swagger-api/swagger-codegen
>
> Thanks,
> Randika
> --
> *Randika Navagamuwa*
> *Intern - Software Engineering*
> *Mobile : +94711853466 <%2B94711853466>*
> *Twitter : twitter.com/rnavagamuwa <http://twitter.com/rnavagamuwa>*
> *Facebook : facebook.com/rnavagamuwa <http://facebook.com/rnavagamuwa>*
> *Linkedin : lk.linkedin.com/in/rnavagamuwa
> <http://lk.linkedin.com/in/rnavagamuwa>*
> *Blog : **randikan.wordpress.com* <http://randikan.wordpress.com>
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM]Generating client side sdk for subscribed APIs

2016-02-03 Thread Joseph Fonseka
Hi Randika

Yes you would have to host a war with a custom codegen module. To clarify
did you add the customization as a module like in [1]. Is the code public
to have a look.

Regards
Jo

[1]
https://github.com/swagger-api/swagger-codegen#making-your-own-codegen-modules

On Thu, Feb 4, 2016 at 9:43 AM, Randika Navagamuwa <randi...@wso2.com>
wrote:

> Hi,
>  I didn't know about that. Current "swagger-generator" uses their
> resources to generate the client sdk. Since we are using a customized
> version of "swagger-codegen", we'll have to use that instead of their
> resources. So if we are hosting swagger codegen as a service we'll have to
> expose "customized swagger-codegen" source code as well right?
>
> Thanks,
> Randika
>
> On Thu, Feb 4, 2016 at 8:55 AM, Joseph Fonseka <jos...@wso2.com> wrote:
>
>> Hi Randika
>>
>> Swagger codegen also can be hosted as a service (API) you can find the
>> war file under "swagger-generator" module. You can ship the war file with
>> APIM or host a a public service to generate code.
>>
>> Regards
>> Jo
>>
>> On Wed, Feb 3, 2016 at 6:25 PM, Randika Navagamuwa <randi...@wso2.com>
>> wrote:
>>
>>> Hi all,
>>>  I'm currently developing a feature for APIM which generates client side
>>> sdks for subscribed APIs. To generate the client side SDK I'm using swagger
>>> codegen[1]. To get the required sdk i had to do some minor changes to
>>> swagger codegen. There are two approaches to use the swagger codegen
>>>
>>>1. We can simply build the swagger codegen and use that jar file to
>>>generate sdks and this is the easiest way.
>>>2. The other way is we can add swagger codegen maven modules into
>>>APIM source code and directly call methods.
>>>
>>> As you may all know swagger is a developing project and they use their
>>> own dependencies. If we create a single jar using current swagger codegen
>>> version there will be no issue. So what would be the best approach?
>>>
>>> [1]https://github.com/swagger-api/swagger-codegen
>>>
>>> Thanks,
>>> Randika
>>> --
>>> *Randika Navagamuwa*
>>> *Intern - Software Engineering*
>>> *Mobile : +94711853466 <%2B94711853466>*
>>> *Twitter : twitter.com/rnavagamuwa <http://twitter.com/rnavagamuwa>*
>>> *Facebook : facebook.com/rnavagamuwa <http://facebook.com/rnavagamuwa>*
>>> *Linkedin : lk.linkedin.com/in/rnavagamuwa
>>> <http://lk.linkedin.com/in/rnavagamuwa>*
>>> *Blog : **randikan.wordpress.com* <http://randikan.wordpress.com>
>>>
>>
>>
>>
>> --
>>
>> --
>> *Joseph Fonseka*
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 772 512 430
>> skype: jpfonseka
>>
>> * <http://lk.linkedin.com/in/rumeshbandara>*
>>
>>
>
>
> --
> *Randika Navagamuwa*
> *Intern - Software Engineering*
> *Mobile : +94711853466 <%2B94711853466>*
> *Twitter : twitter.com/rnavagamuwa <http://twitter.com/rnavagamuwa>*
> *Facebook : facebook.com/rnavagamuwa <http://facebook.com/rnavagamuwa>*
> *Linkedin : lk.linkedin.com/in/rnavagamuwa
> <http://lk.linkedin.com/in/rnavagamuwa>*
> *Blog : **randikan.wordpress.com* <http://randikan.wordpress.com>
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Upgrading Swagger UI and Swagger Editor in APIM

2016-01-18 Thread Joseph Fonseka
Can we check the commit logs to identify the changes ?

On Mon, Jan 18, 2016 at 2:32 PM, Bhathiya Jayasekara <bhath...@wso2.com>
wrote:

> Existing Swagger-ui.js has this in the very beginning. So I used v2.1.1
>
> /**
>  * swagger-ui - Swagger UI is a dependency-free collection of HTML,
> JavaScript, and CSS assets that dynamically generate beautiful
> documentation from a Swagger-compliant API
>  * @version v2.1.1
>  * @link http://swagger.io
>  * @license Apache-2.0
>  */
>
> On Mon, Jan 18, 2016 at 2:29 PM, Joseph Fonseka <jos...@wso2.com> wrote:
>
>> Their cannot be this much of a diff did you compare it with the correct
>> version ? may be you can compare with a older revision in repo.
>>
>> On Mon, Jan 18, 2016 at 2:23 PM, Bhathiya Jayasekara <bhath...@wso2.com>
>> wrote:
>>
>>> Hi Jo,
>>>
>>> This is the customization diff we currently have in swagger-ui. I'm in
>>> the process of merging these fixes with new version.
>>>
>>> Thanks,
>>> Bhathiya
>>>
>>> On Thu, Jan 14, 2016 at 3:02 PM, Bhathiya Jayasekara <bhath...@wso2.com>
>>> wrote:
>>>
>>>> Thanks. Will do.
>>>>
>>>> On Thu, Jan 14, 2016 at 3:02 PM, Joseph Fonseka <jos...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi Bhathiya
>>>>>
>>>>> We have some customizations so you need to merge them to the new
>>>>> libraries before updating.
>>>>>
>>>>> Thanks
>>>>> Jo
>>>>>
>>>>> On Thu, Jan 14, 2016 at 2:53 PM, Bhathiya Jayasekara <
>>>>> bhath...@wso2.com> wrote:
>>>>>
>>>>>> Hi Jo,
>>>>>>
>>>>>> I'm trying to do $subject. I had a look at store code, and as I
>>>>>> understood I have to do following.
>>>>>>
>>>>>> 1) Replace *swagger-ui.min.js* and *swagger-ui.js* in store with new
>>>>>> version.
>>>>>> 2) Replace *swagger-editor *in publisher with new version.
>>>>>>
>>>>>> Are there anything else I have to do?
>>>>>>
>>>>>> And can we simply replace above? Or do we have any customizations?
>>>>>>
>>>>>> Thanks,
>>>>>> Bhathiya
>>>>>>
>>>>>> --
>>>>>> *Bhathiya Jayasekara*
>>>>>> *Senior Software Engineer,*
>>>>>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>>>>>
>>>>>> *Phone: +94715478185 <%2B94715478185>*
>>>>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>>>>>> <http://www.linkedin.com/in/bhathiyaj>*
>>>>>> *Twitter: https://twitter.com/bhathiyax
>>>>>> <https://twitter.com/bhathiyax>*
>>>>>> *Blog: http://movingaheadblog.blogspot.com
>>>>>> <http://movingaheadblog.blogspot.com/>*
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> --
>>>>> *Joseph Fonseka*
>>>>> WSO2 Inc.; http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> mobile: +94 772 512 430
>>>>> skype: jpfonseka
>>>>>
>>>>> * <http://lk.linkedin.com/in/rumeshbandara>*
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Bhathiya Jayasekara*
>>>> *Senior Software Engineer,*
>>>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>>>
>>>> *Phone: +94715478185 <%2B94715478185>*
>>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>>>> <http://www.linkedin.com/in/bhathiyaj>*
>>>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
>>>> *Blog: http://movingaheadblog.blogspot.com
>>>> <http://movingaheadblog.blogspot.com/>*
>>>>
>>>
>>>
>>>
>>> --
>>> *Bhathiya Jayasekara*
>>> *Senior Software Engineer,*
>>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>>
>>> *Phone: +94715478185 <%2B94715478185>*
>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>>> <http://www.linkedin.com/in/bhathiyaj>*
>>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
>>> *Blog: http://movingaheadblog.blogspot.com
>>> <http://movingaheadblog.blogspot.com/>*
>>>
>>
>>
>>
>> --
>>
>> --
>> *Joseph Fonseka*
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 772 512 430
>> skype: jpfonseka
>>
>> * <http://lk.linkedin.com/in/rumeshbandara>*
>>
>>
>
>
> --
> *Bhathiya Jayasekara*
> *Senior Software Engineer,*
> *WSO2 inc., http://wso2.com <http://wso2.com>*
>
> *Phone: +94715478185 <%2B94715478185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> <http://www.linkedin.com/in/bhathiyaj>*
> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
> *Blog: http://movingaheadblog.blogspot.com
> <http://movingaheadblog.blogspot.com/>*
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Upgrading Swagger UI and Swagger Editor in APIM

2016-01-18 Thread Joseph Fonseka
Their cannot be this much of a diff did you compare it with the correct
version ? may be you can compare with a older revision in repo.

On Mon, Jan 18, 2016 at 2:23 PM, Bhathiya Jayasekara <bhath...@wso2.com>
wrote:

> Hi Jo,
>
> This is the customization diff we currently have in swagger-ui. I'm in the
> process of merging these fixes with new version.
>
> Thanks,
> Bhathiya
>
> On Thu, Jan 14, 2016 at 3:02 PM, Bhathiya Jayasekara <bhath...@wso2.com>
> wrote:
>
>> Thanks. Will do.
>>
>> On Thu, Jan 14, 2016 at 3:02 PM, Joseph Fonseka <jos...@wso2.com> wrote:
>>
>>> Hi Bhathiya
>>>
>>> We have some customizations so you need to merge them to the new
>>> libraries before updating.
>>>
>>> Thanks
>>> Jo
>>>
>>> On Thu, Jan 14, 2016 at 2:53 PM, Bhathiya Jayasekara <bhath...@wso2.com>
>>> wrote:
>>>
>>>> Hi Jo,
>>>>
>>>> I'm trying to do $subject. I had a look at store code, and as I
>>>> understood I have to do following.
>>>>
>>>> 1) Replace *swagger-ui.min.js* and *swagger-ui.js* in store with new
>>>> version.
>>>> 2) Replace *swagger-editor *in publisher with new version.
>>>>
>>>> Are there anything else I have to do?
>>>>
>>>> And can we simply replace above? Or do we have any customizations?
>>>>
>>>> Thanks,
>>>> Bhathiya
>>>>
>>>> --
>>>> *Bhathiya Jayasekara*
>>>> *Senior Software Engineer,*
>>>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>>>
>>>> *Phone: +94715478185 <%2B94715478185>*
>>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>>>> <http://www.linkedin.com/in/bhathiyaj>*
>>>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
>>>> *Blog: http://movingaheadblog.blogspot.com
>>>> <http://movingaheadblog.blogspot.com/>*
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> --
>>> *Joseph Fonseka*
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: +94 772 512 430
>>> skype: jpfonseka
>>>
>>> * <http://lk.linkedin.com/in/rumeshbandara>*
>>>
>>>
>>
>>
>> --
>> *Bhathiya Jayasekara*
>> *Senior Software Engineer,*
>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>
>> *Phone: +94715478185 <%2B94715478185>*
>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>> <http://www.linkedin.com/in/bhathiyaj>*
>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
>> *Blog: http://movingaheadblog.blogspot.com
>> <http://movingaheadblog.blogspot.com/>*
>>
>
>
>
> --
> *Bhathiya Jayasekara*
> *Senior Software Engineer,*
> *WSO2 inc., http://wso2.com <http://wso2.com>*
>
> *Phone: +94715478185 <%2B94715478185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> <http://www.linkedin.com/in/bhathiyaj>*
> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
> *Blog: http://movingaheadblog.blogspot.com
> <http://movingaheadblog.blogspot.com/>*
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] APIM snapse file system migration

2016-01-13 Thread Joseph Fonseka
;>
>>>>>>> On Wed, Jan 13, 2016 at 3:30 PM, Lakmali Baminiwatta <
>>>>>>> lakm...@wso2.com> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> In our migration guide, currently what we instruct is to copy &
>>>>>>>> replace repository/deployment/server/synapse-config/default directory 
>>>>>>>> and
>>>>>>>> repository/tenants from previous APIM version to new APIM version. 
>>>>>>>> Here we
>>>>>>>> mention to skip replacing  _TokenAPI_.xml, _RevokeAPI_.xml and
>>>>>>>> _AuthorizeAPI_.xml files by which latest files of those will be 
>>>>>>>> remained.
>>>>>>>>
>>>>>>>> But with this approach, it will replace other system sequences with
>>>>>>>> old ones (ex: _auth_failure_handler_.xml, _cors_request_handler_.xml,
>>>>>>>> main.xml, fault.xml, etc). So some of the fixes went to those will be
>>>>>>>> missed out. We have two ways to include those changes to the new 
>>>>>>>> version.
>>>>>>>>
>>>>>>>> 1. Include the missing changes through migration client.
>>>>>>>> 2. Get the latest sequences from the new version pack and replace
>>>>>>>> corresponded sequences of each tenant through migration client.
>>>>>>>>
>>>>>>>> Some of the changes done to these sequences are minor changes like
>>>>>>>> adding a drop mediator after send, changing a regex value, removing a
>>>>>>>> property etc. Since some of the users may have already done own
>>>>>>>> customizations to these sequences, trying to add changes to existing 
>>>>>>>> ones
>>>>>>>> may lead to complications.
>>>>>>>> So I think it would be better to ask the users to add their changes
>>>>>>>> (if there are any) to default sequences in the
>>>>>>>> pack(repository/resources/apim-synapse-config) prior running the 
>>>>>>>> migration
>>>>>>>> client and then through the client we can replace existing ones. WDYT?
>>>>>>>>
>>>>>>>
>>>>>>> This part is tricky. Since we do not know the amount nor nature of
>>>>>>> customisations they may have done, can we guarantee the migration client
>>>>>>> will do its job properly since it doesn't know the content/state of the
>>>>>>> file before it starts to execute on it?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Lakmali
>>>>>>>>
>>>>>>>> --
>>>>>>>> Lakmali Baminiwatta
>>>>>>>> Senior Software Engineer
>>>>>>>> WSO2, Inc.: http://wso2.com
>>>>>>>> lean.enterprise.middleware
>>>>>>>> mobile:  +94 71 2335936
>>>>>>>> blog : lakmali.com
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Nuwan Dias
>>>>>>>
>>>>>>> Technical Lead - WSO2, Inc. http://wso2.com
>>>>>>> email : nuw...@wso2.com
>>>>>>> Phone : +94 777 775 729
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Uvindra
>>>>>>
>>>>>> Mobile: 33962
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Nuwan Dias
>>>>>
>>>>> Technical Lead - WSO2, Inc. http://wso2.com
>>>>> email : nuw...@wso2.com
>>>>> Phone : +94 777 775 729
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Lakmali Baminiwatta
>>>> Senior Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean.enterprise.middleware
>>>> mobile:  +94 71 2335936
>>>> blog : lakmali.com
>>>>
>>>>
>>>
>>>
>>> --
>>> Lakmali Baminiwatta
>>> Senior Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean.enterprise.middleware
>>> mobile:  +94 71 2335936
>>> blog : lakmali.com
>>>
>>>
>>
>>
>> --
>> Lakmali Baminiwatta
>> Senior Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean.enterprise.middleware
>> mobile:  +94 71 2335936
>> blog : lakmali.com
>>
>>
>
>
> --
> Regards,
> Uvindra
>
> Mobile: 33962
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] APIM REST API with Subscription Creation Workflows

2015-11-26 Thread Joseph Fonseka
t;: "Silver",
>>>"applicationId": "69041195-1e81-48f5-8892-2ab053b0501c",
>>>*"status": "ON_HOLD"*
>>> }
>>>
>>>
>>> Here we can see that the status is ON_HOLD. In this case we can also see
>>> some more information that are coming from APIM underline implementation,
>>> which are follows:
>>>
>>>- redirectUrl : "http://google.lk;
>>>- displayUrl : "http://wso2.com;
>>>- workflowRefId : "0b94b11a-2736-48a0-b43e-c7cc35d8516d"
>>>- CallbackUrl : http://google.lk
>>>
>>>
>>> Do we need to include this info in the response object? If so what would
>>> be the best approach?
>>>
>>
>> What if we add this info to the response payload under a section called
>> something like "workflowInformation" ?
>>
>>>
>>> Few ways that are possible include:
>>>
>>>- Add those additional information into the response object
>>>- Add this redirect URL as HTTP 302 redirection as the Location
>>>header
>>>
>>> Please share your thoughts.
>>>
>>> Thank you,
>>> Malintha
>>>
>>> --
>>> Malintha Amarasinghe
>>> Software Engineer
>>> *WSO2, Inc. - lean | enterprise | middleware*
>>> http://wso2.com/
>>>
>>> Mobile : +94 712383306
>>>
>>
>>
>>
>> --
>> Nuwan Dias
>>
>> Technical Lead - WSO2, Inc. http://wso2.com
>> email : nuw...@wso2.com
>> Phone : +94 777 775 729
>>
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM][SWAGGER] Need a sample swagger file which has an JSON schema for the response payload.

2015-11-02 Thread Joseph Fonseka
See the examples in swagger editor [1]

Go to File > Open Example > select petstore sample. You can find the
responce models under definition in the YAML file. You can define the
response schema with json schema [2]

Cheers
Jo


[1] http://editor.swagger.io/#/
[2] http://json-schema.org/

On Mon, Nov 2, 2015 at 10:24 PM, Rushmin Fernando <rush...@wso2.com> wrote:

>
> Hi Devs.
>
> $subject please. Is there a special syntax to define the schema or does
> Swagger converts a sample payload to a schema ?
>
> Thanks
> Rushmin
> --
> *Rushmin Fernando*
> *Technical Lead*
>
> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware
>
> email : rush...@wso2.com
> mobile : +94772310855
>
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] Implement unit/integration test cases for API Manager JAX-RS Rest API

2015-10-19 Thread Joseph Fonseka
Sorry mail got sent accidentally half written. will complete and send
shortly.

On Mon, Oct 19, 2015 at 12:15 PM, Joseph Fonseka <jos...@wso2.com> wrote:

> Hi Sanjeewa
>
> Saneth & I had an offline chat regarding this last week there are few
> things we need to consider.
>
> 1. Generating integration test for the Jax-RS functionality ex . If crud
> operations work, if it returns correct error messages.
>  -  We can use swagger-codegen to do this.
>  API Definition has all the details of the API interface what missing are
>
> 2. How to get the existing integration test to utilize the new API.
>  - We already have a lot of integration tests which uses existing
> store & publisher APIs to add/remove resources. As Saneth mention they have
> written it in a layered architecture this replacing the existing API layer
> with Jax-rs existing test should work.
>
>
> 3. How to make it easy to write test in the future with Jax-Rs API.
>
>
>
>
> On Mon, Oct 19, 2015 at 11:39 AM, Sanjeewa Malalgoda <sanje...@wso2.com>
> wrote:
>
>> Hi Team,
>> We are planning to implement complete REST API for all operations
>> available in API Manager.
>> This will be CXF based jax-rs application.
>> This application based on swagger template and service skeleton
>> automatically generate according to swagger to cxf implementation done by
>> Jo.
>> We would like to know what would be the best approach to implement test
>> for this service.
>> Do we have any mechanism to generate client and test service in unit test
>> level ? I can see there are projects to generate java client based on
>> swagger content.
>> Or do we need to write integration test to run this application in server
>> and perform tests?
>> Since this implementation changes rapidly it would be ideal if we can
>> have skeleton based testing approach without binding to real
>> implementation(like auto generated client).
>>
>> Have we done something similar?
>> What would be the best approach?
>>
>> Thanks,
>> sanjeewa.
>>
>> --
>>
>> *Sanjeewa Malalgoda*
>> WSO2 Inc.
>> Mobile : +94713068779
>>
>> <http://sanjeewamalalgoda.blogspot.com/>blog
>> :http://sanjeewamalalgoda.blogspot.com/
>> <http://sanjeewamalalgoda.blogspot.com/>
>>
>>
>>
>> ___________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> --
> *Joseph Fonseka*
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 772 512 430
> skype: jpfonseka
>
> * <http://lk.linkedin.com/in/rumeshbandara>*
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] Implement unit/integration test cases for API Manager JAX-RS Rest API

2015-10-19 Thread Joseph Fonseka
Hi Sanjeewa

Saneth & I had an offline chat regarding this last week there are few
things we need to consider.

1. Generating integration test for the Jax-RS functionality ex . If crud
operations work, if it returns correct error messages.
 -  We can use swagger-codegen to do this.
 API Definition has all the details of the API interface what missing are

2. How to get the existing integration test to utilize the new API.
 - We already have a lot of integration tests which uses existing
store & publisher APIs to add/remove resources. As Saneth mention they have
written it in a layered architecture this replacing the existing API layer
with Jax-rs existing test should work.


3. How to make it easy to write test in the future with Jax-Rs API.




On Mon, Oct 19, 2015 at 11:39 AM, Sanjeewa Malalgoda <sanje...@wso2.com>
wrote:

> Hi Team,
> We are planning to implement complete REST API for all operations
> available in API Manager.
> This will be CXF based jax-rs application.
> This application based on swagger template and service skeleton
> automatically generate according to swagger to cxf implementation done by
> Jo.
> We would like to know what would be the best approach to implement test
> for this service.
> Do we have any mechanism to generate client and test service in unit test
> level ? I can see there are projects to generate java client based on
> swagger content.
> Or do we need to write integration test to run this application in server
> and perform tests?
> Since this implementation changes rapidly it would be ideal if we can have
> skeleton based testing approach without binding to real implementation(like
> auto generated client).
>
> Have we done something similar?
> What would be the best approach?
>
> Thanks,
> sanjeewa.
>
> --
>
> *Sanjeewa Malalgoda*
> WSO2 Inc.
> Mobile : +94713068779
>
> <http://sanjeewamalalgoda.blogspot.com/>blog
> :http://sanjeewamalalgoda.blogspot.com/
> <http://sanjeewamalalgoda.blogspot.com/>
>
>
>
> _______
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] Implement unit/integration test cases for API Manager JAX-RS Rest API

2015-10-19 Thread Joseph Fonseka
Hi Sanjeewa

Saneth & I had an offline chat regarding this last week there are few
things we need to consider.

1. Generating integration test for the Jax-RS functionality ex . If crud
operations work, if it returns correct error messages.
 -  We can use swagger-codegen to do this.
 -  API Definition has all the details of the API interface what
missing are the data fixtures.
 - There are few options with the fixtures which we can auto
generate since the schema of the model is there or we can use a predefined
set of json files.

2. How to get the existing integration test to utilize the new API.
 - We already have a lot of integration tests which uses existing
store & publisher APIs to add/remove resources. As Saneth mention they have
written it in a layered architecture this replacing the existing API layer
with Jax-rs existing test should work.
 - We might have to look at this in the next phase when we plan to
deprecate the existing APIs.

3. How to make it easy to write test in the future with Jax-Rs API.
 - Ex Creating a Jax-rs client/library to utilize by other
integration test.

Thanks & Regards
Jo

On Mon, Oct 19, 2015 at 12:17 PM, Joseph Fonseka <jos...@wso2.com> wrote:

> Sorry mail got sent accidentally half written. will complete and send
> shortly.
>
> On Mon, Oct 19, 2015 at 12:15 PM, Joseph Fonseka <jos...@wso2.com> wrote:
>
>> Hi Sanjeewa
>>
>> Saneth & I had an offline chat regarding this last week there are few
>> things we need to consider.
>>
>> 1. Generating integration test for the Jax-RS functionality ex . If crud
>> operations work, if it returns correct error messages.
>>  -  We can use swagger-codegen to do this.
>>  API Definition has all the details of the API interface what missing are
>>
>> 2. How to get the existing integration test to utilize the new API.
>>  - We already have a lot of integration tests which uses existing
>> store & publisher APIs to add/remove resources. As Saneth mention they have
>> written it in a layered architecture this replacing the existing API layer
>> with Jax-rs existing test should work.
>>
>>
>> 3. How to make it easy to write test in the future with Jax-Rs API.
>>
>>
>>
>>
>> On Mon, Oct 19, 2015 at 11:39 AM, Sanjeewa Malalgoda <sanje...@wso2.com>
>> wrote:
>>
>>> Hi Team,
>>> We are planning to implement complete REST API for all operations
>>> available in API Manager.
>>> This will be CXF based jax-rs application.
>>> This application based on swagger template and service skeleton
>>> automatically generate according to swagger to cxf implementation done by
>>> Jo.
>>> We would like to know what would be the best approach to implement test
>>> for this service.
>>> Do we have any mechanism to generate client and test service in unit
>>> test level ? I can see there are projects to generate java client based on
>>> swagger content.
>>> Or do we need to write integration test to run this application in
>>> server and perform tests?
>>> Since this implementation changes rapidly it would be ideal if we can
>>> have skeleton based testing approach without binding to real
>>> implementation(like auto generated client).
>>>
>>> Have we done something similar?
>>> What would be the best approach?
>>>
>>> Thanks,
>>> sanjeewa.
>>>
>>> --
>>>
>>> *Sanjeewa Malalgoda*
>>> WSO2 Inc.
>>> Mobile : +94713068779
>>>
>>> <http://sanjeewamalalgoda.blogspot.com/>blog
>>> :http://sanjeewamalalgoda.blogspot.com/
>>> <http://sanjeewamalalgoda.blogspot.com/>
>>>
>>>
>>>
>>> _______
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> --
>> *Joseph Fonseka*
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 772 512 430
>> skype: jpfonseka
>>
>> * <http://lk.linkedin.com/in/rumeshbandara>*
>>
>>
>
>
> --
>
> --
> *Joseph Fonseka*
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 772 512 430
> skype: jpfonseka
>
> * <http://lk.linkedin.com/in/rumeshbandara>*
>
>


-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] Implement unit/integration test cases for API Manager JAX-RS Rest API

2015-10-19 Thread Joseph Fonseka
Hi Nuwan

Thanks for pointing that out, in that case test can be version-ed so auto
generated tests for version 1.0.0 should work with API 1.0.1 ...

WDYT?

Regards
Jo

On Mon, Oct 19, 2015 at 12:29 PM, Nuwan Dias <nuw...@wso2.com> wrote:

> Is it right to auto-generate the test client code? IMO one objective of
> this should be to make sure the REST APIs don't change across patch
> releases, etc. If we auto-generate the test stubs we would loose that
> advantage.
>
> Thanks,
> NuwanD.
>
> On Mon, Oct 19, 2015 at 12:26 PM, Joseph Fonseka <jos...@wso2.com> wrote:
>
>> Hi Sanjeewa
>>
>> Saneth & I had an offline chat regarding this last week there are few
>> things we need to consider.
>>
>> 1. Generating integration test for the Jax-RS functionality ex . If crud
>> operations work, if it returns correct error messages.
>>  -  We can use swagger-codegen to do this.
>>  -  API Definition has all the details of the API interface what
>> missing are the data fixtures.
>>  - There are few options with the fixtures which we can auto
>> generate since the schema of the model is there or we can use a predefined
>> set of json files.
>>
>> 2. How to get the existing integration test to utilize the new API.
>>  - We already have a lot of integration tests which uses existing
>> store & publisher APIs to add/remove resources. As Saneth mention they have
>> written it in a layered architecture this replacing the existing API layer
>> with Jax-rs existing test should work.
>>  - We might have to look at this in the next phase when we plan
>> to deprecate the existing APIs.
>>
>> 3. How to make it easy to write test in the future with Jax-Rs API.
>>  - Ex Creating a Jax-rs client/library to utilize by other
>> integration test.
>>
>> Thanks & Regards
>> Jo
>>
>> On Mon, Oct 19, 2015 at 12:17 PM, Joseph Fonseka <jos...@wso2.com> wrote:
>>
>>> Sorry mail got sent accidentally half written. will complete and send
>>> shortly.
>>>
>>> On Mon, Oct 19, 2015 at 12:15 PM, Joseph Fonseka <jos...@wso2.com>
>>> wrote:
>>>
>>>> Hi Sanjeewa
>>>>
>>>> Saneth & I had an offline chat regarding this last week there are few
>>>> things we need to consider.
>>>>
>>>> 1. Generating integration test for the Jax-RS functionality ex . If
>>>> crud operations work, if it returns correct error messages.
>>>>  -  We can use swagger-codegen to do this.
>>>>  API Definition has all the details of the API interface what missing
>>>> are
>>>>
>>>> 2. How to get the existing integration test to utilize the new API.
>>>>  - We already have a lot of integration tests which uses
>>>> existing store & publisher APIs to add/remove resources. As Saneth mention
>>>> they have written it in a layered architecture this replacing the existing
>>>> API layer with Jax-rs existing test should work.
>>>>
>>>>
>>>> 3. How to make it easy to write test in the future with Jax-Rs API.
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, Oct 19, 2015 at 11:39 AM, Sanjeewa Malalgoda <sanje...@wso2.com
>>>> > wrote:
>>>>
>>>>> Hi Team,
>>>>> We are planning to implement complete REST API for all operations
>>>>> available in API Manager.
>>>>> This will be CXF based jax-rs application.
>>>>> This application based on swagger template and service skeleton
>>>>> automatically generate according to swagger to cxf implementation done by
>>>>> Jo.
>>>>> We would like to know what would be the best approach to implement
>>>>> test for this service.
>>>>> Do we have any mechanism to generate client and test service in unit
>>>>> test level ? I can see there are projects to generate java client based on
>>>>> swagger content.
>>>>> Or do we need to write integration test to run this application in
>>>>> server and perform tests?
>>>>> Since this implementation changes rapidly it would be ideal if we can
>>>>> have skeleton based testing approach without binding to real
>>>>> implementation(like auto generated client).
>>>>>
>>>>> Have we done something similar?
>>>>> What would be the best approach?
>>>>

Re: [Dev] UpdateScopes method deletes all Scopes of an API when API is updated

2015-09-17 Thread Joseph Fonseka
Hi Harshan

How do you add/update APIs do you use are jaggery APIs or do you invoke
OSGi services. If you are using jaggery APIs can you send the request
payload.



Thanks
Jo



On Fri, Sep 18, 2015 at 9:35 AM, Prabath Abeysekera <praba...@wso2.com>
wrote:

>
> On Fri, Sep 18, 2015 at 9:25 AM, Nuwan Dias <nuw...@wso2.com> wrote:
>
>> Adding Jo
>>
>> On Thu, Sep 17, 2015 at 5:27 PM, Harshan Liyanage <hars...@wso2.com>
>> wrote:
>>
>>> Hi,
>>>
>>> We have a requirement to automatically publish APIs when the EMM server
>>> starts-up. We need to also add the scopes to APIs when its get published.
>>> For that we are calling addAPI method if its a new API or updateAPI method
>>> if that API already exists (in APIProvider implementation).
>>>
>>> This is working fine in the first server start-up. But when I restart
>>> the EMM server all the added scopes to an API is lost from related database
>>> tables. After analyzing the issue I've found out that the updateScopes
>>> method in [1] deletes all existing scopes of an API and then adding the
>>> updated scopes to the API using URI templates (api.getUriTemplates()). But
>>> in addAPI method, it uses api.getScopes() to add the scope data to the
>>> database. If I change the line
>>> "addScopes(api.getUriTemplates(),apiId,tenantId);" to
>>> "addScopes(api.getScopes(),apiId,tenantId);" this functionality works fine.
>>> So is there a specific reason to populate scopes of a updated API using
>>> api.getUriTemplates()?
>>>
>>
> Well, IMO, if there's some change introduced to the "resources" as part of
> the "update" event, then it might make sense to remove scopes, etc just to
> make sure that the changes introduced wouldn't make it possible for people
> who are not intended to have access to those, get access to them. If not,
> this looks like a bug.
>
>
>>
>>> public void updateScopes(API api, int tenantId) throws
>>> APIManagementException {
>>>
>>> Connection connection = null;
>>> PreparedStatement prepStmt = null;
>>> int apiId = -1;
>>> String deleteScopes = "DELETE FROM IDN_OAUTH2_SCOPE WHERE SCOPE_ID IN (
>>> SELECT SCOPE_ID FROM AM_API_SCOPES WHERE API_ID = ? )";
>>> try {
>>>
>>> connection = APIMgtDBUtil.getConnection();
>>>
>>> connection.setAutoCommit(false);
>>>
>>> apiId = getAPIID(api.getId(),connection);
>>>
>>> if (apiId == -1) {
>>>
>>> //application addition has failed
>>>
>>> return;
>>>
>>> }
>>>
>>> prepStmt = connection.prepareStatement(deleteScopes);
>>>
>>> prepStmt.setInt(1,apiId);
>>>
>>> prepStmt.execute();
>>>
>>> prepStmt.close();
>>>
>>>
> BTW, the above line seems redundant and inappropriate as prepStmt is
> anyway closed in the finally block. ;). Also, there seem to be a few
> formatting issues as well, which need to be fixed. ;)
>
>
>> connection.commit();
>>>
>>> } catch (SQLException e) {
>>>
>>> handleException("Error while deleting Scopes for API : " +
>>> api.getId().toString(), e);
>>>
>>> } finally {
>>>
>>> APIMgtDBUtil.closeAllConnections(prepStmt, connection, null);
>>>
>>> }
>>> //addScopes(api.getScopes(),apiId,tenantId);
>>> addScopes(api.getUriTemplates(),apiId,tenantId);
>>>
>>> }
>>>
>>> [1].
>>> https://github.com/wso2/carbon-apimgt/blob/435163dd0f60058d8cfecbb0c4230984f0882fb6/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java
>>>
>>> Thanks,
>>>
>>> Harshan Liyanage
>>> Software Engineer
>>> Mobile: *+94724423048*
>>> Email: hars...@wso2.com
>>> Blog : http://harshanliyanage.blogspot.com/
>>> *WSO2, Inc. :** wso2.com <http://wso2.com/>*
>>> lean.enterprise.middleware.
>>>
>>
>>
>>
>> --
>> Nuwan Dias
>>
>> Technical Lead - WSO2, Inc. http://wso2.com
>> email : nuw...@wso2.com
>> Phone : +94 777 775 729
>>
>
>
> Cheers,
> Prabath
> --
> Prabath Abeysekara
> Technical Lead
> WSO2 Inc.
> Email: praba...@wso2.com
> Mobile: +94774171471
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* <http://lk.linkedin.com/in/rumeshbandara>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] What is the best approach to version webapps?

2015-08-16 Thread Joseph Fonseka
Hi Nirmal

IMO we should have version number in war since we will be shipping fixes
which means a new war. And changing the context is also not good because
then client has to changed. So I think the third option is the best if it
works.


Thanks
Jo

On Sat, Aug 15, 2015 at 9:16 PM, Thilini Cooray thili...@wso2.com wrote:

 Hi Nirmal,

 Thanks for the suggestion. We are looking in to the most suitable approach
 to version the API. As you have mentioned, it would be a better approach if
 we can direct the requests to the latest API version. I will look into it.

 On Sat, Aug 15, 2015 at 11:16 AM, Nirmal Fernando nir...@wso2.com wrote:

 Any particular reason for having a war file per version? Much better
 approach would be to version the API classes. That way you could get all
 traffic without an explicit version on to the latest available REST API.
 You need to embed version info into API classes.

 https://developer.github.com/v3/ Github api is a good reference to
 check.

 On Sat, Aug 15, 2015 at 10:17 AM, Sanjeewa Malalgoda sanje...@wso2.com
 wrote:

 +1 for option 02.
 On Aug 15, 2015 10:01 AM, Thilini Cooray thili...@wso2.com wrote:

 Hi,

 We need to version a  webapp which contains RESTful APIs.
 This webapp will be deployed in WSO2 Api Manager.

 Following are 3 approaches I found for the purpose :

1. Make war name as warName${project.artifactId}-${pom.version}/
warName which will output webappName-version.war

Its endpoint address is http://HostName:port
 /webappName-version/
Ex : https://localhost:9443/api-import-export-1.0.0/

2.  Make war name as warName
 ${project.artifactId}#${pom.version}/warName which will output
 webappName#version.war

 This will allow Tomcat server to identify versions of the
 web app.
 Its endpoint address is http://HostName:port/
 webappName/version/
 Ex : https://localhost:9443/api-import-export/1.0.0/
 https://localhost:9443/api-import-export-1.0.0/

 WSO2 Application Server follows this approach [1].

3.  Apache tomcat consists of another approach using ## for
 context naming [2].
 That approach needs to make war name as warName
 ${project.artifactId}##${pom.version}/warName which will output
 webappName##version.war

Its endpoint address is http://HostName:port/webappName/
This will use the latest version.
Ex : https://localhost:9443/api-import-export/
 https://localhost:9443/api-import-export-1.0.0/
However this naming convention cannot be deployed in WSO2
 Api Manager. It returns AbstractWebappDeployer Unsupported file path
 format.

 What is the best approach to follow when versioning the webapp ?

 [1] https://docs.wso2.com/display/AS521/Webapp+Versioning
 [2] http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming

 Thanks,
 ThiliniC.

 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware


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




 --

 Thanks  regards,
 Nirmal

 Team Lead - WSO2 Machine Learner
 Associate Technical Lead - Data Technologies Team, WSO2 Inc.
 Mobile: +94715779733
 Blog: http://nirmalfdo.blogspot.com/





 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware

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




-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Meeting Notes] Deciding what to do with API Analytics webapp

2015-07-23 Thread Joseph Fonseka
Following are some of the requirements I would like to see in UI component
model. Just brainstorming.

1. Change and develop web app without building the product. ( As we discuss
web app will get assembled at build/run time If we can assembled in
development time it will save lot of time )
2. Permission model which will show and hide UI components based on user
roles.
3. Framework level support to enhance web application security.
4. L10n  I18n

Also I wonder if the components that we write can be included as
web-components.

Cheers
Jo


On Tue, Jul 21, 2015 at 2:51 PM, Manuranga Perera m...@wso2.com wrote:

 This is the information I captured, please add if I missed anything.

 * API Analytics could be written using UES, but this will not be
 immediately done. since the current static app is in a shippable state.
 * There will be an effort to develop the UES dashboards using UI component
 model.
 * Dashboard render will be an single embeddable component which will take
 the dashboard definition as an input.

 --
 With regards,
 *Manu*ranga Perera.

 phone : 071 7 70 20 50
 mail : m...@wso2.com




-- 

-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clarification on import swagger doc

2015-06-03 Thread Joseph Fonseka
Hi

Generally it should import the whole document but some of the attributes
should be treated differently depending on the context ex. API Name should
only get imported if the API is not saved. If the API is saved the designer
should replace the name in swagger with the API's name.

Cheers
Jo

On Thu, Jun 4, 2015 at 6:54 AM, Lakmali Baminiwatta lakm...@wso2.com
wrote:

 Adding Jo and Madusanka.

 On 4 June 2015 at 11:09, Ushani Balasooriya ush...@wso2.com wrote:

 Hi APIm Team,

 When you import a swagger document, should it import only the swagger
 related resources (E.g., resource and scopes) or the whole API information?

 According to the issue [1] if it is  only swagger information, it still
 imports the API name as well.
 Pls advice.

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


 Thanks!
 --
 *Ushani Balasooriya*
 Senior Software Engineer - QA;
 WSO2 Inc; http://www.wso2.com/.





 --
 Lakmali Baminiwatta
  Senior Software Engineer
 WSO2, Inc.: http://wso2.com
 lean.enterprise.middleware
 mobile:  +94 71 2335936
 blog : lakmali.com




-- 

-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [API-everywhere] Unable to view published APIs in API store

2015-02-13 Thread Joseph Fonseka
Hi

For store to display the APIs they need to be indexed see if they get
indexed via registry.



On Fri, Feb 13, 2015 at 9:03 PM, Supun Malinga sup...@wso2.com wrote:

 Nope.. Didn't work.

 On Fri, Feb 13, 2015 at 9:01 PM, Rajith Vitharana raji...@wso2.com
 wrote:

 hi,

 try searching the api via search box. it worked for me earlier :D in apim
 1.6

 Thanks,

 On Fri, Feb 13, 2015 at 8:57 PM, Supun Malinga sup...@wso2.com wrote:

 Hi,

 Stuck on $subject while working on API-Everywhere features. I even
 created an API manually and still didn't get anything in store. Tried
 restarting as well. There are not error logs as well.

 Can someone point me where to check if something has gone wrong ? and
 where to debug for store retrieving APIs.

 thanks,
 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321

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




 --
 Rajith Vitharana

 Software Engineer,
 WSO2 Inc. : wso2.com
 Mobile : +94715883223
 Blog : http://lankavitharana.blogspot.com/




 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321

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




-- 

-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] G-Reg internal API store and publisher are not working

2015-02-09 Thread Joseph Fonseka
Hi Chandana

Please try including jaggery encode module which you can find in [1]



[1] https://github.com/wso2/product-apim/tree/master/modules/jaggery/encode

On Mon, Feb 9, 2015 at 3:29 PM, Chandana Napagoda chand...@wso2.com wrote:

 Hi Nuwan,

 In G-Reg, internal API Store and Publisher applications are not
 functioning at all at the moment. If we access the productapipublisher
 app, attached exception is logged. According to the logs, some jaggery
 modules are missing. These modules are currently not available in the
 carbon-apimgt repo. However they are in the product-apim repo. So shall we
 make these modules available in carbon-apimgt repo as well?

 Also, even after copying relevant modules still productapipublisher and
 productapistore applications are not working and no exceptions are
 logged. Can you guys please have a look?

 Regards,
 Chandana

 --
 *Chandana Napagoda*
 Senior Software Engineer
 WSO2 Inc. - http://wso2.org

 *Email  :  chand...@wso2.com chand...@wso2.com**Mobile : +94718169299
 %2B94718169299*

 *Blog  :http://cnapagoda.blogspot.com http://cnapagoda.blogspot.com*




-- 

-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Access-Control-Allow-Methods header not getting set for CORS requests.

2014-09-08 Thread Joseph Fonseka
Hi Lakmali

Thanks for the clarification, And it would be ideal to send only the
methods defined in API's resources but how mutch overhead will it add ?

Regards
Jo


On Sat, Sep 6, 2014 at 10:36 AM, Lakmali Baminiwatta lakm...@wso2.com
wrote:

 Hi Jo,


 On 5 September 2014 15:19, Joseph Fonseka jos...@wso2.com wrote:

 Hi

 In AM 1.7.1 Access-Control-Allow-Methods header is not getting set by
 the handler. When trouble shooting I found that particular line is
 commented. was there a reason to remove it ?


 Yes. When we had this, the configured  Access-Control-Allow-Methods header
 value was completely overriding the actual value sent in the response for
 that header. As a result if someone checks the Methods supported by the API
 (with Max-Forwards:0) or the back-end service by sending an OPTIONS call
 to the API, the value is not correct. Therefore we decided to remove this
 header and only depend on the Access-Control-Allow-Methods value sent from
 the back-end service for Swagger call [1].

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


 If Access-Control-Allow-Methods is not present PUT and DELETE requests
 will not work in swagger console + other web clients.


 May be we can check whether actual response contains this header and if
 not add the header with the methods only exposed by the API's resources.

 Thanks,
 Lakmali


 Thanks
 Jo


 --

 --
 *Joseph Fonseka*
  WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 772 512 430
 skype: jpfonseka

 * http://lk.linkedin.com/in/rumeshbandara*




 --
 Lakmali Baminiwatta
  Senior Software Engineer
 WSO2, Inc.: http://wso2.com
 lean.enterprise.middleware
 mobile:  +94 71 2335936
 blog : lakmali.com




-- 

-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM] Access-Control-Allow-Methods header not getting set for CORS requests.

2014-09-05 Thread Joseph Fonseka
Hi

In AM 1.7.1 Access-Control-Allow-Methods header is not getting set by the
handler. When trouble shooting I found that particular line is commented.
was there a reason to remove it ?

If Access-Control-Allow-Methods is not present PUT and DELETE requests
will not work in swagger console + other web clients.

Thanks
Jo


-- 

-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Reason for disabling the 'Implementation' tab in APIM 1.7.1 for migrated apis

2014-08-14 Thread Joseph Fonseka
Hi Chamila

Best solution is to make the comparison case insensitive. In
implementation field we capture if the api has a back-end endpoint or a
in-line implementation via script mediator.

Regards
Jo


On Thu, Aug 14, 2014 at 1:04 PM, Chamila Adhikarinayake chami...@wso2.com
wrote:

 Hi
 This is regarding this public jira[1]. The implementation tab is disabled
 when a migrated api (from 1.6 to 1.7.1 ) is opened for editing (see image
 in the jira),

 following code handles this in
 /components/apimgt/api-publisher-web/1.2.3/src/site/themes/default/templates/item-design/template.jag

var implement_wlabel = ;
 if(api  api.implementation != ENDPOINT ){
 implement_wlabel = wizard-done
 }
 else{
 implement_w_link = '#';
 }


 for a migrated api, api.implementation has the value 'ENDPOINT' and for an
 api created in 1.7 this value is 'endpoint'.  If I remove the
 'api.implementation != ENDPOINT' part, I can enable the disabled tab. Is
 there any specific reason for adding this part to the code or is it ok if I
 remove this?

 [1] https://wso2.org/jira/browse/APIMANAGER-2662
 Thanks,
 Chamila.

 --
  Regards,
 Chamila Adhikarinayake
 Software Engineer
 WSO2, Inc.
 Mobile - +94712346437
 Email  - chami...@wso2.com




-- 

-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Product API Publisher error in accessing : A module cannot be found with the specified name : encode

2014-07-22 Thread Joseph Fonseka
)
 at
 org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
 at
 org.jaggeryjs.rhino.productapipublisher.site.pages.c1._c_script_0(/productapipublisher/site/pages/header.jag:33)
 at
 org.jaggeryjs.rhino.productapipublisher.site.pages.c1.call(/productapipublisher/site/pages/header.jag)
 at
 org.jaggeryjs.rhino.productapipublisher.site.pages.c1.exec(/productapipublisher/site/pages/header.jag)
 at
 org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
 ... 108 more
 Caused by: org.jaggeryjs.scriptengine.exceptions.ScriptException: A module
 cannot be found with the specified name : encode
 at
 org.jaggeryjs.jaggery.core.manager.CommonManager.require(CommonManager.java:235)
 at
 org.jaggeryjs.jaggery.core.manager.WebAppManager.require(WebAppManager.java:313)
 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.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
 ... 114 more
 TID: [0] [AS] [2014-07-21 17:37:25,580] ERROR
 {org.apache.catalina.session.StandardSession} -  Session event listener
 threw exception {org.apache.catalina.session.StandardSession}
 java.lang.NullPointerException
 at
 org.jaggeryjs.jaggery.core.manager.WebAppManager.clonedJaggeryContext(WebAppManager.java:353)
 at
 org.jaggeryjs.jaggery.core.listeners.WebAppSessionListener.sessionDestroyed(WebAppSessionListener.java:91)
 at
 org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
 at
 org.apache.catalina.session.StandardSession.isValid(StandardSession.java:656)
 at
 org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:532)
 at
 org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:517)
 at
 org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1352)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
 at java.lang.Thread.run(Thread.java:745)
 TID: [0] [AS] [2014-07-21 17:37:25,582] ERROR
 {org.apache.catalina.session.StandardSession} -  Session event listener
 threw exception {org.apache.catalina.session.StandardSession}
 java.lang.NullPointerException
 at
 org.jaggeryjs.jaggery.core.manager.WebAppManager.clonedJaggeryContext(WebAppManager.java:353)
 at
 org.jaggeryjs.jaggery.core.listeners.WebAppSessionListener.sessionDestroyed(WebAppSessionListener.java:91)
 at
 org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
 at
 org.apache.catalina.session.StandardSession.isValid(StandardSession.java:656)
 at
 org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:532)
 at
 org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:517)
 at
 org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1352)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
 at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
 at java.lang.Thread.run(Thread.java:745)

 thanks,
 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321




-- 

-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 API Manager 1.6.0 Publisher / Store customization from source code not applied to product distribution

2014-03-12 Thread Joseph Fonseka
Hi Antonio

In the thuring-chunk06 checkout you can find the API Store and API
Publisher in the following locations.

components/apimgt/api-publisher-web/1.2.1/
components/apimgt/api-store-web/1.2.1/

Once you do the customizations you can build the API Manager pack with
those changes by building.

product-releases/chunk-06/

Let me know if you need more clarifications.

Regards
Jo





On Thu, Mar 13, 2014 at 12:45 AM, Cameron, Antonio 
antonio.came...@bankofamerica.com wrote:

  I would like to understand how to modify the API Manager 1.6.0 Publisher
 / Store jaggery apps from source and have those customizations reflected in
 the product distribution.  I have downloaded the source code from:
 https://svn.wso2.org/repos/wso2/carbon/platform/tags/turing-chunk06repository 
 location.  Currently, prebuilt artifacts are downloaded from the
 wso2 maven repository for the Publisher / Store and are used in the final
 product dist.  Do I need to create a patch for modifying the jaggery / java
 source code? If so, what is the process for creating a patch for this
 purpose?



 Thanks,



 Antonio


  --
 This message, and any attachments, is for the intended recipient(s) only,
 may contain information that is privileged, confidential and/or proprietary
 and subject to important terms and conditions available at
 http://www.bankofamerica.com/emaildisclaimer. If you are not the intended
 recipient, please delete this message.

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




-- 

-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Invitation: APIM Full Endpoint Support Implementation review @ Mon Dec 2, 2013 3pm - 4pm (jos...@wso2.com)

2013-12-01 Thread Joseph Fonseka
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20131202T093000Z
DTEND:20131202T103000Z
DTSTAMP:20131202T061144Z
ORGANIZER;CN=Joseph Fonseka:mailto:jos...@wso2.com
UID:21o535gcdrblvfaojmul9c9...@google.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE
 ;CN=jos...@wso2.com;X-NUM-GUESTS=0:mailto:jos...@wso2.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=Ruwan Yatawara;X-NUM-GUESTS=0:mailto:ruw...@wso2.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=Lakmali Baminiwatta;X-NUM-GUESTS=0:mailto:lakm...@wso2.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=Lalaji Sureshika;X-NUM-GUESTS=0:mailto:lal...@wso2.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=Vijayaratha Vijayasingam;X-NUM-GUESTS=0:mailto:rat...@wso2.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=Uvindra Jayasinha;X-NUM-GUESTS=0:mailto:uvin...@wso2.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=Sanjeewa Malalgoda;X-NUM-GUESTS=0:mailto:sanje...@wso2.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=OPT-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=dev@wso2.org;X-NUM-GUESTS=0:mailto:dev@wso2.org
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=Nuwan Dias;X-NUM-GUESTS=0:mailto:nuw...@wso2.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=Sumedha Rubasinghe;X-NUM-GUESTS=0:mailto:sume...@wso2.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=Amila De Silva;X-NUM-GUESTS=0:mailto:ami...@wso2.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=Dinusha Senanayaka;X-NUM-GUESTS=0:mailto:dinu...@wso2.com
CREATED:20131202T054244Z
DESCRIPTION:This meeting was scheduled to review the implementation and the
  UI of full endpoint support for APIM.\nView your event at http://www.googl
 e.com/calendar/event?action=VIEWeid=MjFvNTM1Z2NkcmJsdmZhb2ptdWw5Yzlzc28gZG
 V2QHdzbzIub3Jntok=MTUjam9zZXBoQHdzbzIuY29tYWM0YmQxNjk2Y2EyZmQ2ZmY4OGI2MmJl
 MGJmYmUyMTZjMzk1ZjU2ZQctz=Asia/Colombohl=en.
LAST-MODIFIED:20131202T061144Z
LOCATION:APIM Team premises 
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:APIM Full Endpoint Support Implementation review
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR


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


[Dev] Full Endpoint Support for APIM

2013-11-19 Thread Joseph Fonseka
Hi

I shared a patch with an implementation for full endpoint support for API
manager. This feature is planed to go out with 1.6.0.

With this a user can select from following EP types Fail-over ,
Load-balanced , WSDL , URL (address EP) and HTTP.

Also API config generation was re-written to use Apache Velocity based
template.

The patch is located at [1] https://wso2.org/jira/browse/APIMANAGER-1831

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

Cheers
Jo




-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] APIM Tenant Store List : How can I get the logo for a tenant.

2013-10-14 Thread Joseph Fonseka
Hi All

If we do not capture tenant image shall we use QRCode with the tenant store
link.

Can use http://davidshimjs.github.io/qrcodejs/ library.

Cheers
Jo


On Mon, Oct 14, 2013 at 11:50 AM, Amila Maha Arachchi ami...@wso2.comwrote:




 On Mon, Oct 14, 2013 at 11:29 AM, Joseph Fonseka jos...@wso2.com wrote:


 Hi

 We have update the AM Tenant store listing to display thumbnails for each
 tenant. It would be better if we could display the logos of tenants inside
 the thumbs.

 1. Are we capturing the tenant logos if so where do they get stored ?
 2. Do we capture tenant logos in API CLoud ?


 We do not capture a tenant logo in the Cloud deployment.


 Modified page screens are attached bellow. Next we are planing to add
 search  paging for the store list bcos there can be many tenants.

 Thanks  Regards
 Jo


 --
 *Joseph Fonseka*
  WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 772 512 430
 skype: jpfonseka

 * http://lk.linkedin.com/in/rumeshbandara*


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




 --
 *Amila Maharachchi*
 Senior Technical Lead
 WSO2, Inc.; http://wso2.com

 Blog: http://maharachchi.blogspot.com
 Mobile: +94719371446




-- 

-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] APIM Supporting additional endpoint types

2013-10-02 Thread Joseph Fonseka
Hi

In the current APIM we only support Address endpoint type. So we are
planing to include other endpoint types which are supported by the ESB.

Following are the other endpoint types

   Address Endpoint
https://10.100.5.20:9445/carbon/endpoints/addressEndpoint.jsp?  Defines
the direct URL of the serveice   Default Endpoint
http://docs.wso2.org/display/ESB403/Default+Endpoint  Defines additional
configuration for the default target   Failover Group
https://10.100.5.20:9445/carbon/endpoints/failoverEndpoint.jsp?  Defines
the endpoints that the service will try to connect to in case of a failure.
This will take place in a round robin manner   HTTP Endpoint
https://10.100.5.20:9445/carbon/endpoints/httpEndpoint.jsp?  Defines a
URI Template based REST Service endpoint   Load Balance Endpoint
https://10.100.5.20:9445/carbon/endpoints/loadBalanceEndpoint.jsp?
Defines groups of endpoints for replicated services.The incoming
requests
will be directed to these endpoints in a round robin manner. These
endpoints automatically handle the fail-over cases as well   Recipient List
Group https://10.100.5.20:9445/carbon/endpoints/recipientlistEndpoint.jsp?
Defines the list of endpoints a message will be routed to   Template
Endpoint https://10.100.5.20:9445/carbon/endpoints/templateEndpoint.jsp?
Defines a template endpoint that can parameterfy endpoints   WSDL
Endpoint https://10.100.5.20:9445/carbon/endpoints/wsdlEndpoint.jsp?
Defines the WSDL, Service and Port


From the above list do we need to ? and how to include the following ?

1. Default Endpoint
2. HTTP Endpoint - This require to populate the uri template during
mediation.
3. Template Endpoint - You need to specify a template when creating an
endpoint.

Some of the above need additional configuration. As I understood configure
meditations and defining templates. Do we have to provide UI for them as
well.

Regards
Jo



-- 
*Joseph Fonseka*
 WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

* http://lk.linkedin.com/in/rumeshbandara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] APIM Supporting additional endpoint types

2013-10-02 Thread Joseph Fonseka
Forwarding mail to Architecture from dev.

On Wed, Oct 2, 2013 at 2:12 PM, Joseph Fonseka jos...@wso2.com wrote:


 Hi

 In the current APIM we only support Address endpoint type. So we are
 planing to include other endpoint types which are supported by the ESB.

 Following are the other endpoint types

Address Endpoint
 https://10.100.5.20:9445/carbon/endpoints/addressEndpoint.jsp?  Defines
 the direct URL of the serveice   Default Endpoint
 http://docs.wso2.org/display/ESB403/Default+Endpoint  Defines
 additional configuration for the default target   Failover Group
 https://10.100.5.20:9445/carbon/endpoints/failoverEndpoint.jsp? Defines the 
 endpoints that the service will try to connect to in case of a
 failure. This will take place in a round robin manner   HTTP Endpoint
 https://10.100.5.20:9445/carbon/endpoints/httpEndpoint.jsp?  Defines a
 URI Template based REST Service endpoint   Load Balance Endpoint
 https://10.100.5.20:9445/carbon/endpoints/loadBalanceEndpoint.jsp? Defines 
 groups of endpoints for replicated services.The incoming requests
 will be directed to these endpoints in a round robin manner. These
 endpoints automatically handle the fail-over cases as well   Recipient
 List Group
 https://10.100.5.20:9445/carbon/endpoints/recipientlistEndpoint.jsp? 
 Defines the list of endpoints a message will be routed to   Template
 Endpoint https://10.100.5.20:9445/carbon/endpoints/templateEndpoint.jsp? 
 Defines a template endpoint that can parameterfy endpoints   WSDL
 Endpoint https://10.100.5.20:9445/carbon/endpoints/wsdlEndpoint.jsp? 
 Defines the WSDL, Service and Port


 From the above list do we need to ? and how to include the following ?

 1. Default Endpoint
 2. HTTP Endpoint - This require to populate the uri template during
 mediation.
 3. Template Endpoint - You need to specify a template when creating an
 endpoint.

 Some of the above need additional configuration. As I understood configure
 meditations and defining templates. Do we have to provide UI for them as
 well.

 Regards
 Jo



 --
 *Joseph Fonseka*
  WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 772 512 430
 skype: jpfonseka

 * http://lk.linkedin.com/in/rumeshbandara*


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