Unable to access rest api
DushyantTa opened this issue · comments
After enabling restapi.command.processor.enabled=true from config.xml file.
WARNING: A provider org.openas2.cmd.processor.restapi.LoggerRequestFilter registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.openas2.cmd.processor.restapi.LoggerRequestFilter will be ignored.
Mar 26, 2022 7:21:20 AM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
WARNING: A provider org.openas2.cmd.processor.restapi.AuthenticationRequestFilter registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.openas2.cmd.processor.restapi.AuthenticationRequestFilter will be ignored.
Mar 26, 2022 7:21:20 AM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
WARNING: A provider org.openas2.cmd.processor.restapi.ApiResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.openas2.cmd.processor.restapi.ApiResource will be ignored.
Mar 26, 2022 7:21:20 AM org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
WARNING: A provider org.openas2.cmd.processor.restapi.CORSFilter registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.openas2.cmd.processor.restapi.CORSFilter will be ignored.
Also, Please upload document related to restapi along with all the available http call operation in swagger file.
@GreicodexJM - are you able to review and provide an answer?
Facing similar issue, Need some documentation on accessing the REST API.
Unfortunately the REST API was not contributed with no documentation.
Unless it is documented and supported by the contributor or others, it will be removed from the OpenAS2 code base in an upcoming release.
The REST API module is just an access layer to the Commands API of OpenAS2. Therefore follows the same convention as the OpenAS2 commands listed on /Server/src/config/commands.xml.
It can List, View, Delete, and Add: Partners, Partnerships & Certificates. Set different log levels and Refresh the Configuration from File or Store the in memory configuration to files.
All the endpoints are exposed under the /api path like so:
GET|POST /api/<command-group>/<command-method>
For example:
From the Console module you could list the existing loaded partners like so:
# partner list
The equivalent for the API would be:
GET /api/partner/list
It stopped working after the last update of the Jersey libraries which changed how the ResourceConfigs are defined. It doesn't allow you to pass an constructed object (having a server reference) anymore to the Jersey server configuration.
Just submitted a Pull Request to fix this issue.