• 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

Axis2 - Transfer document using MTOM

 
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to transfer content using MTOM. The service sends some file (say PDF file) and client saves that file on the disk.

The service does the following




and client does the following



But in client, the "handler" is coming out to be null.

WSDL is as follows



Please help me in resolving this.

Thank you
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It got solved by changing the client to

public static void getResumeContent(String resumeId) throws AxisFault {
System.out.println("Resume ID is getResumeContent --"+resumeId);
try {
ResumeServiceStub rs = new ResumeServiceStub();
rs = new ResumeServiceStub("http://localhost:1234/axis2/services/ResumeService");
GetResumeContent grc = new GetResumeContent();
grc.setResumeId(resumeId);
GetResumeContentResponse grcr = rs.getResumeContent(grc);
DataHandler handler = grcr.getContent();
InputStream is = handler.getInputStream();
writeToFile("abc.pdf", is);
}catch(IOException io) {
io.printStackTrace();
}

}

thank you
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic