|
|
Hi all,
I just upgraded to the latest roo and love the quot;json allquot; addition. I would like to also have a way to do the same thing but return XML rather than a json payload. I also need to create some custom services that return XML.
What is the recommended best practice for getting that into the project without messing up the already supported json views?
Thanks,
Mark
There is an external add-on which installs Springs ContentNegotiatingViewResolver. So you need to search the add-on first:
addon search quot;Content Negotiating View Resolverquot;
then install it and use it. Use 'addon info' to see details about its intended usage.
You should use a Roo 1.1.2 snapshot build to do this: downl...hp?project=ROO
I can't get quot;Content Negotiating View Resolverquot; addon to work. Please see errors below.
roogt; addon install id --searchResultId 43
Target resource(s):
------------------- net.tzolov.fromrepresentations.roo.addon (1.1.6)
Deploying...done.
Successfully installed add-on: net.tzolov.fromrepresentations.roo.addon [version
: 1.1.6]
[Hint] Please consider rating this add-on with the following command:
[Hint] addon feedback bundle --bundleSymbolicName net.tzolov.fromrepresentations
.roo.addon --rating ... --comment quot;...quot;
roogt; from resource representation setup
Exception in thread quot;Spring Roo JLine Shellquot; java.lang.NoSuchMethodError: org.sp
ringframework.roo.project.ProjectOperations.depend encyUpdate(Lorg/springframewor
k/roo/project/DependencyV at net.tzolov.fromrepresentations.roo.addon.fromResou rceRepresentationOp
erationsImpl.updateDependencies(fromResourceRepres entationOperationsImpl.java:16
3) at net.tzolov.fromrepresentations.roo.addon.fromResou rceRepresentationOp
erationsImpl.installfromResourceRepresentation(Htt pResourceRepresentationOperati
onsImpl.java:80) at net.tzolov.fromrepresentations.roo.addon.fromResou rceRepresentationCo
mmands.installfromResourceRepresentation(fromResou rceRepresentationCommands.java
:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source) at java.lang.reflect.Method.invoke(Unknown Source) at org..roo.support.util.ReflectionUti ls.invokeMethod(Ref
lectionUtils.java:191) at org..roo.process.manager.ProcessMan agerHostedExecution
Strategy$1.callback(ProcessManagerHostedExecutionS trategy.java:49) at org..roo.process.manager.internal.D efaultProcessManage
r.doTransactionally(DefaultProcessManager.java:180 ) at org..roo.process.manager.internal.D efaultProcessManage
r.execute(DefaultProcessManager.java:143) at org..roo.process.manager.ProcessMan agerHostedExecution
Strategy.execute(ProcessManagerHostedExecutionStra tegy.java:47) at org..roo.shell.AbstractShell.execut eCommand(AbstractSh
ell.java:165) at org..roo.shell.jline.JLineShell.pro mptLoop(JLineShell.
java:358) at org..roo.shell.jline.JLineShell.run (JLineShell.java:13
2) at java.lang.Thread.run(Unknown Source) |
|