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 wh...@apache.org on 2002/09/06 15:52:49 UTC
cvs commit: xml-axis-wsif/java/src/org/apache/wsif/providers/ejb WSIFOperation_EJB.java
whitlock 2002/09/06 06:52:49
Modified: java/src/org/apache/wsif/providers/ejb
WSIFOperation_EJB.java
Log:
For EJB typemap support encoding=Java and encoding=EJB
Revision Changes Path
1.15 +12 -5 xml-axis-wsif/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java
Index: WSIFOperation_EJB.java
===================================================================
RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- WSIFOperation_EJB.java 4 Sep 2002 18:23:50 -0000 1.14
+++ WSIFOperation_EJB.java 6 Sep 2002 13:52:49 -0000 1.15
@@ -430,14 +430,21 @@
Iterator bindingIterator =
fieldPortModel.getBinding().getExtensibilityElements().iterator();
- // Choose the first typeMap that has encoding=Java and style=Java.
- // Ignore any other typeMap's that have other encodings and styles.
+ /*
+ * 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
+ * the tooling assumed EJB, and now because of backwards compatibility
+ * we end up supporting both.
+ */
while (bindingIterator.hasNext()) {
Object next = bindingIterator.next();
if (next instanceof TypeMapping) {
typeMapping = (TypeMapping) next;
- if ("Java".equals(typeMapping.getEncoding()) &&
- "Java".equals(typeMapping.getStyle()))
+ if (("Java".equals(typeMapping.getEncoding())
+ || "EJB".equals(typeMapping.getEncoding()))
+ && "Java".equals(typeMapping.getStyle()))
break;
typeMapping = null;
}
@@ -448,7 +455,7 @@
throw new WSIFException(
"Binding "
+ (bindingName == null ? "<null>" : bindingName.toString())
- + " does not contain a typeMap with encoding=Java and style=Java");
+ + " does not contain a typeMap with encoding=Java or encoding=EJB and style=Java");
}
// Build the hashmap