Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DataHandler with Axis2

 
Esther Capilla
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'm trying to use DataHandler with axis2, I've seen some example and I use the following code...
To build OMElement with DataHandler:
DataHandler dataHandler;
FileDataSource dataSource = new FileDataSource(archivo);
dataHandler = new DataHandler(dataSource);
OMText textData = fac.createOMText(dataHandler, true);
file.addChild(textData);

And to obtain the DataHandler in the Client:
file = elementhijo.getFirstElement();
OMText binaryNode = (OMText) file.getFirstOMChild();
DataHandler dataHandler;
dataHandler = (DataHandler) binaryNode.getDataHandler();

To obtain the Element file, I verify that it is the correct element, but I obtain a Class Cast Exception in the line "OMText binaryNode = (OMText) file.getFirstOMChild();" to try convert a OMElement to OMText.

can help me somebody?
Thanks in advance!
Esther
 
Esther Capilla
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for the efficient way to send archives, and I'm tryin that way (Datahandler), but someone know other way to send archives...
Can help me somebody?

Thanks!
Esther
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!