gdaniels 2002/09/25 09:54:24
Modified: java/src/org/apache/axis/description ServiceDesc.java
java/src/org/apache/axis/i18n resource.properties
java/src/org/apache/axis/message MessageElement.java
java/src/org/apache/axis/providers/java MsgProvider.java
Log:
Allow matching of operation to any namespace on message style services
with no namespace specified.
Throw reasonable fault in MsgProvider if no operation could be found.
Add getQName() API for convenience on MessageElement.
Revision Changes Path
1.61 +3 -1 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.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- ServiceDesc.java 24 Sep 2002 21:02:23 -0000 1.60
+++ ServiceDesc.java 25 Sep 2002 16:54:24 -0000 1.61
@@ -431,7 +431,9 @@
if (overloads == null) {
// Nothing specifically matching this QName.
- if ((style == Style.RPC) && (name2OperationsMap != null)) {
+ if (((style == Style.RPC) || ((style==Style.MESSAGE) &&
+ (getDefaultNamespace() == null))) &&
+ (name2OperationsMap != null)) {
// Try ignoring the namespace....?
overloads = (ArrayList)name2OperationsMap.get(qname.getLocalPart());
}
1.8 +1 -1 xml-axis/java/src/org/apache/axis/i18n/resource.properties
Index: resource.properties
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/i18n/resource.properties,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- resource.properties 25 Sep 2002 16:35:33 -0000 1.7
+++ resource.properties 25 Sep 2002 16:54:24 -0000 1.8
@@ -1029,5 +1029,5 @@
badMsgMethodParams=Method ''{0}'' does not match any of the valid signatures for
message-style service methods
unmatchedOp=Binding operation has no corresponding portType operation: name = {0},
input name = {1}, output name = {2}
-
+noOperationForQName=Couldn't find an appropriate operation for XML QName {0}
noParmDesc=operation description is missing parameter description!
1.129 +6 -0 xml-axis/java/src/org/apache/axis/message/MessageElement.java
Index: MessageElement.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/MessageElement.java,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- MessageElement.java 18 Sep 2002 16:10:28 -0000 1.128
+++ MessageElement.java 25 Sep 2002 16:54:24 -0000 1.129
@@ -312,6 +312,12 @@
public String getName() { return( name ); }
public void setName(String name) { this.name = name; }
+
+ public QName getQName() { return new QName(namespaceURI, name); }
+ public void setQName(QName qName) {
+ this.name = qName.getLocalPart();
+ this.namespaceURI = qName.getNamespaceURI();
+ }
public String getPrefix() { return( prefix ); }
public void setPrefix(String prefix) { this.prefix = prefix; }
1.34 +6 -0
xml-axis/java/src/org/apache/axis/providers/java/MsgProvider.java
Index: MsgProvider.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/providers/java/MsgProvider.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- MsgProvider.java 24 Sep 2002 21:02:23 -0000 1.33
+++ MsgProvider.java 25 Sep 2002 16:54:24 -0000 1.34
@@ -104,6 +104,12 @@
throws Exception
{
OperationDesc operation = msgContext.getOperation();
+ if (operation == null) {
+ throw new AxisFault(Messages.getMessage("noOperationForQName",
+ reqEnv.getFirstBody().
+ getQName().toString()));
+ }
+
Method method = operation.getMethod();
int methodType = operation.getMessageOperationStyle();