ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1849050 - /webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java
Date Sun, 16 Dec 2018 22:58:34 GMT
Author: veithen
Date: Sun Dec 16 22:58:34 2018
New Revision: 1849050

URL: http://svn.apache.org/viewvc?rev=1849050&view=rev
Log:
Use TextDataSource.

Modified:
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java?rev=1849050&r1=1849049&r2=1849050&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java
Sun Dec 16 22:58:34 2018
@@ -26,6 +26,7 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.ds.jaxb.JAXBOMDataSource;
 import org.apache.axiom.om.util.jaxb.JAXBUtils;
+import org.apache.axiom.testutils.activation.TextDataSource;
 import org.apache.axiom.ts.AxiomTestCase;
 import org.apache.axiom.ts.jaxb.beans.DocumentBean;
 
@@ -40,7 +41,7 @@ public class TestUnmarshalWithDataHandle
         JAXBContext context = JAXBContext.newInstance(DocumentBean.class);
         DocumentBean orgBean = new DocumentBean();
         orgBean.setId("AB23498");
-        orgBean.setContent(new DataHandler("test content", "text/plain"));
+        orgBean.setContent(new DataHandler(new TextDataSource("test content", "utf-8", "plain")));
         OMElement element = factory.createOMElement(new JAXBOMDataSource(context, orgBean));
         DocumentBean bean = (DocumentBean)JAXBUtils.unmarshal(element, context, null, true);
         assertEquals(orgBean.getId(), bean.getId());



Mime
View raw message