Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-04 Thread Jayanga Dissanayake
Hi Harsha, Thanks for the suggestion. In the Development Governance, we are planning to do this with the source code. Basically get a checkout from the git hub and find the services that a particular component/module refers to. In this approach we get only the source, so '.aar' based mechanisms

Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-04 Thread Udara Liyanage
Let's say a service.XML is found but without any service definition. Is it still a axis2 service? Touched, not typed. Erroneous words are a feature, not a typo. ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev

Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-04 Thread Jayanga Dissanayake
Hi Udara, Agreed with your point. Its not just enough to have a file having the name 'services.xml' to create a service assert. We have to read the file and get the service name and other information from the file. As Axis2 support serviceGroup, A single 'services.xml' file sometimes may contain

Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-04 Thread Nirmal Fernando
Hi Jayanga, I wonder this approach would help us. There could be lot of issues. Why not thinking of introducing a meta file which represents basic set of information that you require in order to generate these assets? Then the relevant components would need to configure this meta file, if it

Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-04 Thread Kasun Gajasinghe
Hi Jayanga, As per your first mail, I take it that a service hosting product like AS, DSS etc. will do the task of determining the service type? Then, how about patching into the runtime environment to determine the service type instead of depending on reading the file-system to determine a

Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-04 Thread Jayanga Dissanayake
Hi Nirmal, Thanks for the suggestion. Our first approach is to extract relevant information from the source without adding any burden on the developer. Using an additional meta file to indicate the information needed by the governance purposes will simplify the governance process and we could

Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-04 Thread Senaka Fernando
-1 for another meta file. Guys, we don't want this to change anything that we are doing today. What we need is to read the existing code and try to understand what it is. As a developer debugging the code you can read the services.xml and the corresponding class and whatever other information

Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-04 Thread Kasun Gajasinghe
Thanks Senaka for the update. For, JAX-RS services, checking for the @Path annotation doesn't always work. That's because it's not mandatory to have @Path annotation set in the class, or in a method in a class. Usually, the *methods* in a jax-rs resource class would have the @Path annotation set

Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-04 Thread Nirmal Fernando
Thanks for the clarifications guys... I think what we need is a semantic analyzer. On Wednesday, February 5, 2014, Kasun Gajasinghe kas...@wso2.com wrote: Thanks Senaka for the update. For, JAX-RS services, checking for the @Path annotation doesn't always work. That's because it's not

Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-04 Thread Indika Sampath
Hi Jayanga, This link might be useful for your work. https://today.java.net/pub/a/today/2008/04/10/source-code-analysis-using-java-6-compiler-apis.html#verifying-the-source-against-rules On Wed, Feb 5, 2014 at 5:00 AM, Nirmal Fernando nir...@wso2.com wrote: Thanks for the clarifications

[Dev] Clarification needed on reading annotation information from .Java files

2014-02-03 Thread Jayanga Dissanayake
Hi, I am currently involved in the Development Governance project for C5. One of my task is to represent services (Axis, Jax rs, Jax ws) in the registry as a service asset instances and link them to corresponding module assets via associations. To do this I am planning to parse the files of

Re: [Dev] Clarification needed on reading annotation information from .Java files

2014-02-03 Thread Harsha Thirimanna
For the axis2 service, we create aar file, then can't we differentiate it using that extension ? *Harsha Thirimanna* Senior Software Engineer; WSO2, Inc.; http://wso2.com * http://www.apache.org/* * email: **hars...@wso2.com* az...@wso2.com* cell: +94 71 5186770* * twitter: **http://twitter.com/