This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handle SOAP Message

 
Shankar sanjay
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Vivek sri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ivan,

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

Vivek Kumar
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Yes, that is also a viable approach!
Best wishes!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic