owenb 2002/12/06 05:33:44
Modified: java/src/org/apache/wsif/providers/ejb
WSIFOperation_EJB.java
java/src/org/apache/wsif/providers/java WSIFPort_Java.java
WSIFOperation_Java.java
Log:
Fix: support element attribute in message parts and elementName attribute in the
format binding
Revision Changes Path
1.24 +6 -1
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.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- WSIFOperation_EJB.java 4 Dec 2002 17:27:00 -0000 1.23
+++ WSIFOperation_EJB.java 6 Dec 2002 13:33:44 -0000 1.24
@@ -288,7 +288,9 @@
Map map = operation.getFault(name).getMessage().getParts();
if (map.size() >= 1) {
Part part = (Part) map.values().iterator().next();
- Object formatType = fieldTypeMaps.get(part.getTypeName());
+ QName partType = part.getTypeName();
+ if (partType == null) partType = part.getElementName();
+ Object formatType = fieldTypeMaps.get(partType);
if (formatType == null) {
throw new WSIFException(
"formatType for typeName '"
@@ -477,6 +479,7 @@
TypeMap typeMap = (TypeMap) bindingIterator.next();
///////////////////////////////////
QName typeName = typeMap.getTypeName();
+ if (typeName == null) typeName = typeMap.getElementName();
String type = typeMap.getFormatType();
if (typeName != null && type != null) {
if (fieldTypeMaps.containsKey(typeName)) {
@@ -552,6 +555,7 @@
// If there is no returnPart specified then not interested in
return value
if (returnPart != null) {
QName partType = returnPart.getTypeName();
+ if (partType == null) partType = returnPart.getElementName();
Object obj = this.fieldTypeMaps.get(partType);
if (obj == null)
@@ -681,6 +685,7 @@
// should also check for the element
QName partType = part.getTypeName();
+ if (partType == null) partType = part.getElementName();
Object obj = this.fieldTypeMaps.get(partType);
if (obj == null)
throw new WSIFException(
1.11 +1 -0
xml-axis-wsif/java/src/org/apache/wsif/providers/java/WSIFPort_Java.java
Index: WSIFPort_Java.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/java/WSIFPort_Java.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- WSIFPort_Java.java 24 Oct 2002 16:09:07 -0000 1.10
+++ WSIFPort_Java.java 6 Dec 2002 13:33:44 -0000 1.11
@@ -278,6 +278,7 @@
TypeMap typeMap = (TypeMap) bindingIterator.next();
///////////////////////////////////
QName typeName = typeMap.getTypeName();
+ if (typeName == null) typeName = typeMap.getElementName();
String type = typeMap.getFormatType();
if (typeName != null && type != null) {
if (fieldTypeMaps.containsKey(typeName)) {
1.26 +7 -3
xml-axis-wsif/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
Index: WSIFOperation_Java.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- WSIFOperation_Java.java 4 Dec 2002 17:27:01 -0000 1.25
+++ WSIFOperation_Java.java 6 Dec 2002 13:33:44 -0000 1.26
@@ -380,7 +380,9 @@
Map map = operation.getFault(name).getMessage().getParts();
if (map.size() >= 1) {
Part part = (Part) map.values().iterator().next();
- Object formatType = fieldTypeMaps.get(part.getTypeName());
+ QName partType = part.getTypeName();
+ if (partType == null) partType = part.getElementName();
+ Object formatType = fieldTypeMaps.get(partType);
if (formatType == null) {
throw new WSIFException(
"formatType for typeName '" + part.getName() + "' not found
in document");
@@ -543,7 +545,8 @@
// If there is no returnPart specified then not interested in
return value
if (returnPart != null) {
- QName partType = returnPart.getTypeName();
+ QName partType = returnPart.getTypeName();
+ if (partType == null) partType = returnPart.getElementName();
Object obj = this.fieldTypeMaps.get(partType);
if (obj == null)
throw new WSIFException(
@@ -665,7 +668,8 @@
argNames.add((String) part.getName());
// should also check for the element
- QName partType = part.getTypeName();
+ QName partType = part.getTypeName();;
+ if (partType == null) partType = part.getElementName();
Object obj = this.fieldTypeMaps.get(partType);
if (obj == null)
throw new WSIFException(