REST Service Method

In testing the REST Service, I’m trying to call a service but I get the message:"
> {
>
> “error”: “Service method not found”,
>
> “details”: “journalEntryService.GetJournals()”
>
> }

Here’s my service:
image

And here’s my rest-services.xml

<?xml version="1.0" encoding="UTF-8"?>

image

Hi Francis,

Did you register your rest-services.xml in application.properties?

jmix.rest.services-config = rest-services.xml

AccountingHub.zip (492.0 KB)

Yes I did. I’m including my project. Thanks.

In your sample project the name of the method in the class is GetJournals, but in the rest-services.xml it is getJournals. Rename the method in the class - it must start with a lowercase letter according to java naming conventions: getJournals(). After that everything should work.

Thanks. It worked.