Resteasy + WF 14 Method not Allowed
cpt-subtext Feb 13, 2019 8:50 AMI try to implement Example CH03_1 in Wildfly from Restful Java with JAX-RS 2.0 and Resteasy --> https://github.com/oreillymedia/restful_java_jax-rs_2_0.
I always get
HTTP method POST is not supported by this URL
when i issue a POST Request.
e.g.:
curl -X POST -H 'Content-Type: application/xml' -i 'http://127.0.0.1:8080/jaxrs-2.0-workbook-ex03_1/services/customers/' --data ' Peter Example 555 Beacon St. Boston MA 02115 '
server.log states out:
2019-02-13 09:41:25,308 DEBUG [io.undertow.request] (default I/O-1) Matched prefix path /jaxrs-2.0-workbook-ex03_1 for path /jaxrs-2.0-workbook-ex03_1/services/customers/ 2019-02-13 09:41:25,310 DEBUG [io.undertow.request.security] (default task-1) Attempting to authenticate /jaxrs-2.0-workbook-ex03_1/services/customers/, authentication required: false 2019-02-13 09:41:25,310 DEBUG [io.undertow.request.security] (default task-1) Authentication outcome was NOT_ATTEMPTED with method io.undertow.security.impl.CachedAuthenticatedSessionMechanism@5be990cf for /jaxrs-2.0-workbook-ex03_1/services/customers/ 2019-02-13 09:41:25,310 DEBUG [io.undertow.request.security] (default task-1) Authentication result was ATTEMPTED for /jaxrs-2.0-workbook-ex03_1/services/customers/
Is there some setting for undertow to allow POST?
I also impelemted some Response for GET, also gets this Logentry from undertow:
2019-02-13 09:45:51,969 DEBUG [io.undertow.request.security] (default task-1) Authentication result was ATTEMPTED for /jaxrs-2.0-workbook-ex03_1/services/customers 2019-02-13 09:46:00,867 DEBUG [io.undertow.request] (default I/O-5) Matched prefix path /jaxrs-2.0-workbook-ex03_1 for path /jaxrs-2.0-workbook-ex03_1/services/customers/helloworld 2019-02-13 09:46:00,868 DEBUG [io.undertow.request.security] (default task-1) Attempting to authenticate /jaxrs-2.0-workbook-ex03_1/services/customers/helloworld, authentication required: false 2019-02-13 09:46:00,868 DEBUG [io.undertow.request.security] (default task-1) Authentication outcome was NOT_ATTEMPTED with method io.undertow.security.impl.CachedAuthenticatedSessionMechanism@5be990cf for /jaxrs-2.0-workbook-ex03_1/services/customers/helloworld
Are there some settings in combination with undertow?
Wildfly Version used: wildfly-14.0.1.Final
Resteasy Version used: 3.6.1.Final