I am trying to build using JAXRS-1.1 feature along with servlet-3.1 and transportSecurity-1.0 I am having a hard time with the set up.
If I do not include JAXRS-1.1, I still see many errors when making simple PUT calls to the server such as
[INFO] (org.codehaus.mojo.pluginsupport.ant.AntHelper) org.apache.cxf.interceptor.Fault
[INFO] (org.codehaus.mojo.pluginsupport.ant.AntHelper) [WARNING ] Exception in handleFault on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor@ccb42500
and this makes me think JAXRS comes embedded.
I have not been able to figure out how to check if OpenLiberty comes embedded with JAXRS-2.0
Here is the server.xml
<server description="Sample Servlet server">
<featureManager>
<!-- https://openliberty.io/docs/latest/reference/feature/microProfile-1.0.html -->
<feature>servlet-3.1</feature>
<feature>transportSecurity-1.0</feature>
</featureManager>
<variable name="default.https.port" defaultValue="9443" />
<variable name="app.context.root" defaultValue="ServletSample" />
<variable name="keystore.path" defaultValue="${WLP_OUTPUT_DIR}/resources/security/key.p12" />
<!-- tag::httpEndpoint[] -->
<httpEndpoint httpPort="-1" httpsPort="${default.https.port}" id="defaultHttpEndpoint" host="*" />
<!-- end::httpEndpoint[] -->
<webApplication location="ServletSample.war" contextRoot="/" />
<keyStore id="defaultKeyStore" password="${env.GARBLED_KEYSTORE}" />
<ssl id="defaultSSLConfig" keyStoreRef="defaultKeyStore" trustStoreRef="defaultKeyStore" clientAuthenticationSupported="true" sslProtocol="TLSv1.2" />
<ssl id="controllerConnectionConfig" keyStoreRef="defaultKeyStore" trustStoreRef="defaultKeyStore" sslProtocol="TLSv1.2" />
<ssl id="memberConnectionConfig" keyStoreRef="defaultKeyStore" trustStoreRef="defaultKeyStore" sslProtocol="TLSv1.2" />
</server>
and since it is a requirement to build with JAXRS-1.1, I have simply added that as a dependency in maven. Maven's pom.xml dependency section look like this:
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>