• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SAAJ Query

 
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am currently trying to write code to learn SAAJ.
I have written SAAJ Client code. My Client code creates an attachment and attach it to SOAP Request message.

Now I need to write SAAJ Server side code which extract this SOAP attachment and read it.
Please help me in writing this SAAJ Server side.

Thanks
Abhay Agarwal
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just want to clarify more ..

First of all , I wrote a sample web service (let us say - multiply two numbers) . Then I published that code using Endpoint publisher.

After that, I wrote a SAAJ Client based code. And in that code, I wrote code to add Attachment.



Now how can I modify my Web Service implementation code to read SOAP attachment (attached in SAAj Client)?

Thanks
Abhay
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what about:

Regards,
Frits
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Frits for the reply.

I did not knew we can directly have an input parameter of SOAPMessage type.


I shall definitely give it a try once I reaches home today.

Thanks
Abhay Agarwal
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got SAAJ example working end to end ... First client send attachment to Server. Server read the attachment and then send SOAP Response back to Client with another attachment. Client read the attachment from Server response.

~ abhay
 
Frits Walraven
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Abhay Agarwal wrote:I got SAAJ example working end to end ... First client send attachment to Server. Server read the attachment and then send SOAP Response back to Client with another attachment. Client read the attachment from Server response.


Great! It would be nice if you could post your code here.
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Server code



Code to publish this Server



Client code




Console Output from Client side code




Console output from Server code


 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frits

I have posted my sample code here. It shall be helpful for any one having similiar query.

Btw, any specific reason for your request to post sample code here.

Thanks

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic