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 to...@apache.org on 2002/01/07 16:54:20 UTC
cvs commit: xml-axis/java build.xml
tomj 02/01/07 07:54:20
Modified: java/test/wsdl Wsdl2javaTestSuite.xml
java build.xml
Added: java/test/wsdl/faults FaultServiceTestCase.java
FaultServiceSoapBindingImpl.java FaultService.wsdl
Removed: java/test/faults/wsdl FaultServiceTestCase.java
FaultServiceSoapBindingImpl.java FaultService.wsdl
Log:
Move fault test to wsdl directory.
Revision Changes Path
1.52 +2 -2 xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml
Index: Wsdl2javaTestSuite.xml
===================================================================
RCS file: /home/cvs/xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- Wsdl2javaTestSuite.xml 4 Jan 2002 19:09:41 -0000 1.51
+++ Wsdl2javaTestSuite.xml 7 Jan 2002 15:54:20 -0000 1.52
@@ -285,14 +285,14 @@
</wsdl2java>
<!-- WSDL fault generation test -->
- <wsdl2java url="test/faults/wsdl/FaultService.wsdl"
+ <wsdl2java url="test/wsdl/faults/FaultService.wsdl"
output="build/work"
testcase="yes"
deployscope="none"
skeleton="yes"
verbose="no"
noimports="no">
- <mapping namespace="http://test.com/wsdl/faults" package="test.faults.wsdl"/>
+ <mapping namespace="http://test.com/wsdl/faults" package="test.wsdl.faults"/>
</wsdl2java>
<!-- UDDI 1.0 WSDL's -->
1.1 xml-axis/java/test/wsdl/faults/FaultServiceTestCase.java
Index: FaultServiceTestCase.java
===================================================================
/**
* FaultServiceTestCase.java
*
* This file was auto-generated from WSDL
* by the Apache Axis Wsdl2java emitter.
*/
package test.wsdl.faults;
import junit.framework.AssertionFailedError;
import junit.framework.Assert;
import junit.framework.TestCase;
public class FaultServiceTestCase extends junit.framework.TestCase {
public FaultServiceTestCase(String name) {
super(name);
}
public static void main(String[] args) throws Exception {
FaultServiceTestCase tester = new FaultServiceTestCase("tester");
tester.testFaultService();
}
public void testFaultService() {
test.wsdl.faults.FaultServicePortType binding = new FaultService().getFaultService();
assertTrue("binding is null", binding != null);
String symbol = new String("MACR");
try {
float value = 0;
value = binding.getQuote(symbol);
fail("Should raise an InvalidTickerFault");
}
catch (InvalidTickerFaultMessage tickerFault) {
// We don't support fault data yet!
//assertEquals("Ticker Symbol in Fault doesn't match original argument",
// symbol, tickerFault.getTickerSymbol());
}
catch (org.apache.axis.AxisFault e) {
throw new junit.framework.
AssertionFailedError("AxisFault caught: " + e);
}
catch (java.rmi.RemoteException re) {
throw new junit.framework.
AssertionFailedError("Remote Exception caught: " + re );
}
}
}
1.1 xml-axis/java/test/wsdl/faults/FaultServiceSoapBindingImpl.java
Index: FaultServiceSoapBindingImpl.java
===================================================================
/**
* FaultServiceSoapBindingImpl.java
*
* This service always returns an InvalidTcikerFault.
*
* Author: Tom Jordahl (tomj@macromedia.com)
*/
package test.wsdl.faults;
public class FaultServiceSoapBindingImpl implements test.wsdl.faults.FaultServicePortType {
public float getQuote(java.lang.String tickerSymbol) throws java.rmi.RemoteException, InvalidTickerFaultMessage {
throw new InvalidTickerFaultMessage(tickerSymbol);
}
}
1.1 xml-axis/java/test/wsdl/faults/FaultService.wsdl
Index: FaultService.wsdl
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="http://test.com/wsdl/faults" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:serviceNS="http://test.com/wsdl/faults" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="getQuoteResponse">
<part name="getQuoteResult" type="xsd:float"/>
</message>
<message name="getQuoteRequest">
<part name="tickerSymbol" type="xsd:string"/>
</message>
<message name="InvalidTickerFaultMessage">
<part name="tickerSymbol" type="xsd:string"/>
</message>
<portType name="FaultServicePortType">
<operation name="getQuote">
<input message="serviceNS:getQuoteRequest"/>
<output message="serviceNS:getQuoteResponse"/>
<fault name="InvalidTickerFault" message="serviceNS:InvalidTickerFaultMessage"/>
</operation>
</portType>
<binding name="FaultServiceSoapBinding" type="serviceNS:FaultServicePortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getQuote">
<soap:operation soapAction="" style="rpc"/>
<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace=""/>
</input>
<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace=""/>
</output>
<fault>
<soap:fault name="InvalidTickerFault" use="encoded"/>
</fault>
</operation>
</binding>
<service name="FaultService">
<port name="FaultService" binding="serviceNS:FaultServiceSoapBinding">
<soap:address location="http://localhost:8080/axis/services/FaultService"/>
</port>
</service>
</definitions>
1.97 +0 -1 xml-axis/java/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-axis/java/build.xml,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- build.xml 4 Jan 2002 19:09:40 -0000 1.96
+++ build.xml 7 Jan 2002 15:54:20 -0000 1.97
@@ -268,7 +268,6 @@
</classpath>
<include name="test/**/*.java" />
<exclude name="test/inout/*.java" />
- <exclude name="test/faults/wsdl/*.java" />
<exclude name="test/wsdl/*/*.java" />
<exclude name="test/wsdl/Wsdl2javaTestSuite.java" unless="servlet.present"/>
<exclude name="test/md5attach/*.java" unless="attachments.present"/>