Hello, I would like for a ws client to retrieve an image from a ws endpoint. I am totally confused as to how to what encoding style to choose as well as how to implement it.
Here is the code for the client:
Here is the code for the endpoint:
If I choose documentliteral it will not compile and give me the following error message: ************** Attachment types are not supported in literal mode - Type: "javax.activation.DataHandler" **************
If I choose nothing (which defaults to encoded in Netbeans) It does compile but when I test the operation, I get this from JBOss 4.0.4:
Thanks for the tip. I had a look at the article and here is what I tried to do:
I use a handler in order to attach the image. Whether I attach the attachment from within the service implementation or a handler is the same. Here is my handleResponse method:
Then I try to recover the attachment in the client using pretty much the same way as in the article:
This always yields a nullpointerexception on the collection object.