aspose file tools*
The moose likes Web Services and the fly likes Beginner needs help with SOAP with attachments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Beginner needs help with SOAP with attachments" Watch "Beginner needs help with SOAP with attachments" New topic
Author

Beginner needs help with SOAP with attachments

Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
Hello,

I would like for a ws client to retrieve an image from a ws endpoint. I am totally confused as 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:



Here is the wsdl:



Any help greatly appreciated.

Thanks in advance,

Julien.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41874
    
  63
This SAAJ introduction has a section specifically about transferring images.


Ping & DNS - my free Android networking tools app
Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
Hello Ulf,
I knew of the documentation you indicated and unfortunately it only deals with standalone clients... Here as you may have noticed my WS client is a servlet and it does not have access to the soap message. Only a handler would have access to the soap message and I could easily retrieve the attachment with a handler but then how do I make the attachment available to the servlet??
Any other idea?
Julien.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41874
    
  63
Whether a client is a standalone application or a web application makes no difference for the SOAP connection.

All WS implementations let you access the SOAP message in some way or other, at what point the SAAJ API can be used. If the objects you're working with don't provide that access, then it shouldn't be too hard to add that.
[ May 31, 2006: Message edited by: Ulf Dittmer ]
 
jQuery in Action, 2nd edition
 
subject: Beginner needs help with SOAP with attachments