You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by sa...@apache.org on 2012/05/30 12:30:51 UTC
svn commit: r1344188 - in
/axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp:
TCPEchoRawXMLTest.java TCPTwoChannelEchoRawXMLTest.java
Author: sagara
Date: Wed May 30 10:30:51 2012
New Revision: 1344188
URL: http://svn.apache.org/viewvc?rev=1344188&view=rev
Log:
AXIS2-5315 - Removed Callback usage from Transport project.
Modified:
axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp/TCPEchoRawXMLTest.java
axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp/TCPTwoChannelEchoRawXMLTest.java
Modified: axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp/TCPEchoRawXMLTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp/TCPEchoRawXMLTest.java?rev=1344188&r1=1344187&r2=1344188&view=diff
==============================================================================
--- axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp/TCPEchoRawXMLTest.java (original)
+++ axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp/TCPEchoRawXMLTest.java Wed May 30 10:30:51 2012
@@ -34,8 +34,7 @@ import org.apache.axis2.addressing.Endpo
import org.apache.axis2.client.OperationClient;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.client.async.AsyncResult;
-import org.apache.axis2.client.async.Callback;
+import org.apache.axis2.client.async.AxisCallback;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.context.MessageContext;
@@ -113,10 +112,10 @@ public class TCPEchoRawXMLTest extends T
options.setTransportInProtocol(Constants.TRANSPORT_TCP);
options.setAction(Constants.AXIS2_NAMESPACE_URI + "/" + operationName.getLocalPart());
- Callback callback = new Callback() {
- public void onComplete(AsyncResult result) {
+ AxisCallback callback = new AxisCallback() {
+ public void onComplete(MessageContext msgCtx) {
try {
- result.getResponseEnvelope().serialize(StAXUtils
+ msgCtx.getEnvelope().serialize(StAXUtils
.createXMLStreamWriter(System.out));
} catch (XMLStreamException e) {
onError(e);
@@ -129,6 +128,18 @@ public class TCPEchoRawXMLTest extends T
log.info(e.getMessage());
finish = true;
}
+
+ public void onComplete() {
+
+ }
+
+ public void onFault(MessageContext msgCtx) {
+ onComplete(msgCtx);
+ }
+
+ public void onMessage(MessageContext msgCtx) {
+ onComplete(msgCtx);
+ }
};
ServiceClient sender = new ServiceClient(configContext, clientService);
Modified: axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp/TCPTwoChannelEchoRawXMLTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp/TCPTwoChannelEchoRawXMLTest.java?rev=1344188&r1=1344187&r2=1344188&view=diff
==============================================================================
--- axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp/TCPTwoChannelEchoRawXMLTest.java (original)
+++ axis/axis2/java/transports/trunk/modules/tcp/test/org/apache/axis2/transport/tcp/TCPTwoChannelEchoRawXMLTest.java Wed May 30 10:30:51 2012
@@ -31,9 +31,9 @@ import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.client.async.AsyncResult;
-import org.apache.axis2.client.async.Callback;
+import org.apache.axis2.client.async.AxisCallback;
import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.util.Utils;
import org.apache.commons.logging.Log;
@@ -99,10 +99,10 @@ public class TCPTwoChannelEchoRawXMLTest
options.setTransportInProtocol(Constants.TRANSPORT_TCP);
options.setUseSeparateListener(true);
options.setAction(operationName.getLocalPart());
- Callback callback = new Callback() {
- public void onComplete(AsyncResult result) {
+ AxisCallback callback = new AxisCallback() {
+ public void onComplete(MessageContext msgCtx) {
try {
- result.getResponseEnvelope().serializeAndConsume(StAXUtils
+ msgCtx.getEnvelope().serializeAndConsume(StAXUtils
.createXMLStreamWriter(System.out));
} catch (XMLStreamException e) {
onError(e);
@@ -115,6 +115,18 @@ public class TCPTwoChannelEchoRawXMLTest
log.info(e.getMessage());
finish = true;
}
+
+ public void onComplete() {
+
+ }
+
+ public void onFault(MessageContext msgCtx) {
+ onComplete(msgCtx);
+ }
+
+ public void onMessage(MessageContext msgCtx) {
+ onComplete(msgCtx);
+ }
};
AxisService serviceClient =