I know that jax-rs 1.1
not supports upload directly and every application server has its own implementation to handle multipart/form-data
.
I can't realize how to do it with Websphere Liberty 17 using jax-rs 1.1 feature. jaxrs-2.0 feature I can't use because it conflicts with openidConnectClient-1.0
I understand that Websphere Liberty's solution to upload files based on Apache Wink but it doesn't recognize any of the following files: InMultiPart
or BufferedInMultiPart
as described here: Apache Wink : 7.8 MultiPart
Where am I wrong? Thank you.
You should be able to use the InMultiPart and BufferedInMultiPart APIs when using the jaxrs-1.1 feature. The knowledge center provides some instructions here: https://www.ibm.com/support/knowledgecenter/en/SSEQTP_8.5.5/com.ibm.websphere.base.doc/ae/twbs_jaxrs_multipartcontent.html
However, I suspect that the problem is resulting because your application does not specify the "third-party" API type. This is required in order to access APIs from non-IBM sources - in this case, Apache Wink. I don't think that this gotcha is well documented in the knowledge center (I will work with the IBM documentation team and try to improve the docs).
Can you check your server.xml file for something like this:
<application id="myApp" name="myApp" type="war" location="myApp.war">
<classloader apiTypeVisibility="spec, ibm-api, third-party" />
</application>
The apiTypeVisibility of "spec" and "ibm-api" are enabled by default, but "third-party" is not. Adding this line should allow your application to load the org.apache.wink.* classes.
Hope this helps, Andy