You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ga...@apache.org on 2006/03/22 06:18:31 UTC
svn commit: r387728 -
/webservices/axis/trunk/java/test/functional/TestWSA.java
Author: gawor
Date: Tue Mar 21 21:18:30 2006
New Revision: 387728
URL: http://svn.apache.org/viewcvs?rev=387728&view=rev
Log:
unix encoding, and let's use port > 1024
Modified:
webservices/axis/trunk/java/test/functional/TestWSA.java
Modified: webservices/axis/trunk/java/test/functional/TestWSA.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/test/functional/TestWSA.java?rev=387728&r1=387727&r2=387728&view=diff
==============================================================================
--- webservices/axis/trunk/java/test/functional/TestWSA.java (original)
+++ webservices/axis/trunk/java/test/functional/TestWSA.java Tue Mar 21 21:18:30 2006
@@ -1,69 +1,69 @@
-package test.functional;
-
-import junit.framework.TestCase;
-import org.apache.axis.client.AdminClient;
-import org.apache.axis.client.Call;
-import org.apache.axis.client.Service ;
-import org.apache.axis.encoding.XMLType;
-import org.apache.axis.utils.Options;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.namespace.QName;
-import org.apache.axis.transport.http.SimpleAxisServer ;
-
-/**
- * Test WSAddressing
- */
-public class TestWSA extends TestCase {
- public Call call = null ;
-
- public TestWSA(String s) {
- super(s);
- }
-
- /**
- * Sets up the WSA Async listener
- */
- protected void setUp() throws Exception {
- (new SimpleAxisServer()).startListening(88);
- AdminClient.main( new String[] { "samples/wsa/deploy.wsdd" } );
- }
-
- public void testWSA() throws Exception {
- Service service = new Service();
- Call call = (Call) service.createCall();
- Object rc = null ;
- String rcStr = null ;
-
- call.setTargetEndpointAddress( "http://localhost:8080/axis/services/wsaService");
- call.addParameter( "text", XMLType.XSD_STRING, ParameterMode.IN );
- call.setReturnType( XMLType.XSD_STRING );
- call.setEncodingStyle("");
-
- System.out.println( "Running non-WSA echo" );
- rc = call.invoke( "echo", new Object[] { "hi1" } );
- System.out.println( "rc: " + rc );
- assertEquals( rc, "hi1" );
-
- System.out.println( "Turning WSA on, and redoing echo" );
- call.setProperty( "useWSA", "true" );
- rc = call.invoke( "echo", new Object[] { "hi2" } );
- System.out.println( "rc: " + rc );
- assertEquals( rc, "hi2" );
- assertEquals( null, call.getMessageContext().getProperty("ASYNCRESPONSE") );
-
- System.out.println( "Setting wsa:ReplyTo to async" );
- call.setReplyTo( "http://localhost:88/axis/services/asyncService" );
- rc = call.invoke( "echo", new Object[] { "hi3" } );
- System.out.println( "rc: " + rc );
- assertEquals( rc, "hi3" );
- assertEquals( "true", call.getMessageContext().getProperty("ASYNCRESPONSE") );
-
- /*
- System.out.println( "Calling ping (one way)" );
- call.invokeOneWay( "ping", new Object[] { "hi" } );
-
- Thread.sleep(1000);
- */
- }
-
-}
+package test.functional;
+
+import junit.framework.TestCase;
+import org.apache.axis.client.AdminClient;
+import org.apache.axis.client.Call;
+import org.apache.axis.client.Service ;
+import org.apache.axis.encoding.XMLType;
+import org.apache.axis.utils.Options;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.namespace.QName;
+import org.apache.axis.transport.http.SimpleAxisServer ;
+
+/**
+ * Test WSAddressing
+ */
+public class TestWSA extends TestCase {
+ public Call call = null ;
+
+ public TestWSA(String s) {
+ super(s);
+ }
+
+ /**
+ * Sets up the WSA Async listener
+ */
+ protected void setUp() throws Exception {
+ (new SimpleAxisServer()).startListening(8888);
+ AdminClient.main( new String[] { "samples/wsa/deploy.wsdd" } );
+ }
+
+ public void testWSA() throws Exception {
+ Service service = new Service();
+ Call call = (Call) service.createCall();
+ Object rc = null ;
+ String rcStr = null ;
+
+ call.setTargetEndpointAddress( "http://localhost:8080/axis/services/wsaService");
+ call.addParameter( "text", XMLType.XSD_STRING, ParameterMode.IN );
+ call.setReturnType( XMLType.XSD_STRING );
+ call.setEncodingStyle("");
+
+ System.out.println( "Running non-WSA echo" );
+ rc = call.invoke( "echo", new Object[] { "hi1" } );
+ System.out.println( "rc: " + rc );
+ assertEquals( rc, "hi1" );
+
+ System.out.println( "Turning WSA on, and redoing echo" );
+ call.setProperty( "useWSA", "true" );
+ rc = call.invoke( "echo", new Object[] { "hi2" } );
+ System.out.println( "rc: " + rc );
+ assertEquals( rc, "hi2" );
+ assertEquals( null, call.getMessageContext().getProperty("ASYNCRESPONSE") );
+
+ System.out.println( "Setting wsa:ReplyTo to async" );
+ call.setReplyTo( "http://localhost:8888/axis/services/asyncService" );
+ rc = call.invoke( "echo", new Object[] { "hi3" } );
+ System.out.println( "rc: " + rc );
+ assertEquals( rc, "hi3" );
+ assertEquals( "true", call.getMessageContext().getProperty("ASYNCRESPONSE") );
+
+ /*
+ System.out.println( "Calling ping (one way)" );
+ call.invokeOneWay( "ping", new Object[] { "hi" } );
+
+ Thread.sleep(1000);
+ */
+ }
+
+}