[Owasp-orizon] Read Java class files from .NET (for Spring MVC tool)

dinis cruz dinis.cruz at owasp.org
Wed May 20 04:36:54 EDT 2009


Paolo, do you have an example of using orizon version 1.0 to create XML
files from Java Source?

Dinis

2009/5/20 Paolo Perego <thesp0nge at owasp.org>

> Hi Dinis and hi list, orizon's new parsing engine (mirage) build in memory
> data structures containing info from ASTs. We don't use XML at this stage,
> we will use it to store the whole application model.
>
> If you need a dirty solution you can hack the JavaCollector class
> (org.owasp.orizon.mirage.java) and build your XML when traversing ASTs.
>
> Otherwise you can use orizon version 1.0 that actually creates a bunch of
> XMLs from a java source file.
>
> Regards
> Paolo
>
> "stay hungry, stay foolish"
>
> OWASP Orizon project, http://orizon.sf.net
>
> On 19/mag/09, at 23:43, dinis cruz <dinis.cruz at owasp.org> wrote:
>
> Hey .NET, Java & Orizon crowd,
>
> I'm porting a number of O2 modules ( <http://www.o2-ounceopen.com>
> http://www.o2-ounceopen.com) to Linux and building an (open source) module
> to understand/expose the "Spring MVC annotation based autowiring" markups in
> a programatically way (see
> <http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/bind/annotation/RequestMapping.html>
> http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/bind/annotation/RequestMapping.htmland
> <http://code.google.com/p/myblog/source/browse/branches/myblog2-springmvc/src/main/java/com/jdkcn/myblog/web/controller/adm/DeleteRoleController.java?spec=svn358&r=358>
> http://code.google.com/p/myblog/source/browse/branches/myblog2-springmvc/src/main/java/com/jdkcn/myblog/web/controller/adm/DeleteRoleController.java?spec=svn358&r=358
> ).
>
> BUT, although in .NET O2 is able to leverage the amazing capabilities of Mono
> Cecil <http://www.mono-project.com/Cecil> for reading and editing .NET
> assemblies (much better than .NET Reflection), I really need to find .NET
> tool that is able to read and expose Java classes metadata (classes,
> methods, attributes, etc...).
>
> One option will be use an *.java AST parser, but at last look they were NOT
> that strait forward to use.
>
> Actually, Paolo (from Orizon) question from you,* "You already create XML
> representations of Java files, right? , if so, are you able to save them to
> disk? and do you process attribute's metadata?"*
>
> At this stage, for the Spring MVC stuff, I'm mainlly after attributes like
> the @RequestMapping and @RequestParam on the example below
>
> *@RequestMapping("/adm/saveResource.jspx")
> public class SaveResourceController extends BaseController {
>
> ....
> @ModelAttribute("resource")
>     @RequestMapping(method = RequestMethod.POST)
>     public String saveResource(@ModelAttribute Resource resource,
>             @RequestParam(value = "cancel", required = false) String
> cancelStr,
>             @RequestParam(value = "parentId", required = false) String
> parentId,
>             HttpServletRequest request) {
> *
> Thanks
>
> Dinis Cruz
>
> _______________________________________________
> Owasp-orizon mailing list
> Owasp-orizon at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/owasp-orizon
>
>
> _______________________________________________
> Owasp-orizon mailing list
> Owasp-orizon at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/owasp-orizon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/owasp-orizon/attachments/20090520/dfa97cef/attachment.html 


More information about the Owasp-orizon mailing list