scheu 02/02/20 12:41:14 Modified: java/src/org/apache/axis/wsdl/fromJava ClassRep.java Emitter.java MethodRep.java java/test/wsdl Wsdl2javaTestSuite.xml java/test/wsdl/roundtrip RoundtripPortType.java RoundtripTestServiceTestCase.java RoundtripTestSoapBindingImpl.java Added: java/src/org/apache/axis/wsdl/fromJava ExceptionRep.java java/test/wsdl/roundtrip InvalidCompanyId.java InvalidTickerSymbol.java InvalidTradeExchange.java Log: The following changes were implemented by IBM'er Brent Ulbricht. Some modifications were made based on inconsistencies found in the JAX-RPC spec. * Java2WSDL is changed to read the throws clauses of a method and generate the appropriate wsdl:fault and wsdl:message elements in the wsdl file. The name= attribute of the wsdl:fault element and the message= attribute of the wsdl:fault element are both based on the Java exception class name. * The roundtrip test is updated to test this new behavior. Revision Changes Path 1.17 +16 -3 xml-axis/java/src/org/apache/axis/wsdl/fromJava/ClassRep.java Index: ClassRep.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/ClassRep.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- ClassRep.java 19 Feb 2002 15:06:51 -0000 1.16 +++ ClassRep.java 20 Feb 2002 20:41:13 -0000 1.17 @@ -109,15 +109,27 @@ * | fields * +-------------------> FieldRep(s) * + * * name * MethodRep ----------> String - * | | - * | | return - * | +-----------> ParamRep + * | | | + * | | | return + * | | +-----------> ParamRep + * | | + * | | params + * | +-------------> ParamRep + * | + * | exceptions + * +----------------> ExceptionRep + * + * + * name + * ExceptionRep ----------> String * | * | params * +-------------> ParamRep * + * * name * ParamRep -----------> String * | | @@ -126,6 +138,7 @@ * | * | mode * +---------------> int (in/out/inout) + * * * name * FieldRep -----------> String 1.20 +70 -1 xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java Index: Emitter.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Emitter.java 20 Feb 2002 18:59:22 -0000 1.19 +++ Emitter.java 20 Feb 2002 20:41:13 -0000 1.20 @@ -89,6 +89,7 @@ import javax.wsdl.Port; import javax.wsdl.PortType; import javax.wsdl.Service; +import javax.wsdl.Fault; import javax.wsdl.factory.WSDLFactory; import javax.xml.rpc.namespace.QName; @@ -102,6 +103,7 @@ import java.util.Map; import java.util.StringTokenizer; import java.util.Vector; +import java.util.HashMap; /** * This class emits WSDL from Java classes. It is used by the ?WSDL @@ -138,6 +140,7 @@ private TypeMapping tm = null; // Registered type mapping private TypeMapping defaultTM = null; // Default TM private Namespaces namespaces; + private Map exceptionMsg = null; private ArrayList encodingList; private Types types; @@ -153,7 +156,8 @@ */ public Emitter () { namespaces = new Namespaces(); - factory = new DefaultFactory(); + factory = new DefaultFactory(); + exceptionMsg = new HashMap(); } /** @@ -597,6 +601,18 @@ def.addMessage(msg); + Vector exceptions = method.getExceptions(); + for (int i = 0; i < exceptions.size(); i++) { + msg = writeFaultMessage(def, (ExceptionRep) exceptions.elementAt(i)); + Fault fault = def.createFault(); + fault.setMessage(msg); + fault.setName(((ExceptionRep) exceptions.elementAt(i)).getName()); + oper.addFault(fault); + if (def.getMessage(msg.getQName()) == null) { + def.addMessage(msg); + } + } + // Set the parameter ordering using the parameter names Vector names = new Vector(); for (int i=0; i<method.getParameters().size(); i++) { @@ -737,6 +753,59 @@ writePartToMessage(def, msg, false,parameter); } return msg; + } + + /** Create a Fault Message + * + * @param def + * @param exception (an ExceptionRep object) + * @throws Exception + */ + private Message writeFaultMessage(Definition def, + ExceptionRep exception) throws Exception + { + + String pkgAndClsName = exception.getName(); + String clsName = pkgAndClsName.substring(pkgAndClsName.lastIndexOf('.') + 1, + pkgAndClsName.length()); + + // There are inconsistencies in the JSR 101 version 0.7 specification + // with regards to whether the java exception class name is mapped to + // the wsdl:fault name= attribute or is mapped to the wsdl:message of + // the wsdl:fault message= attribute. Currently WSDL2Java uses the + // latter mapping to generate the java exception class. + // + // The following code uses the class name for both the name= attribute + // and the message= attribute. + + exception.setName(clsName); + + Message msg = (Message) exceptionMsg.get(pkgAndClsName); + + if (msg == null) { + msg = def.createMessage(); + javax.wsdl.QName qName = createMessageName(def, clsName, ""); + + msg.setQName(qName); + msg.setUndefined(false); + + Vector parameters = exception.getParameters(); + for (int i=0; i<parameters.size(); i++) { + ParamRep parameter = (ParamRep) parameters.elementAt(i); + // If the first param is a MessageContext, Axis will + // generate it for us - it shouldn't be in the WSDL. + if ((i == 0) && + MessageContext.class.equals(parameter.getType())) { + continue; + } + writePartToMessage(def, msg, true, parameter); + } + + exceptionMsg.put(pkgAndClsName, msg); + } + + return msg; + } /** Create a Part 1.8 +23 -0 xml-axis/java/src/org/apache/axis/wsdl/fromJava/MethodRep.java Index: MethodRep.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/MethodRep.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- MethodRep.java 19 Feb 2002 15:06:51 -0000 1.7 +++ MethodRep.java 20 Feb 2002 20:41:13 -0000 1.8 @@ -56,6 +56,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.lang.reflect.Field; import java.util.Vector; import javax.xml.rpc.ParameterMode; @@ -65,12 +66,14 @@ * emitter. The information in the MethodRep can be changed by * user provided code to affect the emitted wsdl file. (See ClassRep) * @author Rich Scheuerle ([EMAIL PROTECTED]) + * @author Brent Ulbricht */ public class MethodRep { private String _name = ""; private ParamRep _returns = null; private Vector _parameters = new Vector(); + private Vector _exceptions = new Vector(); /** * Constructor @@ -134,6 +137,24 @@ } _parameters.add(new ParamRep(name, types[i], modes[i+1])); } + + // Create Exception Types + Class[] exceptionTypes = new Class[method.getExceptionTypes().length]; + exceptionTypes = method.getExceptionTypes(); + + for (int i=0; i < exceptionTypes.length; i++) { + // Every remote method declares a java.rmi.RemoteException + if (exceptionTypes[i] != java.rmi.RemoteException.class) { + Field[] f = exceptionTypes[i].getDeclaredFields(); + Vector exceptionParams = new Vector(); + for (int j = 0; j < f.length; j++) { + exceptionParams.add(new ParamRep(f[j].getName(), + f[j].getType(), ParamRep.IN)); + } + String pkgAndClsName = exceptionTypes[i].getName(); + _exceptions.add(new ExceptionRep(pkgAndClsName, exceptionParams)); + } + } } /** @@ -145,4 +166,6 @@ public void setReturns(ParamRep pr) { _returns = pr; } public Vector getParameters() { return _parameters; } public void setParameters(Vector v) { _parameters = v; } + public Vector getExceptions() { return _exceptions; } + public void setExceptions(Vector v) { _exceptions = v; } }; 1.1 xml-axis/java/src/org/apache/axis/wsdl/fromJava/ExceptionRep.java Index: ExceptionRep.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.axis.wsdl.fromJava; import java.util.Vector; /** * ExceptionRep is the representation of a class used inside the Java2WSDL * emitter. The information in the ExceptionRep can be changed by * user provided code to affect the emitted wsdl file. (See ClassRep) * @author Brent Ulbricht */ public class ExceptionRep { private String _name = ""; private Vector _parameters = null; /** * Constructor * Create an empty ExceptionRep (represents void) */ public ExceptionRep() { } /** * Constructor * Create a default representation of ExceptionRep * @param Class name of the exception * @param Parameters used in exception class */ public ExceptionRep(String name, Vector parameters) { _name = name; _parameters = parameters; } /** * Getters/Setters **/ public String getName() { return _name; } public void setName(String name) { _name = name; } public Vector getParameters() { return _parameters; } public void setParameters(Vector parameters) { _parameters = parameters; } }; 1.76 +3 -0 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.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- Wsdl2javaTestSuite.xml 20 Feb 2002 17:17:36 -0000 1.75 +++ Wsdl2javaTestSuite.xml 20 Feb 2002 20:41:14 -0000 1.76 @@ -112,6 +112,9 @@ <include name="BondInvestment.java"/> <include name="PreferredStockInvestment.java"/> <include name="CallOptions.java"/> + <include name="InvalidTickerSymbol.java"/> + <include name="InvalidTradeExchange.java"/> + <include name="InvalidCompanyId.java"/> </fileset> </copy> <!-- Compile the Web Service --> 1.2 +9 -1 xml-axis/java/test/wsdl/roundtrip/RoundtripPortType.java Index: RoundtripPortType.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/roundtrip/RoundtripPortType.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RoundtripPortType.java 12 Feb 2002 22:10:19 -0000 1.1 +++ RoundtripPortType.java 20 Feb 2002 20:41:14 -0000 1.2 @@ -60,6 +60,9 @@ import test.wsdl.roundtrip.StockInvestment; import test.wsdl.roundtrip.PreferredStockInvestment; import test.wsdl.roundtrip.CallOptions; +import test.wsdl.roundtrip.InvalidTickerSymbol; +import test.wsdl.roundtrip.InvalidTradeExchange; +import test.wsdl.roundtrip.InvalidCompanyId; /** * The RoundtripPortType interface defines the methods necessary when @@ -155,6 +158,11 @@ throws java.rmi.RemoteException; public java.lang.Long methodSoapLong(java.lang.Long inSoapLong) throws java.rmi.RemoteException; - + public void throwInvalidTickerException() + throws InvalidTickerSymbol, + java.rmi.RemoteException; + public void throwInvalidTradeExchange() + throws InvalidCompanyId, InvalidTradeExchange, InvalidTickerSymbol, + java.rmi.RemoteException; } // RoundtripPortType 1.3 +41 -0 xml-axis/java/test/wsdl/roundtrip/RoundtripTestServiceTestCase.java Index: RoundtripTestServiceTestCase.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/roundtrip/RoundtripTestServiceTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- RoundtripTestServiceTestCase.java 19 Feb 2002 15:37:12 -0000 1.2 +++ RoundtripTestServiceTestCase.java 20 Feb 2002 20:41:14 -0000 1.3 @@ -74,6 +74,9 @@ import test.wsdl.roundtrip.RoundtripPortType; import test.wsdl.roundtrip.RoundtripPortTypeServiceLocator; import test.wsdl.roundtrip.CallOptions; +import test.wsdl.roundtrip.InvalidTickerSymbol; +import test.wsdl.roundtrip.InvalidTradeExchange; +import test.wsdl.roundtrip.InvalidCompanyId; /** * This class contains the test methods to verify that Java mapping @@ -1008,6 +1011,44 @@ } } // testMethodSoapLong + + /** + * Test to insure that a user defined exception can be + * thrown and received. + */ + public void testInvalidTickerSymbol() { + + try { + binding.throwInvalidTickerException(); + fail("Should have received an InvalidTickerSymbol exception."); + } catch (InvalidTickerSymbol its) { + // Test was successful + } catch(RemoteException re) { + fail("Remote Exception caught: " + re); + } + + } // testInvalidTickerSymbol + + /** + * Test to insure that more than one user defined exception can be + * defined in a method. + */ + public void testInvalidTradeExchange() { + + try { + binding.throwInvalidTradeExchange(); + fail("Should have received an InvalidTradeExchange exception."); + } catch (InvalidTradeExchange ite) { + // Test was successful + } catch (InvalidTickerSymbol its) { + fail("Should have received an InvalidTradeExchange exception."); + } catch (InvalidCompanyId ici) { + fail("Should have received an InvalidTradeExchange exception."); + } catch (RemoteException re) { + fail("Remote Exception caught: " + re); + } + + } // testInvalidTradeExchange } // End class RoundtripTestServiceTestCase 1.2 +20 -0 xml-axis/java/test/wsdl/roundtrip/RoundtripTestSoapBindingImpl.java Index: RoundtripTestSoapBindingImpl.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/roundtrip/RoundtripTestSoapBindingImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RoundtripTestSoapBindingImpl.java 12 Feb 2002 22:10:19 -0000 1.1 +++ RoundtripTestSoapBindingImpl.java 20 Feb 2002 20:41:14 -0000 1.2 @@ -64,6 +64,9 @@ import test.wsdl.roundtrip.StockInvestment; import test.wsdl.roundtrip.PreferredStockInvestment; import test.wsdl.roundtrip.CallOptions; +import test.wsdl.roundtrip.InvalidTickerSymbol; +import test.wsdl.roundtrip.InvalidTradeExchange; +import test.wsdl.roundtrip.InvalidCompanyId; import java.rmi.RemoteException; @@ -578,5 +581,22 @@ } } // methodSoapLong + + public void throwInvalidTickerException() + throws InvalidTickerSymbol, RemoteException { + + throw new InvalidTickerSymbol("Invalid Ticker Symbol Received"); + + } // throwInvalidTickerSymbol + + public void throwInvalidTradeExchange() + throws InvalidTickerSymbol, + InvalidTradeExchange, + InvalidCompanyId, + RemoteException { + + throw new InvalidTradeExchange("Invalid Trade Exchange Received"); + + } // throwInvalidTradeExchange } // End class RoundtripTypesTestSoapBindingImpl 1.1 xml-axis/java/test/wsdl/roundtrip/InvalidCompanyId.java Index: InvalidCompanyId.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package test.wsdl.roundtrip; /** * The InvalidCompanyId class is used to test the ability of * Java2WSDL to correctly generate faults in the WSDL. * * @version 1.00 18 Feb 2002 * @author Brent Ulbricht */ public class InvalidCompanyId extends Exception { private int companyId; public InvalidCompanyId(int companyId) { this.companyId = companyId; } // Constructor public int getCompanyId() { return this.companyId; } // getCompanyId } // InvalidCompanyId 1.1 xml-axis/java/test/wsdl/roundtrip/InvalidTickerSymbol.java Index: InvalidTickerSymbol.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package test.wsdl.roundtrip; /** * The InvalidTickerSymbol class is used to test the ability of * Java2WSDL to correctly generate faults in the WSDL. * * @version 1.00 18 Feb 2002 * @author Brent Ulbricht */ public class InvalidTickerSymbol extends Exception { private String tickerSymbol; public InvalidTickerSymbol(String tickerSymbol) { this.tickerSymbol = tickerSymbol; } // Constructor public String getTickerSymbol() { return this.tickerSymbol; } // getTickerSymbol } // InvalidTickerSymbol 1.1 xml-axis/java/test/wsdl/roundtrip/InvalidTradeExchange.java Index: InvalidTradeExchange.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package test.wsdl.roundtrip; /** * The InvalidTradeExchange class is used to test the ability of * Java2WSDL to correctly generate faults in the WSDL. * * @version 1.00 18 Feb 2002 * @author Brent Ulbricht */ public class InvalidTradeExchange extends Exception { private String tradeExchange; public InvalidTradeExchange(String tradeExchange) { this.tradeExchange = tradeExchange; } // Constructor public String getTradeExchange() { return this.tradeExchange; } // getTradeExchange } // InvalidTradeExchange