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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 39573
    
  27
This SAAJ introduction has a section specifically about transferring images.


Ping & DNS - updated with new look and Ping home screen widget
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: 39573
    
  27
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Beginner needs help with SOAP with attachments
 
Similar Threads
Soap & attachments: encoded or literal??
Question about design of WS clients and their handlers
reading soap-envelop messages
Objects, web services and netbeans
SOAP with attachments, 3 questions