[Simpleweb-Support] Fw: Re: mapper.xml not working
Brought to you by:
niallg
From: Hugo W. <ug...@li...> - 2007-04-17 12:05:47
|
----- Original Message ----- From: "Niall Gallagher" <gal...@ya...> To: "Simple support and user issues" <sim...@li...urceforge.n= et> Subject: Re: [Simpleweb-Support] mapper.xml not working Date: Tue, 17 Apr 2007 02:27:08 -0700 (PDT) Hi, Yes, the tutorial is slightly out of date in this respect. It looks=20 like your mapper.xml file is not correctly formatted. It should=20 look like <mapper> <lookup> <service name=3D"name" type=3D"package.MyClass"/> </lookup> <resolve> <match name=3D"name" path=3D"/*"/> </resolve> </mapper> Niall ----- Original Message ---- From: Hugo Weber <ug...@li...> To: sim...@li... Sent: Tuesday, April 17, 2007 1:18:00 AM Subject: [Simpleweb-Support] mapper.xml not working I'm doing the tutorial samples for the HelloService and it only=20 works if I add the following lines to the DemoServer.java: engine.load("default", "HelloService"); engine.link("*", "default"); Looks like stuff on mapper.xml is bean ignored. The mapper.xml is=20 shown bellow. What's Wrong? The steps I made... I Copied DemoServer and DemoHandler sources from the tutorial=20 "getting started - r2" and HelloService from the tutorial "Simplest=20 possible Service". They compile but don't work. I found out the following error is due to a missing mapper.xml file. simple.http.serve.LocateException: File not found at simple.http.serve.FileLocator.getLocation(FileLocator.java:138) at simple.http.serve.FileLocator.getLocation(FileLocator.java:112) at simple.http.serve.FileLocator.getFile(FileLocator.java:157) at simple.http.load.PatternResolver.load(PatternResolver.java:146) at simple.http.load.PatternResolver.load(PatternResolver.java:130) at simple.http.load.PatternResolver.init(PatternResolver.java:106) at simple.http.load.PatternResolver.<init>(PatternResolver.java:91) at simple.http.load.PatternMapper.<init>(PatternMapper.java:106) at simple.http.load.PatternMapper.<init>(PatternMapper.java:92) at simple.http.load.MapperFactory.getInstance(MapperFactory.java:73) at simple.http.load.MapperEngine.<init>(MapperEngine.java:243) at simple.http.load.MapperEngine.<init>(MapperEngine.java:222) at simple.http.load.MapperEngine.<init>(MapperEngine.java:176) at simple.http.load.MapperEngine.<init>(MapperEngine.java:150) at simple.http.load.MapperEngine.<init>(MapperEngine.java:105) at simple.http.load.MapperEngine.<init>(MapperEngine.java:86) at DemoServer.main(DemoServer.java:12) So I place this mapper.xml file and the error above is solved,=20 however, HelloService still not working. <?xml version=3D"1.0"?> <!DOCTYPE mapper SYSTEM "http://www.simpleframework.org/dtd/mapper.dtd";> <mapper> <resolve match=3D"/*" name=3D"default" type=3D"HelloService"/> </mapper> Searching on the simple site I found this link=20 http://kasparov.skife.org/blog/2004/04/23 named "It's all so simple" That's where I got the lines engine.load("default", "HelloService"); engine.link("*", "default"); Why it only works with the load and link methods and not what is on=20 the mapper.xml file? Thank you, Hugo. =3D -- Powered by Outblaze ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support =3D Search for products and services at:=20 http://search.mail.com --=20 Powered by Outblaze |