Hi Sergey,
Like I mentioned before, I control the client making the request and
can set the content-type of the request to whatever I want.  I started
with it as application/octet-stream.  Right now I just have an
arbitrary value in there as a test, but I'm going to change it back,
because I think application/octet-stream is correct.

The extra bytes I'm seeing contain the other parts of the request,
including the content disposition, the content-type, the name, and the
filename.  The thing that makes this request is in Lua, a language I'm
not yet proficient at, so pardon me if I bumble a little.  I'm writing
a plugin for Adobe Photoshop Lightroom that will submit photos to my
application.

-Chris

On Thu, May 8, 2008 at 4:48 AM, Sergey Beryozkin
<[EMAIL PROTECTED]> wrote:
> Hi Chris
>
>
>
>  > Changing the parameters of the post method to be a byte array seemed
>  > to make things work much better, but the byte array contains more than
>  > just the file I'm sending.  Can I set up more parameters to separate
>  > things out?
>
>  What is the Content-Type of the request ? If it's multipart/* of some sort 
> then you'd likely see more than just
>  a byte array being uploaded. If not then what kind of extra bytes you're 
> seeing ?
>
>  Cheers, Sergey
>
>
>
>
>  >
>  > On Wed, May 7, 2008 at 1:00 PM, Chris Norris
>  > <[EMAIL PROTECTED]> wrote:
>  >> 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.
>  >>
>
>  ----------------------------
>  IONA Technologies PLC (registered in Ireland)
>  Registered Number: 171387
>  Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>

Reply via email to