owenb 2002/12/06 05:32:14 Modified: java/src/org/apache/wsif/providers/java Tag: pre1_2_0-patches WSIFPort_Java.java WSIFOperation_Java.java java/src/org/apache/wsif/providers/ejb Tag: pre1_2_0-patches WSIFOperation_EJB.java Log: Fix: support element attribute in message parts and elementName attribute in the format binding Revision Changes Path No revision No revision 1.10.2.1 +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.10.2.1 diff -u -r1.10 -r1.10.2.1 --- WSIFPort_Java.java 24 Oct 2002 16:09:07 -0000 1.10 +++ WSIFPort_Java.java 6 Dec 2002 13:32:14 -0000 1.10.2.1 @@ -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.21.2.5 +5 -1 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.21.2.4 retrieving revision 1.21.2.5 diff -u -r1.21.2.4 -r1.21.2.5 --- WSIFOperation_Java.java 4 Dec 2002 17:29:02 -0000 1.21.2.4 +++ WSIFOperation_Java.java 6 Dec 2002 13:32:14 -0000 1.21.2.5 @@ -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"); @@ -544,6 +546,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) throw new WSIFException( @@ -666,6 +669,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( No revision No revision 1.19.2.5 +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.19.2.4 retrieving revision 1.19.2.5 diff -u -r1.19.2.4 -r1.19.2.5 --- WSIFOperation_EJB.java 4 Dec 2002 17:29:02 -0000 1.19.2.4 +++ WSIFOperation_EJB.java 6 Dec 2002 13:32:14 -0000 1.19.2.5 @@ -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(