Create File Annotated API

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Create File Annotated API

Michele Mauro
My controller method for the @PutChild annotation has the following signature:

@PutChild
public
EgResource createFile(EgCollection parent, String name, byte[] bytes, Long length, String contentType, io.milton.http.Request request) throws NotAuthorizedException

But I find on the logs these messages:

10:45:10.708 [qtp1385514529-17] INFO  i.m.h.a.AnnotationResourceFactory - Unknown parameter type: class java.lang.Long
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory - Available types are:
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - interface io.milton.http.Request
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - interface io.milton.http.Response
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - null
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - null
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.709 [qtp1385514529-17] WARN  i.m.h.a.AnnotationResourceFactory - Could not resolve parameter: 3  in method: createFile
10:45:10.709 [qtp1385514529-17] INFO  i.m.h.a.AnnotationResourceFactory - Unknown parameter type: class java.lang.String
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory - Available types are:
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - interface io.milton.http.Request
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - interface io.milton.http.Response
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - null
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - null
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.709 [qtp1385514529-17] WARN  i.m.h.a.AnnotationResourceFactory - Could not resolve parameter: 4  in method: createFile

What values are passed to the @PutChild annotated method?

Michele Mauro


--
Michele Mauro
Chief Technology Officier
Visionest S.r.l. - Process Innovation
Via G.B. Ricci 6/A
35131 Padova - Italy

E-mail: [hidden email]
Mobile: +39 349 2222319
Phone: +39 049 8210229
Fax: +39 049 8774924

_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users
Reply | Threaded
Open this post in threaded view
|

Re: Create File Annotated API

bradmacnz

Your method signature looks correct. Its possible that the content length header is not being set by the client. Is this related to your other email about files being truncated to 8Mb?

On 13/05/14 04:15, Michele Mauro wrote:
My controller method for the @PutChild annotation has the following signature:

@PutChild
public
EgResource createFile(EgCollection parent, String name, byte[] bytes, Long length, String contentType, io.milton.http.Request request) throws NotAuthorizedException

But I find on the logs these messages:

10:45:10.708 [qtp1385514529-17] INFO  i.m.h.a.AnnotationResourceFactory - Unknown parameter type: class java.lang.Long
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory - Available types are:
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - interface io.milton.http.Request
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - interface io.milton.http.Response
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - null
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - null
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.708 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.709 [qtp1385514529-17] WARN  i.m.h.a.AnnotationResourceFactory - Could not resolve parameter: 3  in method: createFile
10:45:10.709 [qtp1385514529-17] INFO  i.m.h.a.AnnotationResourceFactory - Unknown parameter type: class java.lang.String
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory - Available types are:
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - interface io.milton.http.Request
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - interface io.milton.http.Response
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - null
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - null
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class it.warda.webdavip.egresources.EgCollection
10:45:10.709 [qtp1385514529-17] DEBUG i.m.h.a.AnnotationResourceFactory -  - class io.milton.http.annotated.AnnoCollectionResource
10:45:10.709 [qtp1385514529-17] WARN  i.m.h.a.AnnotationResourceFactory - Could not resolve parameter: 4  in method: createFile

What values are passed to the @PutChild annotated method?

Michele Mauro


--
Michele Mauro
Chief Technology Officier
Visionest S.r.l. - Process Innovation
Via G.B. Ricci 6/A
35131 Padova - Italy

E-mail: [hidden email]
Mobile: +39 349 2222319
Phone: +39 049 8210229
Fax: +39 049 8774924


_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users


_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users