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 di...@apache.org on 2003/12/03 18:19:20 UTC
cvs commit: ws-axis/java/src/org/apache/axis/wsdl/toJava Utils.java
dims 2003/12/03 09:19:20
Modified: java/src/org/apache/axis/i18n resource.properties
java/src/org/apache/axis/wsdl/toJava Utils.java
Log:
Add a warning when namespace is empty in binding/operation/input
Revision Changes Path
1.77 +1 -0 ws-axis/java/src/org/apache/axis/i18n/resource.properties
Index: resource.properties
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/i18n/resource.properties,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- resource.properties 30 Nov 2003 05:42:24 -0000 1.76
+++ resource.properties 3 Dec 2003 17:19:19 -0000 1.77
@@ -966,6 +966,7 @@
beanCompatType00=The class {0} is not a bean class and cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file.
beanCompatPkg00=The class {0} is defined in a java or javax package and cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file.
beanCompatConstructor00=The class {0} does not contain a default constructor, which is a requirement for a bean class. The class cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file.
+badNamespaceForOperation00=soap:body in Binding {0} / Operation {1} has an empty namespace
unsupportedSchemaType00=The XML Schema type ''{0}'' is not currently supported.
optionNoWrap00=turn off support for "wrapped" document/literal
1.80 +17 -0 ws-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java
Index: Utils.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- Utils.java 17 Nov 2003 15:14:03 -0000 1.79
+++ Utils.java 3 Dec 2003 17:19:19 -0000 1.80
@@ -55,8 +55,11 @@
package org.apache.axis.wsdl.toJava;
import org.apache.axis.Constants;
+import org.apache.axis.components.logger.LogFactory;
import org.apache.axis.enum.Style;
+import org.apache.axis.enum.Use;
import org.apache.axis.utils.JavaUtils;
+import org.apache.axis.utils.Messages;
import org.apache.axis.wsdl.symbolTable.BaseType;
import org.apache.axis.wsdl.symbolTable.BindingEntry;
import org.apache.axis.wsdl.symbolTable.CollectionTE;
@@ -69,6 +72,7 @@
import org.apache.axis.wsdl.symbolTable.SchemaUtils;
import org.apache.axis.wsdl.symbolTable.SymbolTable;
import org.apache.axis.wsdl.symbolTable.TypeEntry;
+import org.apache.commons.logging.Log;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -102,6 +106,9 @@
*/
public class Utils extends org.apache.axis.wsdl.symbolTable.Utils {
+ /** Field log */
+ protected static Log log = LogFactory.getLog(Utils.class.getName());
+
/**
* Given a type, return the Java mapping of that type's holder.
*
@@ -807,7 +814,12 @@
SOAPBody body = (SOAPBody) elem;
ns = body.getNamespaceURI();
+ if (bEntry.getInputBodyType(operation) == Use.ENCODED && (ns == null || ns.length() == 0)) {
+ log.warn(Messages.getMessage("badNamespaceForOperation00",
+ bEntry.getName(),
+ operation.getName()));
+ }
break;
} else if (elem instanceof MIMEMultipartRelated) {
Object part = null;
@@ -832,7 +844,12 @@
SOAPBody body = (SOAPBody) part;
ns = body.getNamespaceURI();
+ if (bEntry.getInputBodyType(operation) == Use.ENCODED && (ns == null || ns.length() == 0)) {
+ log.warn(Messages.getMessage("badNamespaceForOperation00",
+ bEntry.getName(),
+ operation.getName()));
+ }
break;
} else {
part = null;