On Thu, Jun 16, 2011 at 3:16 PM, gerar <gerardp...@gmail.com> wrote:
> Details:
>
> The  PersonXmlRestService.html is an example that comes with the wicket-rest
> library. It is a subclass of XmlWebServicePage which in  turn is based on
> AbstractWebServicePage. Class AbstractWebServicePage has a method:
>
>    @Override
>    public final boolean hasAssociatedMarkup() {
>        return false;
>    }
Instead of overriding this you can try with implementing
IMarkupResourceStreamProvider and return "new
StringResourceStream("")"

I think it should work now.
>
> to indicate that no HTML is associated. All output generated by pages based
> on these superclasses is "as is". No HTML but XML (or Json) is produced.
> It seems that this is ignored.
>
> and in the XmlWebServicePage there's a method
>
>    @Override
>    public final MarkupType getMarkupType() {
>        return new MarkupType("xml", "text/xml");
>
>    }
>    @Override
>    protected final void onRender() {
>        getResponse().write(getXML().toString());
>    }
> which generates the actual output (without any HTML file).
>
>
> I've attached sources as well. You can run it by unzipping followed by:
>
> cd wicket-rest-trunk
> mvn clean install
> cd wicket-rest-example
> mvn jetty:run
>
> then request http://localhost:8080/wicket-rest-example/person-api/xml"; in a
> browser.
>
>
> http://apache-wicket.1842946.n4.nabble.com/file/n3602257/wicket-rest-wicket15rc42.zip
> wicket-rest-wicket15rc42.zip
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/wicket-rest-and-Wicket-1-5-RC4-2-MarkupNotFoundException-Can-not-determine-Markup-tp3600779p3602257.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to