scheu 02/04/19 07:03:14
Modified: java/src/org/apache/axis/description ServiceDesc.java
java/src/org/apache/axis/wsdl/fromJava Emitter.java
Types.java
java/test/wsdl/roundtrip InvalidCompanyId.java
InvalidTickerSymbol.java InvalidTradeExchange.java
Log:
Fix for bug 8191
Revision Changes Path
1.19 +12 -7 xml-axis/java/src/org/apache/axis/description/ServiceDesc.java
Index: ServiceDesc.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/description/ServiceDesc.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ServiceDesc.java 18 Apr 2002 04:19:14 -0000 1.18
+++ ServiceDesc.java 19 Apr 2002 14:03:14 -0000 1.19
@@ -65,6 +65,7 @@
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
/**
* A ServiceDesc is an abstract description of a service.
@@ -725,13 +726,17 @@
Field[] f = exceptionTypes[i].getDeclaredFields();
ArrayList exceptionParams = new ArrayList();
for (int j = 0; j < f.length; j++) {
- QName qname = new QName("", f[j].getName());
- QName typeQName = tm.getTypeQName(f[j].getType());
- ParameterDesc param = new ParameterDesc(qname,
- ParameterDesc.IN,
- typeQName);
- param.setJavaType(f[j].getType());
- exceptionParams.add(param);
+ int mod = f[j].getModifiers();
+ if (Modifier.isPublic(mod) &&
+ !Modifier.isStatic(mod)) {
+ QName qname = new QName("", f[j].getName());
+ QName typeQName = tm.getTypeQName(f[j].getType());
+ ParameterDesc param = new ParameterDesc(qname,
+ ParameterDesc.IN,
+ typeQName);
+ param.setJavaType(f[j].getType());
+ exceptionParams.add(param);
+ }
}
String pkgAndClsName = exceptionTypes[i].getName();
FaultDesc fault = new FaultDesc();
1.30 +1 -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.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- Emitter.java 15 Apr 2002 02:35:58 -0000 1.29
+++ Emitter.java 19 Apr 2002 14:03:14 -0000 1.30
@@ -879,8 +879,8 @@
if (typeQName != null) {
part.setTypeName(typeQName);
part.setName(param.getName());
+ msg.addPart(part);
}
- msg.addPart(part);
return param.getName();
}
1.23 +10 -8 xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
Index: Types.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Types.java 17 Apr 2002 22:30:51 -0000 1.22
+++ Types.java 19 Apr 2002 14:03:14 -0000 1.23
@@ -177,10 +177,13 @@
private QName writeTypeAsElement(Class type) throws Exception {
QName qName = writeTypeNamespace(type);
String elementType = writeType(type);
- Element element = createRootElement(qName, elementType, isNullable(type));
- if (element != null)
- writeSchemaElement(qName,element);
- return qName;
+ if (elementType != null) {
+ Element element = createRootElement(qName, elementType,
isNullable(type));
+ if (element != null)
+ writeSchemaElement(qName,element);
+ return qName;
+ }
+ return null;
}
/**
@@ -361,18 +364,17 @@
// If no factory is found, try the BeanSerializerFactory if
// the type is not Throwable. (There is no mapping for
// java types that extend Throwable.)
- if (!Throwable.class.isAssignableFrom(type)) {
- factory = new BeanSerializerFactory(type, getTypeQName(type));
- }
+ factory = new BeanSerializerFactory(type, getTypeQName(type));
}
if (factory != null) {
ser = (Serializer)factory.getSerializerAs(Constants.AXIS_SAX);
}
// if we can't get a serializer, that is bad.
- if (ser == null)
+ if (ser == null) {
throw new AxisFault(
JavaUtils.getMessage("NoSerializer00", type.getName()));
+ }
// Write the namespace
QName qName = writeTypeNamespace(type);
1.2 +2 -1 xml-axis/java/test/wsdl/roundtrip/InvalidCompanyId.java
Index: InvalidCompanyId.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/wsdl/roundtrip/InvalidCompanyId.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InvalidCompanyId.java 20 Feb 2002 20:41:14 -0000 1.1
+++ InvalidCompanyId.java 19 Apr 2002 14:03:14 -0000 1.2
@@ -64,7 +64,8 @@
*/
public class InvalidCompanyId extends Exception {
- private int companyId;
+ public int companyId;
+ private InvalidCompanyId e; // This should not be put in the wsdl
public InvalidCompanyId(int companyId) {
this.companyId = companyId;
1.2 +1 -1 xml-axis/java/test/wsdl/roundtrip/InvalidTickerSymbol.java
Index: InvalidTickerSymbol.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/wsdl/roundtrip/InvalidTickerSymbol.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InvalidTickerSymbol.java 20 Feb 2002 20:41:14 -0000 1.1
+++ InvalidTickerSymbol.java 19 Apr 2002 14:03:14 -0000 1.2
@@ -64,7 +64,7 @@
*/
public class InvalidTickerSymbol extends Exception {
- private String tickerSymbol;
+ public String tickerSymbol;
public InvalidTickerSymbol(String tickerSymbol) {
this.tickerSymbol = tickerSymbol;
1.2 +1 -1 xml-axis/java/test/wsdl/roundtrip/InvalidTradeExchange.java
Index: InvalidTradeExchange.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/wsdl/roundtrip/InvalidTradeExchange.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InvalidTradeExchange.java 20 Feb 2002 20:41:14 -0000 1.1
+++ InvalidTradeExchange.java 19 Apr 2002 14:03:14 -0000 1.2
@@ -64,7 +64,7 @@
*/
public class InvalidTradeExchange extends Exception {
- private String tradeExchange;
+ public String tradeExchange;
public InvalidTradeExchange(String tradeExchange) {
this.tradeExchange = tradeExchange;