I am writing a Java client that needs to upload a file to a server using a REST post. I have a schema for information that is to be sent along with the file, but the file itself is to be sent as an Attachment to the message. The server is not written in Java and I don't have (easy) access to the source.
How do I go about creating the post message in CXF? I found a similar SO question but it seems to use Jersey-specific classes that I can't find in CXF. CXF is already being used in the project so I'd prefer to use it, but I could use another library if required.
In case it's not obvious this is the first time I've worked with a REST service.