antelder 2003/01/02 07:34:26
Modified: java/src/org/apache/wsif/base WSIFClientProxy.java
Log:
Fix NPE in WSIFClientProxy when the operation has no input parts
Revision Changes Path
1.14 +12 -11 xml-axis-wsif/java/src/org/apache/wsif/base/WSIFClientProxy.java
Index: WSIFClientProxy.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/base/WSIFClientProxy.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- WSIFClientProxy.java 2 Jan 2003 10:39:39 -0000 1.13
+++ WSIFClientProxy.java 2 Jan 2003 15:34:25 -0000 1.14
@@ -286,15 +286,16 @@
List inputParts = (inputMessage == null)
? new ArrayList()
: inputMessage.getOrderedParts(null);
- if (inputParts.size() != args.length) {
- unWrapIfWrappedDocLit(inputParts, operation.getName());
- }
- Iterator partIt = inputParts.iterator();
- int argIndex;
- for (argIndex = 0; partIt.hasNext(); argIndex++) {
- Part part = (Part) partIt.next();
- String partName = part.getName();
- wsifInputMessage.setObjectPart(partName, args[argIndex]);
+ if (args != null) {
+ if (inputParts.size() != args.length) {
+ unWrapIfWrappedDocLit(inputParts, operation.getName());
+ }
+ Iterator partIt = inputParts.iterator();
+ for (int argIndex = 0; partIt.hasNext(); argIndex++) {
+ Part part = (Part) partIt.next();
+ String partName = part.getName();
+ wsifInputMessage.setObjectPart(partName, args[argIndex]);
+ }
}
if (output == null)
@@ -342,7 +343,7 @@
inputMessage.getOrderedParts(null).toArray();
Part nextOutPart = (Part) outPartIt.next();
- for (argIndex = 0; argIndex < args.length; argIndex++) {
+ for (int argIndex = 0; argIndex < args.length; argIndex++) {
if (((Part) (inPartArr[argIndex]))
.getName()
.equals(nextOutPart.getName())) {
@@ -458,7 +459,7 @@
}
// No match if there are different numbers of parameters
- if (numInputParts != types.length) {
+ if (types != null && (numInputParts != types.length)) {
unWrapIfWrappedDocLit(inputParts, operation.getName());
numInputParts = inputParts.size();
if (numInputParts != types.length) {