| Author |
DataHandler with Axis2
|
Esther Capilla
Greenhorn
Joined: Jan 25, 2007
Posts: 12
|
|
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
Joined: Jan 25, 2007
Posts: 12
|
|
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
|
 |
 |
|
|
subject: DataHandler with Axis2
|
|
|