Author: aslom
Date: Tue Nov 8 17:28:11 2005
New Revision: 331931
URL: http://svn.apache.org/viewcvs?rev=331931&view=rev
Log:
replaced enum with e so code compiles OK with JDK5
Modified:
webservices/wsif/trunk/java/samples/customfactory/client/MyPrivateCompositeExtensionRegistry.java
webservices/wsif/trunk/java/src/org/apache/wsif/base/PrivateCompositeExtensionRegistry.java
webservices/wsif/trunk/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java
webservices/wsif/trunk/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
webservices/wsif/trunk/java/src/org/apache/wsif/util/jms/WSIFJMSProperties.java
webservices/wsif/trunk/java/test/schema/SchemaTest.java
Modified:
webservices/wsif/trunk/java/samples/customfactory/client/MyPrivateCompositeExtensionRegistry.java
URL:
http://svn.apache.org/viewcvs/webservices/wsif/trunk/java/samples/customfactory/client/MyPrivateCompositeExtensionRegistry.java?rev=331931&r1=331930&r2=331931&view=diff
==============================================================================
---
webservices/wsif/trunk/java/samples/customfactory/client/MyPrivateCompositeExtensionRegistry.java
(original)
+++
webservices/wsif/trunk/java/samples/customfactory/client/MyPrivateCompositeExtensionRegistry.java
Tue Nov 8 17:28:11 2005
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,7 +47,7 @@
* This is utility class that allows to aggregate multiple
* extensions registries into one. By default all standard WSDL4J
* extensions are made available.
- *
+ *
* @author Alekander Slominski
* @author Sanjiva Weerawarana
* @author Owen Burroughs <[EMAIL PROTECTED]>
@@ -57,7 +57,7 @@
*/
class MyPrivateCompositeExtensionRegistry extends ExtensionRegistry {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
private Vector extRegs = new Vector();
MyPrivateCompositeExtensionRegistry() {
@@ -105,9 +105,9 @@
Trc.entry(this, parentType, extensionType);
ExtensionSerializer ser;
- Enumeration enum = extRegs.elements();
- while (enum.hasMoreElements()) {
- ExtensionRegistry reg = (ExtensionRegistry) enum.nextElement();
+ Enumeration e = extRegs.elements();
+ while (e.hasMoreElements()) {
+ ExtensionRegistry reg = (ExtensionRegistry) e.nextElement();
try {
ser = reg.querySerializer(parentType, extensionType);
// Check that we're not looking at the default serializer
@@ -117,7 +117,7 @@
return ser;
}
} catch (WSDLException ex) {
- Trc.exception(ex);
+ Trc.exception(ex);
throw ex;
}
}
@@ -133,9 +133,9 @@
Trc.entry(this, parentType, elementType);
ExtensionDeserializer deser;
- Enumeration enum = extRegs.elements();
- while (enum.hasMoreElements()) {
- ExtensionRegistry reg = (ExtensionRegistry) enum.nextElement();
+ Enumeration e = extRegs.elements();
+ while (e.hasMoreElements()) {
+ ExtensionRegistry reg = (ExtensionRegistry) e.nextElement();
try {
deser = reg.queryDeserializer(parentType, elementType);
// Check that we're not looking at the default deserializer
@@ -145,7 +145,7 @@
return deser;
}
} catch (WSDLException ex) {
- Trc.exception(ex);
+ Trc.exception(ex);
throw ex;
}
}
@@ -161,15 +161,15 @@
Trc.entry(this, parentType, elementType);
ExtensibilityElement ee;
- Enumeration enum = extRegs.elements();
- while (enum.hasMoreElements()) {
- ExtensionRegistry reg = (ExtensionRegistry) enum.nextElement();
+ Enumeration e = extRegs.elements();
+ while (e.hasMoreElements()) {
+ ExtensionRegistry reg = (ExtensionRegistry) e.nextElement();
try {
ee = reg.createExtension(parentType, elementType);
Trc.exit(ee);
return ee;
} catch (WSDLException ignored) {
- Trc.ignoredException(ignored);
+ Trc.ignoredException(ignored);
}
}
ee = super.createExtension(parentType, elementType);
Modified:
webservices/wsif/trunk/java/src/org/apache/wsif/base/PrivateCompositeExtensionRegistry.java
URL:
http://svn.apache.org/viewcvs/webservices/wsif/trunk/java/src/org/apache/wsif/base/PrivateCompositeExtensionRegistry.java?rev=331931&r1=331930&r2=331931&view=diff
==============================================================================
---
webservices/wsif/trunk/java/src/org/apache/wsif/base/PrivateCompositeExtensionRegistry.java
(original)
+++
webservices/wsif/trunk/java/src/org/apache/wsif/base/PrivateCompositeExtensionRegistry.java
Tue Nov 8 17:28:11 2005
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,7 +47,7 @@
* This is utility class that allows to aggregate multiple
* extensions registries into one. By default all standard WSDL4J
* extensions are made available.
- *
+ *
* @author Alekander Slominski
* @author Sanjiva Weerawarana
* @author Owen Burroughs <[EMAIL PROTECTED]>
@@ -57,7 +57,7 @@
*/
class PrivateCompositeExtensionRegistry extends ExtensionRegistry {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
private Vector extRegs = new Vector();
PrivateCompositeExtensionRegistry() {
@@ -105,9 +105,9 @@
Trc.entry(this, parentType, extensionType);
ExtensionSerializer ser;
- Enumeration enum = extRegs.elements();
- while (enum.hasMoreElements()) {
- ExtensionRegistry reg = (ExtensionRegistry) enum.nextElement();
+ Enumeration e = extRegs.elements();
+ while (e.hasMoreElements()) {
+ ExtensionRegistry reg = (ExtensionRegistry) e.nextElement();
try {
ser = reg.querySerializer(parentType, extensionType);
// Check that we're not looking at the default serializer
@@ -117,7 +117,7 @@
return ser;
}
} catch (WSDLException ex) {
- Trc.exception(ex);
+ Trc.exception(ex);
throw ex;
}
}
@@ -133,9 +133,9 @@
Trc.entry(this, parentType, elementType);
ExtensionDeserializer deser;
- Enumeration enum = extRegs.elements();
- while (enum.hasMoreElements()) {
- ExtensionRegistry reg = (ExtensionRegistry) enum.nextElement();
+ Enumeration e = extRegs.elements();
+ while (e.hasMoreElements()) {
+ ExtensionRegistry reg = (ExtensionRegistry) e.nextElement();
try {
deser = reg.queryDeserializer(parentType, elementType);
// Check that we're not looking at the default deserializer
@@ -145,7 +145,7 @@
return deser;
}
} catch (WSDLException ex) {
- Trc.exception(ex);
+ Trc.exception(ex);
throw ex;
}
}
@@ -161,15 +161,15 @@
Trc.entry(this, parentType, elementType);
ExtensibilityElement ee;
- Enumeration enum = extRegs.elements();
- while (enum.hasMoreElements()) {
- ExtensionRegistry reg = (ExtensionRegistry) enum.nextElement();
+ Enumeration e = extRegs.elements();
+ while (e.hasMoreElements()) {
+ ExtensionRegistry reg = (ExtensionRegistry) e.nextElement();
try {
ee = reg.createExtension(parentType, elementType);
Trc.exit(ee);
return ee;
} catch (WSDLException ignored) {
- Trc.ignoredException(ignored);
+ Trc.ignoredException(ignored);
}
}
ee = super.createExtension(parentType, elementType);
Modified:
webservices/wsif/trunk/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java
URL:
http://svn.apache.org/viewcvs/webservices/wsif/trunk/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java?rev=331931&r1=331930&r2=331931&view=diff
==============================================================================
---
webservices/wsif/trunk/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java
(original)
+++
webservices/wsif/trunk/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java
Tue Nov 8 17:28:11 2005
@@ -1,12 +1,12 @@
/*
* Copyright 2003,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -74,7 +74,7 @@
extends WSIFDefaultOperation
implements WSIFOperation {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
protected javax.wsdl.Port fieldPortModel;
protected WSIFPort_EJB fieldPort;
@@ -132,7 +132,7 @@
.get(
0);
} catch (Exception e) {
- Trc.exception(e);
+ Trc.exception(e);
throw new WSIFException(
"Unable to resolve EJB binding for operation '"
+ bindingOperationModel.getName()
@@ -221,7 +221,7 @@
Thread.currentThread().getContextClassLoader());
}
} catch (ClassNotFoundException ex) {
- Trc.exception(ex);
+ Trc.exception(ex);
throw new WSIFException(
"Could not instantiate class '" + classname + "'",
ex);
@@ -238,7 +238,7 @@
try {
operation = getOperation();
} catch (Exception e) {
- Trc.exception(e);
+ Trc.exception(e);
throw new WSIFException("Failed to get Operation", e);
}
@@ -274,9 +274,9 @@
if (formatType instanceof Vector) {
Vector types = (Vector) formatType;
- Enumeration enum = types.elements();
- while (enum.hasMoreElements()) {
- String type = (String) enum.nextElement();
+ Enumeration e = types.elements();
+ while (e.hasMoreElements()) {
+ String type = (String) e.nextElement();
// Add new fault message information to the map
fieldFaultMessageInfos.put(
type,
@@ -419,7 +419,7 @@
Trc.entry(this);
// Only build once!
if (fieldTypeMapBuilt) {
- Trc.exit();
+ Trc.exit();
return;
}
@@ -430,7 +430,7 @@
fieldPortModel.getBinding().getExtensibilityElements().iterator();
/*
- * Choose the first typeMap that has encoding=Java|EJB and style=Java.
+ * Choose the first typeMap that has encoding=Java|EJB and style=Java.
* Ignore any other typeMap's that have other encodings and styles.
* We allow both encoding="Java" and encoding="EJB" because originally
* WSIF did not check the encoding and our samples assumed Java,
whereas
@@ -462,7 +462,7 @@
+ " does not contain a typeMap with encoding=Java or
encoding=EJB and style=Java");
}
- // Build the hashmap
+ // Build the hashmap
bindingIterator = typeMapping.getMaps().iterator();
while (bindingIterator.hasNext()) {
TypeMap typeMap = (TypeMap) bindingIterator.next();
@@ -473,13 +473,13 @@
if (typeName != null && type != null) {
if (fieldTypeMaps.containsKey(typeName)) {
Vector v = null;
- Object obj = fieldTypeMaps.get(typeName);
- if (obj instanceof Vector) {
- v = (Vector) obj;
- } else {
- v = new Vector();
- v.addElement(obj);
- }
+ Object obj = fieldTypeMaps.get(typeName);
+ if (obj instanceof Vector) {
+ v = (Vector) obj;
+ } else {
+ v = new Vector();
+ v.addElement(obj);
+ }
v.addElement(type);
this.fieldTypeMaps.put(typeName, v);
} else {
@@ -544,15 +544,15 @@
"Could not map type "
+ partType
+ " to a java type. Part name was "
- + returnPart.getName() == null
+ + returnPart.getName() == null
? "<null>" : returnPart.getName());
if (obj instanceof Vector) {
Vector v = (Vector) obj;
Vector argv = new Vector();
- Enumeration enum = v.elements();
- while (enum.hasMoreElements()) {
- String cls = (String) enum.nextElement();
+ Enumeration e = v.elements();
+ while (e.hasMoreElements()) {
+ String cls = (String) e.nextElement();
argv.addElement(getClassForName(cls));
}
methodReturnClass = argv;
@@ -570,7 +570,7 @@
}
// returnPart attribute was not present so return
methodReturnClass as default null
} catch (Exception ex) {
- Trc.exception(ex);
+ Trc.exception(ex);
throw new WSIFException(
"Error while determining return class of method "
+ fieldEJBOperationModel.getMethodName()
@@ -626,23 +626,23 @@
}
/*
- Operations do not specify whether they are to be used with
RPC-like bindings
- or not. However, when using an operation with an RPC-binding,
it is useful to
- be able to capture the original RPC function signature. For
this reason,
- a request-response or solicit-response operation MAY specify a
list of parameter
- names via the parameterOrder attribute (of type nmtokens). The
value of the
- attribute is a list of message part names separated by a single
space.
- The value of the parameterOrder attribute MUST follow the
following rules:
+ Operations do not specify whether they are to be used with
RPC-like bindings
+ or not. However, when using an operation with an RPC-binding,
it is useful to
+ be able to capture the original RPC function signature. For
this reason,
+ a request-response or solicit-response operation MAY specify a
list of parameter
+ names via the parameterOrder attribute (of type nmtokens). The
value of the
+ attribute is a list of message part names separated by a
single space.
+ The value of the parameterOrder attribute MUST follow the
following rules:
* The part name order reflects the order of the parameters in
the RPC signature
* The return value part is not present in the list
* If a part name appears in both the input and output message,
it is an in/out parameter
- * If a part name appears in only the input message, it is an in
parameter
- * If a part name appears in only the output message, it is an
out parameter
+ * If a part name appears in only the input message, it is an
in parameter
+ * If a part name appears in only the output message, it is an
out parameter
- Note that this information serves as a "hint" and may safely be
ignored by
- those not concerned with RPC signatures. Also, it is not
required to be present,
- even if the operation is to be used with an RPC-like binding.
+ Note that this information serves as a "hint" and may safely
be ignored by
+ those not concerned with RPC signatures. Also, it is not
required to be present,
+ even if the operation is to be used with an RPC-like binding.
*/
ArrayList argNames = new ArrayList();
@@ -679,9 +679,9 @@
if (obj instanceof Vector) {
Vector v = (Vector) obj;
Vector argv = new Vector();
- Enumeration enum = v.elements();
- while (enum.hasMoreElements()) {
- String cls = (String) enum.nextElement();
+ Enumeration e = v.elements();
+ while (e.hasMoreElements()) {
+ String cls = (String) e.nextElement();
argv.addElement(getClassForName(cls));
}
argTypes.add(argv);
@@ -728,10 +728,10 @@
fieldOutParameterNames[i] = (String) argNames.get(i);
}
} else {
- fieldOutParameterNames = new String[0];
+ fieldOutParameterNames = new String[0];
}
} catch (Exception ex) {
- Trc.exception(ex);
+ Trc.exception(ex);
throw new WSIFException(
"Error while determining signature of method "
+ fieldEJBOperationModel.getMethodName()
@@ -784,33 +784,33 @@
}
protected Object getCompatibleReturn(Method method, Object returnObj) {
- Trc.entry(this,method,returnObj);
- Object o = null;
- Class rt = method.getReturnType();
- Class ct = null;
- int dims = 0;
- if (rt.isArray()) {
- ct = rt.getComponentType();
- dims++;
- while (ct.isArray()) {
- ct = ct.getComponentType();
- dims++;
- }
- }
+ Trc.entry(this,method,returnObj);
+ Object o = null;
+ Class rt = method.getReturnType();
+ Class ct = null;
+ int dims = 0;
+ if (rt.isArray()) {
+ ct = rt.getComponentType();
+ dims++;
+ while (ct.isArray()) {
+ ct = ct.getComponentType();
+ dims++;
+ }
+ }
if (returnObj instanceof java.lang.Character) {
o = getCompatibleObject(java.lang.String.class, returnObj);
} else if (ct != null && (ct.equals(java.lang.Character.class) ||
ct.equals(char.class))) {
- String stringArrayClassName = "[Ljava.lang.String;";
- for (int d=1; d<dims; d++) {
- stringArrayClassName = "["+stringArrayClassName;
- }
- try {
- Class stringArrayClass =
Class.forName(stringArrayClassName, true,
Thread.currentThread().getContextClassLoader());
- o = getCompatibleObject(stringArrayClass, returnObj);
- } catch(ClassNotFoundException cnf) {
- Trc.ignoredException(cnf);
- o = returnObj;
- }
+ String stringArrayClassName = "[Ljava.lang.String;";
+ for (int d=1; d<dims; d++) {
+ stringArrayClassName = "["+stringArrayClassName;
+ }
+ try {
+ Class stringArrayClass =
Class.forName(stringArrayClassName, true,
Thread.currentThread().getContextClassLoader());
+ o = getCompatibleObject(stringArrayClass, returnObj);
+ } catch(ClassNotFoundException cnf) {
+ Trc.ignoredException(cnf);
+ o = returnObj;
+ }
} else {
o = returnObj;
}
@@ -818,7 +818,7 @@
return o;
}
- // Usually cls1.isAssignableFrom(cls2) returning false means you can't
cast
+ // Usually cls1.isAssignableFrom(cls2) returning false means you can't cast
// instance of cls1 to cls2. There are some special cases we need to cover
...
// String->Character and Character->String
// If a conversion is known then the obj is converted to class cls
@@ -830,8 +830,8 @@
protected Object getCompatibleObject(Class cls, Object obj) {
Trc.entry(this,cls,obj);
- if (cls.getName().equals(obj.getClass().getName())) return obj;
-
+ if (cls.getName().equals(obj.getClass().getName())) return obj;
+
// String -> Character
if ((cls.equals(java.lang.Character.class) || cls.equals(char.class))
&& obj.getClass().equals(java.lang.String.class)) {
@@ -847,55 +847,55 @@
// String arrays -> char/Character arrays and Character arrays ->
String arrays
if (cls.isArray() && obj.getClass().isArray()) {
- Class cct = cls.getComponentType();
- Class objct = obj.getClass().getComponentType();
- while (cct.isArray()) {
- cct = cct.getComponentType();
- }
- while (objct.isArray()) {
- objct = objct.getComponentType();
- }
- if (objct.equals(java.lang.String.class) &&
cct.equals(char.class)) {
- try {
- Object charArray =
ProviderUtils.stringArrayToCharArray(obj);
- Trc.exit(charArray);
- return charArray;
- } catch (Exception e) {
- Trc.ignoredException(e);
- Trc.exit(null);
- return null;
- }
- } else if (objct.equals(java.lang.String.class) &&
cct.equals(java.lang.Character.class)) {
- try {
- Object charArray =
ProviderUtils.stringArrayToCharacterArray(obj);
- Trc.exit(charArray);
- return charArray;
- } catch (Exception e) {
- Trc.ignoredException(e);
- Trc.exit(null);
- return null;
- }
- } else if (objct.equals(java.lang.Character.class) &&
cct.equals(java.lang.String.class)) {
- try {
- Object charArray =
ProviderUtils.characterArrayToStringArray(obj);
- Trc.exit(charArray);
- return charArray;
- } catch (Exception e) {
- Trc.ignoredException(e);
- Trc.exit(null);
- return null;
- }
- } else if (objct.equals(char.class) &&
cct.equals(java.lang.String.class)) {
- try {
- Object charArray =
ProviderUtils.charArrayToStringArray(obj);
- Trc.exit(charArray);
- return charArray;
- } catch (Exception e) {
- Trc.ignoredException(e);
- Trc.exit(null);
- return null;
- }
- }
+ Class cct = cls.getComponentType();
+ Class objct = obj.getClass().getComponentType();
+ while (cct.isArray()) {
+ cct = cct.getComponentType();
+ }
+ while (objct.isArray()) {
+ objct = objct.getComponentType();
+ }
+ if (objct.equals(java.lang.String.class) &&
cct.equals(char.class)) {
+ try {
+ Object charArray =
ProviderUtils.stringArrayToCharArray(obj);
+ Trc.exit(charArray);
+ return charArray;
+ } catch (Exception e) {
+ Trc.ignoredException(e);
+ Trc.exit(null);
+ return null;
+ }
+ } else if (objct.equals(java.lang.String.class) &&
cct.equals(java.lang.Character.class)) {
+ try {
+ Object charArray =
ProviderUtils.stringArrayToCharacterArray(obj);
+ Trc.exit(charArray);
+ return charArray;
+ } catch (Exception e) {
+ Trc.ignoredException(e);
+ Trc.exit(null);
+ return null;
+ }
+ } else if (objct.equals(java.lang.Character.class) &&
cct.equals(java.lang.String.class)) {
+ try {
+ Object charArray =
ProviderUtils.characterArrayToStringArray(obj);
+ Trc.exit(charArray);
+ return charArray;
+ } catch (Exception e) {
+ Trc.ignoredException(e);
+ Trc.exit(null);
+ return null;
+ }
+ } else if (objct.equals(char.class) &&
cct.equals(java.lang.String.class)) {
+ try {
+ Object charArray =
ProviderUtils.charArrayToStringArray(obj);
+ Trc.exit(charArray);
+ return charArray;
+ } catch (Exception e) {
+ Trc.ignoredException(e);
+ Trc.exit(null);
+ return null;
+ }
+ }
}
if (cls.equals(java.lang.String.class)
@@ -1007,7 +1007,7 @@
Trc.ignoredException(ia);
// Ignore and try next method
}
- // Side effect: Initialize port's object reference
+ // Side effect: Initialize port's object reference
} else {
try {
// Get a set of arguments which are compatible with
the method. Creates default
@@ -1289,7 +1289,7 @@
arguments[i] = part;
foundInputParameter = true;
} catch (WSIFException e) {
- Trc.ignoredException(e);
+ Trc.ignoredException(e);
}
if (!foundInputParameter) {
@@ -1338,10 +1338,10 @@
invokedOK = true;
break;
} catch (IllegalArgumentException ia) {
- Trc.ignoredException(ia);
+ Trc.ignoredException(ia);
// Ignore and try next method
}
- // Side effect: Initialize port's object reference
+ // Side effect: Initialize port's object reference
} else {
try {
// Get a set of arguments which are compatible with
the ctor
@@ -1372,7 +1372,7 @@
invokedOK = true;
break;
} catch (IllegalArgumentException ia) {
- Trc.ignoredException(ia);
+ Trc.ignoredException(ia);
// Ignore and try next method
}
}
@@ -1481,23 +1481,23 @@
return buff;
}
- /**
- * Override default deserialization
- */
- private void writeObject(ObjectOutputStream oos) throws IOException {
+ /**
+ * Override default deserialization
+ */
+ private void writeObject(ObjectOutputStream oos) throws IOException {
oos.defaultWriteObject();
}
- /**
- * Override default deserialization
- */
+ /**
+ * Override default deserialization
+ */
private void readObject(ObjectInputStream ois)
throws ClassNotFoundException, IOException {
ois.defaultReadObject();
// Reproduce list of methods
if (fieldPort == null) {
- throw new IOException("Unable to deserialize WSIFOperation_EJB,
reference to WSIFPort_EJB is null");
+ throw new IOException("Unable to deserialize
WSIFOperation_EJB, reference to WSIFPort_EJB is null");
}
String ejbInterface = fieldEJBOperationModel.getEjbInterface();
@@ -1505,7 +1505,7 @@
if (ejbInterface.equals("home")) {
fieldIsHomeInterface = true;
} else if (!ejbInterface.equals("remote")) {
- String name = (fieldBindingOperationModel != null) ?
fieldBindingOperationModel.getName() : "unknown";
+ String name = (fieldBindingOperationModel != null) ?
fieldBindingOperationModel.getName() : "unknown";
throw new IOException(
"EJB binding interface not recognized for operation '"
+ name
@@ -1517,6 +1517,6 @@
fieldAllMethods = fieldPort.getEjbHome().getClass().getMethods();
} else {
fieldAllMethods = fieldPort.getEjbObjectMethods();
- }
- }
-}
\ No newline at end of file
+ }
+ }
+}
Modified:
webservices/wsif/trunk/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
URL:
http://svn.apache.org/viewcvs/webservices/wsif/trunk/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java?rev=331931&r1=331930&r2=331931&view=diff
==============================================================================
---
webservices/wsif/trunk/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
(original)
+++
webservices/wsif/trunk/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
Tue Nov 8 17:28:11 2005
@@ -370,9 +370,9 @@
if (formatType instanceof Vector) {
Vector types = (Vector) formatType;
- Enumeration enum = types.elements();
- while (enum.hasMoreElements()) {
- String type = (String) enum.nextElement();
+ Enumeration e = types.elements();
+ while (e.hasMoreElements()) {
+ String type = (String) e.nextElement();
// Add new fault message information to the map
fieldFaultMessageInfos.put(
type,
@@ -590,9 +590,9 @@
if (obj instanceof Vector) {
Vector v = (Vector) obj;
Vector argv = new Vector();
- Enumeration enum = v.elements();
- while (enum.hasMoreElements()) {
- String cls = (String) enum.nextElement();
+ Enumeration e = v.elements();
+ while (e.hasMoreElements()) {
+ String cls = (String) e.nextElement();
argv.addElement(getClassForName(cls));
}
methodReturnClass = argv;
@@ -713,9 +713,9 @@
if (obj instanceof Vector) {
Vector v = (Vector) obj;
Vector argv = new Vector();
- Enumeration enum = v.elements();
- while (enum.hasMoreElements()) {
- String cls = (String) enum.nextElement();
+ Enumeration e = v.elements();
+ while (e.hasMoreElements()) {
+ String cls = (String) e.nextElement();
argv.addElement(getClassForName(cls));
}
argTypes.add(argv);
Modified:
webservices/wsif/trunk/java/src/org/apache/wsif/util/jms/WSIFJMSProperties.java
URL:
http://svn.apache.org/viewcvs/webservices/wsif/trunk/java/src/org/apache/wsif/util/jms/WSIFJMSProperties.java?rev=331931&r1=331930&r2=331931&view=diff
==============================================================================
---
webservices/wsif/trunk/java/src/org/apache/wsif/util/jms/WSIFJMSProperties.java
(original)
+++
webservices/wsif/trunk/java/src/org/apache/wsif/util/jms/WSIFJMSProperties.java
Tue Nov 8 17:28:11 2005
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,16 +40,16 @@
import org.apache.wsif.logging.Trc;
/**
- * WSIFJMSProperties is a HashMap of jms properties. The WSIFJMSProperties can
either be IN
- * or OUT. If IN, the properties can only set on a QueueSender. If OUT, the
properties
- * can only be got from a message. Reflection is used to set and get the
properties in JMS.
- * Using reflection avoids having a table of properties that would have to
updated for
- * different JMS implementations and different versions of JMS.
- *
+ * WSIFJMSProperties is a HashMap of jms properties. The WSIFJMSProperties can
either be IN
+ * or OUT. If IN, the properties can only set on a QueueSender. If OUT, the
properties
+ * can only be got from a message. Reflection is used to set and get the
properties in JMS.
+ * Using reflection avoids having a table of properties that would have to
updated for
+ * different JMS implementations and different versions of JMS.
+ *
* @author Mark Whitlock <[EMAIL PROTECTED]>
*/
public class WSIFJMSProperties extends HashMap {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
public static final String IN = "in";
public static final String OUT = "out";
private static final ArrayList allDirections =
@@ -69,10 +69,10 @@
public static final String QCF_USERID = "JMSUserid";
public static final String QCF_PASSWORD = "JMSPassword";
- private static final ArrayList predefinedProps =
+ private static final ArrayList predefinedProps =
new ArrayList(Arrays.asList(new Object[]{
- CORRELATIONID,DELIVERYMODE,DESTINATION,EXPIRATION,PRIORITY,
- REDELIVERED,REPLYTO,TIMESTAMP,TIMETOLIVE, TYPE}));
+ CORRELATIONID,DELIVERYMODE,DESTINATION,EXPIRATION,PRIORITY,
+ REDELIVERED,REPLYTO,TIMESTAMP,TIMETOLIVE, TYPE}));
private String direction;
@@ -154,7 +154,7 @@
message.setJMSType((String)value);
}
} catch (ClassCastException ce) {
- Trc.exception(ce);
+ Trc.exception(ce);
throw new WSIFException(
"Unexpected type "
+ type
@@ -193,7 +193,7 @@
message.setObjectProperty(prop, value);
}
} catch (JMSException je) {
- Trc.exception(je);
+ Trc.exception(je);
throw WSIFJMSConstants.ToWsifException(je);
}
@@ -222,13 +222,13 @@
put(TIMESTAMP, new Long(message.getJMSTimestamp()));
put(TYPE, message.getJMSType());
- Enumeration enum = message.getPropertyNames();
- while (enum.hasMoreElements()) {
- String name = (String) enum.nextElement();
+ Enumeration e = message.getPropertyNames();
+ while (e.hasMoreElements()) {
+ String name = (String) e.nextElement();
put(name, message.getObjectProperty(name));
}
} catch (JMSException je) {
- Trc.exception(je);
+ Trc.exception(je);
throw WSIFJMSConstants.ToWsifException(je);
}
@@ -278,4 +278,4 @@
}
return buff;
}
-}
\ No newline at end of file
+}
Modified: webservices/wsif/trunk/java/test/schema/SchemaTest.java
URL:
http://svn.apache.org/viewcvs/webservices/wsif/trunk/java/test/schema/SchemaTest.java?rev=331931&r1=331930&r2=331931&view=diff
==============================================================================
--- webservices/wsif/trunk/java/test/schema/SchemaTest.java (original)
+++ webservices/wsif/trunk/java/test/schema/SchemaTest.java Tue Nov 8 17:28:11
2005
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,11 +45,11 @@
*/
public class SchemaTest extends TestCase {
String wsdlLocation1 = TestUtilities.getWsdlPath("java\\test\\schema") +
"SchemaTest1.wsdl";
- String wsdlLocation2 = TestUtilities.getWsdlPath("java\\test\\schema") +
"SchemaTest2.wsdl";
- String wsdlLocation3 = TestUtilities.getWsdlPath("java\\test\\schema") +
"SchemaTest3.wsdl";
+ String wsdlLocation2 = TestUtilities.getWsdlPath("java\\test\\schema") +
"SchemaTest2.wsdl";
+ String wsdlLocation3 = TestUtilities.getWsdlPath("java\\test\\schema") +
"SchemaTest3.wsdl";
- Hashtable expectedA = new Hashtable();
- Hashtable expectedB = new Hashtable();
+ Hashtable expectedA = new Hashtable();
+ Hashtable expectedB = new Hashtable();
public SchemaTest(String name) {
super(name);
@@ -92,7 +92,7 @@
"[Lwsiftest.types.Address;");
- // For nested xsd files namepsaces/results are slightly different
+ // For nested xsd files namepsaces/results are slightly different
expectedB.put(
new QName("http://types.wsiftest/", "addresses"),
"[Lwsiftest.types2.Address;");
@@ -117,123 +117,123 @@
expectedB.put(new QName("http://types.wsiftest/", "ArrayOfInt"), "[I");
expectedB.put(
new QName("http://types2.wsiftest/", "ArrayOfAddress"),
- "[Lwsiftest.types2.Address;");
+ "[Lwsiftest.types2.Address;");
}
public void testParsing() {
- doIt(wsdlLocation1, expectedA);
- doIt(wsdlLocation2, expectedA);
- doIt(wsdlLocation3, expectedB);
+ doIt(wsdlLocation1, expectedA);
+ doIt(wsdlLocation2, expectedA);
+ doIt(wsdlLocation3, expectedB);
}
private void doIt(String wsdl, Hashtable expectedResults) {
try {
- System.out.println("*** " + wsdl + " ***\n");
- Definition def = WSIFUtils.readWSDL(null, wsdl);
- Hashtable table = new Hashtable();
- Parser.getTypeMappings(def, table, false);
- if (table != null) {
- System.out.println("WITHOUT STANDARD MAPPINGS:");
- Enumeration k = table.keys();
- while(k.hasMoreElements()) {
- QName qn = (QName) k.nextElement();
- String cl = (String) table.get(qn);
- System.out.println(qn + " -> " + cl);
- }
- } else {
- System.out.println("WITHOUT STANDARD MAPPINGS RETURNED
NULL!!");
- assertTrue("With wsdl "+wsdl+", table without standard
mappings was null", false);
- }
- checkResult(wsdl, table, expectedResults);
- System.out.println("- - - -");
- Hashtable table2 = new Hashtable();
- Parser.getTypeMappings(def, table2);
- if (table2 != null) {
- System.out.println("WITH STANDARD MAPPINGS:");
- Enumeration k = table2.keys();
- while(k.hasMoreElements()) {
- QName qn = (QName) k.nextElement();
- String cl = (String) table2.get(qn);
- System.out.println(qn + " -> " + cl);
- }
- } else {
- System.out.println("WITH STANDARD MAPPINGS RETURNED
NULL!!");
- assertTrue("With wsdl "+wsdl+", table with standard
mappings was null", false);
- }
- checkResult(wsdl, table2, expectedResults);
-
System.out.println("-----------------------------------------------------\n");
+ System.out.println("*** " + wsdl + " ***\n");
+ Definition def = WSIFUtils.readWSDL(null, wsdl);
+ Hashtable table = new Hashtable();
+ Parser.getTypeMappings(def, table, false);
+ if (table != null) {
+ System.out.println("WITHOUT STANDARD MAPPINGS:");
+ Enumeration k = table.keys();
+ while(k.hasMoreElements()) {
+ QName qn = (QName) k.nextElement();
+ String cl = (String) table.get(qn);
+ System.out.println(qn + " -> " + cl);
+ }
+ } else {
+ System.out.println("WITHOUT STANDARD MAPPINGS RETURNED
NULL!!");
+ assertTrue("With wsdl "+wsdl+", table without standard
mappings was null", false);
+ }
+ checkResult(wsdl, table, expectedResults);
+ System.out.println("- - - -");
+ Hashtable table2 = new Hashtable();
+ Parser.getTypeMappings(def, table2);
+ if (table2 != null) {
+ System.out.println("WITH STANDARD MAPPINGS:");
+ Enumeration k = table2.keys();
+ while(k.hasMoreElements()) {
+ QName qn = (QName) k.nextElement();
+ String cl = (String) table2.get(qn);
+ System.out.println(qn + " -> " + cl);
+ }
+ } else {
+ System.out.println("WITH STANDARD MAPPINGS RETURNED
NULL!!");
+ assertTrue("With wsdl "+wsdl+", table with standard
mappings was null", false);
+ }
+ checkResult(wsdl, table2, expectedResults);
+
System.out.println("-----------------------------------------------------\n");
} catch (Exception e) {
System.err.println(
"SchemaTest caught exception " + e);
e.printStackTrace();
assertTrue(false);
} finally {
- TestUtilities.resetDefaultProviders();
+ TestUtilities.resetDefaultProviders();
}
}
private void doItWithClassLoader(String wsdl, Hashtable expectedResults) {
try {
- System.out.println("*** " + wsdl + " ***\n");
- ClassLoader loader = this.getClass().getClassLoader();
- Definition def = WSIFUtils.readWSDL(null, wsdl, loader);
- Hashtable table = new Hashtable();
- Parser.getTypeMappings(def, table, loader, false);
- if (table != null) {
- System.out.println("WITHOUT STANDARD MAPPINGS:");
- Enumeration k = table.keys();
- while(k.hasMoreElements()) {
- QName qn = (QName) k.nextElement();
- String cl = (String) table.get(qn);
- System.out.println(qn + " -> " + cl);
- }
- } else {
- System.out.println("WITHOUT STANDARD MAPPINGS RETURNED
NULL!!");
- assertTrue("With wsdl "+wsdl+" and using a classloader,
table without standard mappings was null", false);
- }
- checkResult(wsdl, table, expectedResults);
- System.out.println("- - - -");
- Hashtable table2 = new Hashtable();
- Parser.getTypeMappings(def, table2, loader, true);
- if (table2 != null) {
- System.out.println("WITH STANDARD MAPPINGS:");
- Enumeration k = table2.keys();
- while(k.hasMoreElements()) {
- QName qn = (QName) k.nextElement();
- String cl = (String) table2.get(qn);
- System.out.println(qn + " -> " + cl);
- }
- } else {
- System.out.println("WITH STANDARD MAPPINGS RETURNED
NULL!!");
- assertTrue("With wsdl "+wsdl+" and using a classloader,
table with standard mappings was null", false);
- }
- checkResult(wsdl, table2, expectedResults);
-
System.out.println("-----------------------------------------------------\n");
+ System.out.println("*** " + wsdl + " ***\n");
+ ClassLoader loader = this.getClass().getClassLoader();
+ Definition def = WSIFUtils.readWSDL(null, wsdl, loader);
+ Hashtable table = new Hashtable();
+ Parser.getTypeMappings(def, table, loader, false);
+ if (table != null) {
+ System.out.println("WITHOUT STANDARD MAPPINGS:");
+ Enumeration k = table.keys();
+ while(k.hasMoreElements()) {
+ QName qn = (QName) k.nextElement();
+ String cl = (String) table.get(qn);
+ System.out.println(qn + " -> " + cl);
+ }
+ } else {
+ System.out.println("WITHOUT STANDARD MAPPINGS RETURNED
NULL!!");
+ assertTrue("With wsdl "+wsdl+" and using a
classloader, table without standard mappings was null", false);
+ }
+ checkResult(wsdl, table, expectedResults);
+ System.out.println("- - - -");
+ Hashtable table2 = new Hashtable();
+ Parser.getTypeMappings(def, table2, loader, true);
+ if (table2 != null) {
+ System.out.println("WITH STANDARD MAPPINGS:");
+ Enumeration k = table2.keys();
+ while(k.hasMoreElements()) {
+ QName qn = (QName) k.nextElement();
+ String cl = (String) table2.get(qn);
+ System.out.println(qn + " -> " + cl);
+ }
+ } else {
+ System.out.println("WITH STANDARD MAPPINGS RETURNED
NULL!!");
+ assertTrue("With wsdl "+wsdl+" and using a
classloader, table with standard mappings was null", false);
+ }
+ checkResult(wsdl, table2, expectedResults);
+
System.out.println("-----------------------------------------------------\n");
} catch (Exception e) {
System.err.println(
"SchemaTest caught exception " + e);
e.printStackTrace();
assertTrue(false);
} finally {
- TestUtilities.resetDefaultProviders();
+ TestUtilities.resetDefaultProviders();
}
}
private void checkResult(String wsdl, Hashtable results, Hashtable
expected) {
- Enumeration enum = expected.keys();
- while(enum.hasMoreElements()) {
- QName key = (QName) enum.nextElement();
- String value = (String) expected.get(key);
- if (results.containsKey(key)) {
- String resultVal = (String) results.get(key);
- if (!value.equals(resultVal)) {
- assertTrue("Using wsdl "+wsdl+" results did not
contain correct value for type "+key
- + ", value should be "+value+" but result was
"+resultVal, false);
- }
- } else {
- assertTrue("Using wsdl "+wsdl+" results did not contain
type "+key, false);
- }
- }
+ Enumeration e = expected.keys();
+ while(e.hasMoreElements()) {
+ QName key = (QName) e.nextElement();
+ String value = (String) expected.get(key);
+ if (results.containsKey(key)) {
+ String resultVal = (String) results.get(key);
+ if (!value.equals(resultVal)) {
+ assertTrue("Using wsdl "+wsdl+" results did
not contain correct value for type "+key
+ + ", value should be "+value+" but result was
"+resultVal, false);
+ }
+ } else {
+ assertTrue("Using wsdl "+wsdl+" results did not
contain type "+key, false);
+ }
+ }
}
}