Author: veithen
Date: Mon May  2 13:13:00 2016
New Revision: 1741978

URL: http://svn.apache.org/viewvc?rev=1741978&view=rev
Log:
Remove unnecessary code.

Modified:
    axis/axis2/java/core/trunk/modules/json/test/org/apache/axis2/json/Echo.java

Modified: 
axis/axis2/java/core/trunk/modules/json/test/org/apache/axis2/json/Echo.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/json/test/org/apache/axis2/json/Echo.java?rev=1741978&r1=1741977&r2=1741978&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/json/test/org/apache/axis2/json/Echo.java 
(original)
+++ 
axis/axis2/java/core/trunk/modules/json/test/org/apache/axis2/json/Echo.java 
Mon May  2 13:13:00 2016
@@ -19,9 +19,7 @@
 
 package org.apache.axis2.json;
 
-import org.apache.axiom.om.OMDataSource;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMSourcedElement;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.context.MessageContext;
@@ -35,8 +33,7 @@ public class Echo {
 
     public OMElement echoOM(OMElement omEle) throws AxisFault {
         MessageContext outMsgCtx = 
MessageContext.getCurrentMessageContext().getOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
-        Object object = 
outMsgCtx.getProperty(Constants.Configuration.MESSAGE_TYPE);
-        String messageType = (String) object;
+        String messageType = 
(String)outMsgCtx.getProperty(Constants.Configuration.MESSAGE_TYPE);
 
         //if the request is through GET, the message type is application/xml. 
otherwise don't allow
         //any non json specific message types
@@ -45,9 +42,6 @@ public class Echo {
         } else if (messageType.indexOf("json") < 0) {
             throw new AxisFault("Type of the Received Message is not JSON");
         }
-        OMDataSource omdataOSuce = ((OMSourcedElement) omEle).getDataSource();
-        OMElement newOmEle = (OMElement) omEle.detach();
-        ((OMSourcedElement) newOmEle).setDataSource(omdataOSuce);
         return omEle;
     }
 }


Reply via email to