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 ve...@apache.org on 2012/02/29 22:15:07 UTC
svn commit: r1295277 - in /axis/axis1/java/trunk: axis-ant/
axis-ant/src/test/ant/literal/ axis-ant/src/test/java/test/wsdl/literal/
axis-ant/src/test/wsdl/literal/ test/wsdl/literal/
Author: veithen
Date: Wed Feb 29 21:15:07 2012
New Revision: 1295277
URL: http://svn.apache.org/viewvc?rev=1295277&view=rev
Log:
Mavenized test.wsdl.literal. Removed the code that actually invokes the service because it is an external service that no longer exists.
Added:
axis/axis1/java/trunk/axis-ant/src/test/ant/literal/
axis/axis1/java/trunk/axis-ant/src/test/ant/literal/build.xml
- copied, changed from r1293809, axis/axis1/java/trunk/test/wsdl/literal/build.xml
axis/axis1/java/trunk/axis-ant/src/test/java/test/wsdl/literal/
axis/axis1/java/trunk/axis-ant/src/test/java/test/wsdl/literal/SalesRankNPrice_ServiceTestCase.java
- copied, changed from r1293809, axis/axis1/java/trunk/test/wsdl/literal/SalesRankNPrice_ServiceTestCase.java
axis/axis1/java/trunk/axis-ant/src/test/wsdl/literal/
axis/axis1/java/trunk/axis-ant/src/test/wsdl/literal/SalesRankNPrice.wsdl
- copied unchanged from r1293809, axis/axis1/java/trunk/test/wsdl/literal/SalesRankNPrice.wsdl
Removed:
axis/axis1/java/trunk/test/wsdl/literal/
Modified:
axis/axis1/java/trunk/axis-ant/pom.xml
Modified: axis/axis1/java/trunk/axis-ant/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis-ant/pom.xml?rev=1295277&r1=1295276&r2=1295277&view=diff
==============================================================================
--- axis/axis1/java/trunk/axis-ant/pom.xml (original)
+++ axis/axis1/java/trunk/axis-ant/pom.xml Wed Feb 29 21:15:07 2012
@@ -69,6 +69,7 @@
<ant antfile="src/test/ant/extra/build.xml" target="test" inheritrefs="true" />
<ant antfile="src/test/ant/filegen/build.xml" target="test" inheritrefs="true" />
<ant antfile="src/test/ant/header/build.xml" target="test" inheritrefs="true" />
+ <ant antfile="src/test/ant/literal/build.xml" target="test" inheritrefs="true" />
<ant antfile="src/test/ant/qname/build.xml" target="test" inheritrefs="true" />
</target>
</configuration>
Copied: axis/axis1/java/trunk/axis-ant/src/test/ant/literal/build.xml (from r1293809, axis/axis1/java/trunk/test/wsdl/literal/build.xml)
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis-ant/src/test/ant/literal/build.xml?p2=axis/axis1/java/trunk/axis-ant/src/test/ant/literal/build.xml&p1=axis/axis1/java/trunk/test/wsdl/literal/build.xml&r1=1293809&r2=1295277&rev=1295277&view=diff
==============================================================================
--- axis/axis1/java/trunk/test/wsdl/literal/build.xml (original)
+++ axis/axis1/java/trunk/axis-ant/src/test/ant/literal/build.xml Wed Feb 29 21:15:07 2012
@@ -1,86 +1,16 @@
<?xml version="1.0" ?>
-<!DOCTYPE project [
- <!ENTITY properties SYSTEM "../../../xmls/properties.xml">
- <!ENTITY paths SYSTEM "../../../xmls/path_refs.xml">
- <!ENTITY taskdefs SYSTEM "../../../xmls/taskdefs.xml">
- <!ENTITY taskdefs_post_compile SYSTEM "../../../xmls/taskdefs_post_compile.xml">
- <!ENTITY targets SYSTEM "../../../xmls/targets.xml">
-]>
-
-<!-- ===================================================================
-<description>
- Test/Sample Component file for Axis
-
-Notes:
- This is a build file for use with the Jakarta Ant build tool.
-
-Prerequisites:
-
- jakarta-ant from http://jakarta.apache.org
-
-Build Instructions:
- To compile
- ant compile
- To execute
- ant run
-
-Author:
- Matt Seibert mseibert@us.ibm.com
-
-Copyright:
- Copyright (c) 2002-2003 Apache Software Foundation.
-</description>
-==================================================================== -->
-
-<project default="compile">
-
-<property name="axis.home" location="../../.." />
-<property name="componentName" value="test/wsdl/literal" />
- &properties;
- &paths;
- &taskdefs;
- &taskdefs_post_compile;
- &targets;
-
-<target name="clean">
- <echo message="Removing ${build.dir}/classes/${componentName} and ${build.dir}/work/${componentName}" />
- <delete dir="${build.dir}/classes/${componentName}"/>
- <delete dir="${build.dir}/work/${componentName}"/>
-</target>
-
-<target name="copy" depends="setenv"/>
-
-<target name="compile" depends="copy">
- <echo message="Compiling test.wsdl.literal"/>
-
+<project>
+ <target name="test">
<!--
remote version of the WSDL
<wsdl2java url="http://www.perfectxml.net/WebServices/SalesRankNPrice/BookService.asmx?WSDL"
-->
- <wsdl2java url="${axis.home}/test/wsdl/literal/SalesRankNPrice.wsdl"
- output="${axis.home}/build/work"
+ <wsdl2java url="src/test/wsdl/literal/SalesRankNPrice.wsdl"
+ output="${project.build.directory}/work"
verbose="no"
serverSide="no"
testcase="no">
<mapping namespace="http://www.PerfectXML.com/NETWebSvcs/BookService" package="test.wsdl.literal"/>
</wsdl2java>
-
- <copy todir="${build.dir}/work/test/wsdl/literal" overwrite="yes">
- <fileset dir="${axis.home}/test/wsdl/literal">
- <include name="*TestCase.java"/>
- <include name="*Impl.java"/>
- </fileset>
- </copy>
-
- <javac srcdir="${build.dir}/work" destdir="${build.dest}" nowarn="${nowarn}" source="${source}" fork="${javac.fork}"
- debug="${debug}">
- <classpath refid="classpath" />
- <include name="test/wsdl/literal/*.java" />
- </javac>
-</target>
-
-<target name="run" >
- <antcall target="execute-Component" />
-</target>
-
+ </target>
</project>
Copied: axis/axis1/java/trunk/axis-ant/src/test/java/test/wsdl/literal/SalesRankNPrice_ServiceTestCase.java (from r1293809, axis/axis1/java/trunk/test/wsdl/literal/SalesRankNPrice_ServiceTestCase.java)
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis-ant/src/test/java/test/wsdl/literal/SalesRankNPrice_ServiceTestCase.java?p2=axis/axis1/java/trunk/axis-ant/src/test/java/test/wsdl/literal/SalesRankNPrice_ServiceTestCase.java&p1=axis/axis1/java/trunk/test/wsdl/literal/SalesRankNPrice_ServiceTestCase.java&r1=1293809&r2=1295277&rev=1295277&view=diff
==============================================================================
--- axis/axis1/java/trunk/test/wsdl/literal/SalesRankNPrice_ServiceTestCase.java (original)
+++ axis/axis1/java/trunk/axis-ant/src/test/java/test/wsdl/literal/SalesRankNPrice_ServiceTestCase.java Wed Feb 29 21:15:07 2012
@@ -10,50 +10,10 @@
package test.wsdl.literal;
-import org.apache.axis.AxisFault;
-
import java.io.File;
import java.io.IOException;
-import java.net.URL;
public class SalesRankNPrice_ServiceTestCase extends junit.framework.TestCase {
-
- public static URL url;
-
- public SalesRankNPrice_ServiceTestCase(String name) {
- super(name);
- }
-
- private void printit(String result) {
- System.out.println("Result: " + result);
- }
-
- private void printit(SalesRankNPrice1 r) {
- System.out.println("price: " + r.getPrice());
- System.out.println("rank: " + r.getSalesRank());
- }
-
- private void printit(Prices p) {
- System.out.println(
- " Amazon price:" + p.getAmazonPrice() + "\n" +
- " BN price:" + p.getBNPrice() );
- }
-
- private void printit(SalesRanks s) {
- System.out.println(
- " Amazon rank:" + s.getAmazonSalesRank() + "\n" +
- " BN rank:" + s.getBNSalesRank());
- }
-
- private void printit(All all) {
- System.out.println(
- " Amazon price:" + all.getAmazonPrice() + "\n" +
- " Amazon rank:" + all.getAmazonSalesRank() + "\n" +
- " BN price:" + all.getBNPrice() + "\n" +
- " BN rank:" + all.getBNSalesRank());
-
- }
-
// List of files which should be generated
private static String[] shouldExist= new String[] {
"SalesRankNPrice1.java",
@@ -94,7 +54,8 @@ public class SalesRankNPrice_ServiceTest
};
public void testFileGen() throws IOException {
- String rootDir = "build"+ File.separator + "work" + File.separator +
+ String rootDir = System.getProperty("basedir", ".") + File.separator +
+ "target" + File.separator + "work" + File.separator +
"test" + File.separator + "wsdl" + File.separator + "literal";
// open up the output directory and check what files exist.
File outputDir = new File(rootDir);
@@ -111,59 +72,4 @@ public class SalesRankNPrice_ServiceTest
assertTrue("File exist (and it should NOT): " + shouldNotExist[i], !f.exists());
}
}
-
- public void testSalesRankNPriceSoap() {
- // This is the book to look up...
- // "Building Web Services With Java" :)
- java.lang.String ISBN = "0672321815";
-
- boolean debug = true;
-
- SalesRankNPriceSoap binding;
- try {
- if (url != null)
- binding = new SalesRankNPriceLocator().getSalesRankNPriceSoap(url);
- else
- binding = new SalesRankNPriceLocator().getSalesRankNPriceSoap();
- } catch (javax.xml.rpc.ServiceException jre) {
- throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre );
- }
-
- assertTrue("binding is null", binding != null);
-
- try {
- printit(binding.getAmazonSalesRank(ISBN));
- printit(binding.getAmazonUKSalesRank(ISBN));
- //printit(binding.getBNSalesRank(ISBN));
- printit(binding.getAmazonPrice(ISBN));
- printit(binding.getAmazonUKPrice(ISBN));
- printit(binding.getBNPrice(ISBN));
- printit(binding.getAmazonSalesRankNPrice(ISBN));
- printit(binding.getBNSalesRankNPrice(ISBN));
- printit(binding.getAmazonAndBNSalesRank(ISBN));
- printit(binding.getAmazonAndBNPrice(ISBN));
- printit(binding.getAll(ISBN));
- } catch (java.rmi.RemoteException re) {
- if (!(re instanceof AxisFault &&
- ((((AxisFault) re).detail instanceof java.net.ConnectException)||
- (((AxisFault) re).getFaultCode().getLocalPart().equals("HTTP"))))) {
- throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re );
- } else {
- // A connection exception has been detected so report this and make the test succeed.
- printit("Connect failure caused some of SalesRankNPrice_ServiceTestCase to be skipped.");
- }
- }
- }
-
- public static void main(String[] args) {
- if (args.length == 1) {
- try {
- url = new URL(args[0]);
- } catch (Exception e) {
- }
- }
-
- junit.textui.TestRunner.run(new junit.framework.TestSuite(SalesRankNPrice_ServiceTestCase.class));
- } // main
-
}