Error in generating manual API for complex document type

  1. Install HIPPO CMS, setup the details, go it running beautifully.

  2. Leaving everything as it is, go to HIPPO essential and activate the API and test it out
    http://localhost:8080/site/api/document. (perfect

  3. When into HIPPO CMS and did the following

3.1 Got into Content, Document Type, created compund type call SubCategory.

3.2. Got into Document Type, created compund type call Category and included SubCategory (multiple)

3.3. Got into Document Type and created a document type call CategoryDT and include Category (multiple)

3.4. Got to Document created Category and add in data and image.

  1. Double check my content with http://localhost:8080/site/api/document
    It was beautiful…

  2. Got into HIPPO Essential > Tools > Bean Writer, created the Beans (no problem)

  3. Got into HIPPO Essential -> Tools -> Rest Services Setup, generate manual REST.

Error.

[INFO] [talledLocalContainer] 27.07.2018 11:56:35 WARN http-nio-8080-exec-7 [AnnotationUtils.addXmlElementAnnotation:173] Unknown return type [List], will sk ip annotating it with @XmlElement
[INFO] [talledLocalContainer] 27.07.2018 11:56:35 WARN http-nio-8080-exec-7 [AnnotationUtils.addXmlAdaptorAnnotation:120] TODO: Cannot map type: List
[INFO] [talledLocalContainer] 27.07.2018 11:56:35 WARN http-nio-8080-exec-7 [AnnotationUtils.addXmlAdaptorAnnotation:120] TODO: Cannot map type: List
[INFO] [talledLocalContainer] 27.07.2018 11:56:35 WARN http-nio-8080-exec-7 [AnnotationUtils.addXmlAdaptorAnnotation:120] TODO: Cannot map type: List

Anyone faced this before?

Of course if you generate the API, you will only see an EMPTY

In some cases we don’t have enough information to annotate method properly, so you would need to do this by hand.

Dear Machak,

Thank you for your reply, sorry for the long wait.

When I was generating the manual-api, I choose CategoryDT as it contain both Category and SubCategory.

What files must I manually update?

  1. CategoryDT.java
  2. CategoryDTResource.java
  3. spring-plain-rest-api.xml
  4. Look for the java file add the Missing Type into org.onehippo.cms7.essentials.dashboard.utils.annotations.AnnotationUtils
  5. Other files I may have miss out?

Regards
Sola Lee

You should check your beans and annotate any getter methods with @Xml annotations which you need to expose.

1 Like