You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ja...@apache.org on 2005/07/21 14:22:03 UTC
svn commit: r220044 - in
/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc:
client/CallTesting.java server/ server/Readme.txt
server/ServerTestingPurposeClient.java
Author: jayachandra
Date: Thu Jul 21 05:22:02 2005
New Revision: 220044
URL: http://svn.apache.org/viewcvs?rev=220044&view=rev
Log: (empty)
Added:
webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/
webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/Readme.txt
webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/ServerTestingPurposeClient.java
Modified:
webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/client/CallTesting.java
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/client/CallTesting.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/client/CallTesting.java?rev=220044&r1=220043&r2=220044&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/client/CallTesting.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/client/CallTesting.java Thu Jul 21 05:22:02 2005
@@ -16,7 +16,7 @@
import org.apache.axis.jaxrpc.client.ServiceImpl;
import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMOutput;
+import org.apache.axis2.om.impl.OMOutputImpl;
import junit.framework.TestCase;
@@ -43,7 +43,7 @@
try {
OutputStream fos = new BufferedOutputStream(System.out);
- OMOutput otpt = new OMOutput(fos, false);
+ OMOutputImpl otpt = new OMOutputImpl(fos, false);
response.serialize(otpt);
fos.flush();
otpt.flush();
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/Readme.txt
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/Readme.txt?rev=220044&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/Readme.txt (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/Readme.txt Thu Jul 21 05:22:02 2005
@@ -0,0 +1,5 @@
+Hey! this test works only if on the server side the version.aar provided
+in our test-resources directory is deployed. That in turn would need us
+to make available org.apache.axis.jaxrpc.server.JAXRPCInOutMessageReceiver
+class file to the server class loader. Because, in that version.aar we coded
+in the service.xml to pick this message receiver.
\ No newline at end of file
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/ServerTestingPurposeClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/ServerTestingPurposeClient.java?rev=220044&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/ServerTestingPurposeClient.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/server/ServerTestingPurposeClient.java Thu Jul 21 05:22:02 2005
@@ -0,0 +1,61 @@
+package org.apache.axis.jaxrpc.server;
+
+//import java.net.URL;
+
+
+import java.io.BufferedOutputStream;
+import java.io.OutputStream;
+import java.io.FileOutputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ParameterMode;
+//import javax.xml.rpc.ServiceFactory;
+
+import org.apache.axis.jaxrpc.client.ServiceImpl;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.impl.OMOutputImpl;
+
+import junit.framework.TestCase;
+
+public class ServerTestingPurposeClient extends TestCase {
+
+ public static void main(String[] args) {
+ }
+
+ public ServerTestingPurposeClient(String name) {
+ super(name);
+ }
+
+ public void testInvoke1() {
+ try {
+
+ Service s = new ServiceImpl();
+ Call call = s.createCall();
+ call.setOperationName(new QName("http://testingURL.org/","getVersion"));
+ call.setTargetEndpointAddress("http://localhost:9090/axis2/services/Version");
+ call.addParameter("param1", new QName("http://www.w3.org/2001/XMLSchema","any"), java.lang.Object.class, ParameterMode.IN);
+ call.setReturnType(new QName("http://www.w3.org/2001/XMLSchema","any"), Object.class);
+ Object[] inParams = new Object[]{"hello World!"};
+ OMElement response = (OMElement)call.invoke(inParams);
+
+ try {
+ OutputStream fos = new BufferedOutputStream(System.out);
+ OMOutputImpl otpt = new OMOutputImpl(fos, false);
+ response.serialize(otpt);
+ fos.flush();
+ otpt.flush();
+ } catch (Exception e){}
+
+ String resultString = response.getText();
+ assertEquals("This is just to show that on " +
+ "the server side the JAXRPCInOutMessageReceiver is chosen by " +
+ "Axis!" , resultString);
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ fail(e.getMessage());
+ }
+ }
+}