| Subject: | Axiom not caching Datahandler after toString() | |
|---|---|---|
| From: | Srinath Perera (hema...@gmail.com) | |
| Date: | Jun 15, 2009 11:54:37 pm | |
| List: | org.apache.ws.axis-dev | |
Refine Search
| From | Sent On | Attachments |
|---|---|---|
| Srinath Perera | Jun 15, 2009 11:54 pm | |
| Andreas Veithen | Jun 16, 2009 12:27 am | |
| Srinath Perera | Jun 16, 2009 12:30 am | |
| Andreas Veithen | Jun 16, 2009 12:39 am | |
| Srinath Perera | Jun 16, 2009 12:43 am |
| Subject: | Axiom not caching Datahandler after toString() | |
|---|---|---|
| From: | Srinath Perera (hema...@gmail.com) | |
| Date: | Jun 15, 2009 11:54:37 pm | |
| List: | org.apache.ws.axis-dev | |
Hi All;
If we create a OM Element that do have a OMText which includes binary content represented as a "DataHandler", that binary content disappear after someone do a toString() on the OM Element. Following code recreate the problem. Could someone help me figuring out the problem?
Thanks very much Srinath
SOAPFactory factory = OMAbstractFactory.getSOAP11Factory(); OMNamespace ns = factory.createOMNamespace(ExpandingMessageFormatter.BINARY_CONTENT_QNAME.getNamespaceURI(), "ns"); OMElement omEle = factory.createOMElement(ExpandingMessageFormatter.BINARY_CONTENT_QNAME.getLocalPart(), ns);
InputStreamDataSource ds = new InputStreamDataSource(in); DataHandler dataHandler = new DataHandler(ds);
//create an OMText node with the above DataHandler and set optimized to true OMText textData = factory.createOMText(dataHandler, true); textData.setBinary(true); omEle.addChild(textData);
System.out.println(omEle.toString()); System.out.println(omEle);
-- ============================ Srinath Perera: WSO2 Inc. http://wso2.com Blog: http://srinathsview.blogspot.com/

