aspose file tools*
The moose likes Web Services and the fly likes Axis2 - Transfer document using MTOM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2 - Transfer document using MTOM" Watch "Axis2 - Transfer document using MTOM" New topic
Author

Axis2 - Transfer document using MTOM

Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
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

Joined: Jun 29, 2005
Posts: 279
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Axis2 - Transfer document using MTOM
 
Similar Threads
Axis2 - Transfer document using MTOM
Client for Axis2 POJO webservice giving error
Axis2- enable security using Rampart
WSDL - One way operations
Axis2 - Handlers for SOAP headers