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 Tom Jordahl <to...@macromedia.com> on 2002/03/20 15:47:16 UTC
RE: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava Sym
bolTable.java
Hey Russell,
Isn't use a required attribute in the WSDL?
I guess WSDL4J doesn't require it.... :-(
--
Tom Jordahl
-----Original Message-----
From: butek@apache.org [mailto:butek@apache.org]
Sent: Wednesday, March 20, 2002 8:37 AM
To: xml-axis-cvs@apache.org
Subject: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava
SymbolTable.java
butek 02/03/20 05:36:47
Modified: java/src/org/apache/axis/utils resources.properties
java/src/org/apache/axis/wsdl/toJava SymbolTable.java
Log:
Throw a useful exception if the use attribute is missing from a
soap:operation. It used to throw NullPointerException.
Revision Changes Path
1.78 +2 -0 xml-axis/java/src/org/apache/axis/utils/resources.properties
Index: resources.properties
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- resources.properties 19 Mar 2002 22:51:14 -0000 1.77
+++ resources.properties 20 Mar 2002 13:36:47 -0000 1.78
@@ -775,3 +775,5 @@
noElemOrType=Error: Message part {0} of operation {1} should have either an element or a type attribute
badTypeNode=Error: Missing type resolution for element {2}, in WSDL message part {0} of operation {1}
+# NOTE: in noUse, do no translate "soap:operation", "binding operation", "use".
+noUse=The soap:operation for binding operation {0} must have a "use" attribute.
1.48 +12 -0 xml-axis/java/src/org/apache/axis/wsdl/toJava/SymbolTable.java
Index: SymbolTable.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/SymbolTable.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- SymbolTable.java 19 Mar 2002 23:29:28 -0000 1.47
+++ SymbolTable.java 20 Mar 2002 13:36:47 -0000 1.48
@@ -1236,6 +1236,10 @@
Object obj = inIter.next();
if (obj instanceof SOAPBody) {
String use = ((SOAPBody) obj).getUse();
+ if (use == null) {
+ throw new IOException(JavaUtils.getMessage(
+ "noUse", bindOp.getName()));
+ }
if (use.equalsIgnoreCase("literal")) {
inputBodyType = BindingEntry.USE_LITERAL;
}
@@ -1253,6 +1257,10 @@
Object obj = outIter.next();
if (obj instanceof SOAPBody) {
String use = ((SOAPBody) obj).getUse();
+ if (use == null) {
+ throw new IOException(JavaUtils.getMessage(
+ "noUse", bindOp.getName()));
+ }
if (use.equalsIgnoreCase("literal")) {
outputBodyType = BindingEntry.USE_LITERAL;
}
@@ -1278,6 +1286,10 @@
Object obj = faultIter.next();
if (obj instanceof SOAPBody) {
String use = ((SOAPBody) obj).getUse();
+ if (use == null) {
+ throw new IOException(JavaUtils.getMessage(
+ "noUse", bindOp.getName()));
+ }
if (use.equalsIgnoreCase("literal")) {
faultBodyType = BindingEntry.USE_LITERAL;
}