aspose file tools
The moose likes Web Services Certification (SCDJWS/OCPJWSD) and the fly likes Handle SOAP Message Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCPJWSD)
Reply Bookmark "Handle SOAP Message" Watch "Handle SOAP Message" New topic
Author

Handle SOAP Message

Shankar sanjay
Ranch Hand

Joined: Sep 14, 2009
Posts: 103
Hi,

I have a simple requirement, like

I have to receive attachments from SOAP message and save it in a local machine. I am not quite clear how to handle it in server side using jax-ws 2.0, can you please tell me where can i find a sample? i am using RAD 7.5

there are lot of example which tells how to send (client side) soap message with attachment, but i want to server side, how to receive at the server end.

Could you please provide some suggestion?

Regards,
Sankar. S
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
If you want to handle SOAP messages with attachments on the server side, your endpoint implementation class should implement the javax.xml.ws.Provider interface with the generic type SOAPMessage. Example:

The invoke method will receive a parameter of the type SOAPMessage. Using SAAJ you can then retrieve the attachment(s) of the SOAP message.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Vivek sri
Greenhorn

Joined: Mar 03, 2008
Posts: 4
Hi Ivan,

Can we use SOAPHandler and SAAJ API to retrieve SOAP Attachment at server side?

Vivek Kumar
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
Yes, that is also a viable approach!
Best wishes!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Handle SOAP Message
 
Similar Threads
Ws Policy for Wss4j
SOAP with Attachment in WebSphere 5.1.1 :argh:
SOAP.... Help pls
digest value mismatch and disabling pretty printing/formatting of soap message
Webservices-need help