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 ja...@apache.org on 2005/07/11 13:17:08 UTC

svn commit: r210097 - in /webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/integrationTesting: ./ ClientAPITest1.java

Author: jayachandra
Date: Mon Jul 11 04:17:04 2005
New Revision: 210097

URL: http://svn.apache.org/viewcvs?rev=210097&view=rev
Log: (empty)

Added:
    webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/integrationTesting/
    webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/integrationTesting/ClientAPITest1.java

Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/integrationTesting/ClientAPITest1.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/integrationTesting/ClientAPITest1.java?rev=210097&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/integrationTesting/ClientAPITest1.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/jaxws/test/org/apache/axis/jaxrpc/integrationTesting/ClientAPITest1.java Mon Jul 11 04:17:04 2005
@@ -0,0 +1,41 @@
+package org.apache.axis.jaxrpc.integrationTesting;
+
+import junit.framework.TestCase;
+
+import javax.xml.namespace.QName;
+import java.net.URL;
+import javax.xml.rpc.ServiceFactory;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.ParameterMode;
+
+public class ClientAPITest1 extends TestCase {
+
+	public static void main(String[] args) {
+	}
+
+	public ClientAPITest1(String name) {
+		super(name);
+	}
+	
+	public void testDII() {
+		try {
+			ServiceFactory sf = ServiceFactory.newInstance();
+			Service s = sf.createService(new URL(getTestResourceDirectory()+ "/Echo.wsdl") , new QName("EchoService"));
+			
+			Call call = s.createCall();
+			call.addParameter("param1", new QName("Here the URL for XSD should be given","string"), java.lang.String.class, ParameterMode.IN);
+			call.setReturnType(new QName("URL of XSD","string"), String.class);
+			Object[] inParams = new Object[]{"hello World!"};
+			String response = (String) call.invoke(inParams);
+			assertEquals("hello World!",response);
+		}catch (Exception e) {
+			fail(e.getMessage());
+		}
+	}
+	
+	private String getTestResourceDirectory() {
+		return "C:\\workspace\\3.1Workspace\\JAXRPC2_Work\\test-resources";
+	}
+
+}