I'm trying to enable my service to accept a file.  I control the
client making the request, so I can set the content-type to be
anything I want it to be.  I'm new to CXF and have a service running
so far that can accept GET requests just fine and send back some XML.
I'm not really sure where to start with this, though.  So far I have a
cxf.xml that looks like this:

  <jaxrs:server id="backdropService" address="/backdrop/">
    <jaxrs:serviceBeans>
      <bean class="collective.services.backdrop.BackdropService" />
    </jaxrs:serviceBeans>
  </jaxrs:server>

My service class looks like this:

@ProduceMime(value="text/xml")
@Path("/backdropservice/")
public class BackdropService
{
        public BackdropService(){}

        @GET
        @Path("/profiles/")
        public WSUploadProfileCollection getProfiles()
        {
                return new 
WSUploadProfileCollection(UploadProfileAccessor.getInstance().getPhotoProfiles());
        }

        @GET
        @Path("/something/{message}/")
        public Something getSomething(@PathParam("message") String txt)
        {
                return new Something(txt);
        }

        @POST
        @Path("/upload/")
        public WSUploadResponse postUpload(Object photo)
        {
                return new WSUploadResponse();
        }

}


The last method is the one I'm working on, but I don't know what sort
of Object to use or where to start looking in the documentation.

Reply via email to