axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject cvs commit: xml-axis-wsif/java/src/org/apache/wsif/util WSIFUtils.java
Date Thu, 02 Jan 2003 10:39:40 GMT
antelder    2003/01/02 02:39:40

  Modified:    java/src/org/apache/wsif/base WSIFClientProxy.java
               java/src/org/apache/wsif/util WSIFUtils.java
  Log:
  Fix client proxy to correctly determine when a wrapped document literal style operation
is being called with either wrapped or unwrapped parts.
  
  Revision  Changes    Path
  1.13      +20 -8     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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- WSIFClientProxy.java	7 Dec 2002 12:34:01 -0000	1.12
  +++ WSIFClientProxy.java	2 Jan 2003 10:39:39 -0000	1.13
  @@ -286,7 +286,9 @@
           List inputParts = (inputMessage == null) 
              ? new ArrayList() 
              : inputMessage.getOrderedParts(null);
  -        unWrapIfWrappedDocLit(inputParts, operation.getName());
  +        if (inputParts.size() != args.length) {
  +            unWrapIfWrappedDocLit(inputParts, operation.getName());
  +        }
           Iterator partIt = inputParts.iterator();
           int argIndex;
           for (argIndex = 0; partIt.hasNext(); argIndex++) {
  @@ -320,13 +322,19 @@
           Object result = null;
           if (outputMessage != null) {
               List outputParts = outputMessage.getOrderedParts(null);
  -            unWrapIfWrappedDocLit(outputParts, operation.getName()+"Response");
               if (outputParts != null && outputParts.size() > 0) {
                   // The return value is always the first output part
                   Iterator outPartIt = outputParts.iterator();
                   Part returnPart = (Part) outPartIt.next();
  -                result = wsifOutputMessage.getObjectPart(returnPart.getName());
  -
  +                try {
  +                    result = wsifOutputMessage.getObjectPart(returnPart.getName());
  +                } catch (WSIFException e) {
  +                	Trc.ignoredException(e);
  +                    unWrapIfWrappedDocLit(outputParts, operation.getName()+"Response");
  +                    outPartIt = outputParts.iterator();
  +                    returnPart = (Part) outPartIt.next();
  +                    result = wsifOutputMessage.getObjectPart(returnPart.getName());
  +                }
                   // Are there any inout parts? Multiple output-only parts
                   // are not allowed in java. Skip over input-only parts in the message.
                   if (outPartIt.hasNext()) {
  @@ -432,7 +440,7 @@
           while (opIt.hasNext()) {
               Operation operation = (Operation) opIt.next();
               // If the method name doesn't match the operation name this isn't the operation
  -            if (!methodName.equals(operation.getName()))
  +            if (!methodName.equalsIgnoreCase(operation.getName()))
                   continue;
   
               Input input = operation.getInput();
  @@ -440,7 +448,6 @@
               List inputParts = (inputMessage == null) 
                  ? new ArrayList() 
                  : inputMessage.getOrderedParts(null);
  -            unWrapIfWrappedDocLit(inputParts, operation.getName());
               
               int numInputParts = inputParts.size();
   
  @@ -451,8 +458,13 @@
               }
   
               // No match if there are different numbers of parameters
  -            if (numInputParts != types.length)
  -                continue;
  +            if (numInputParts != types.length) {
  +                unWrapIfWrappedDocLit(inputParts, operation.getName());
  +                numInputParts = inputParts.size();
  +                if (numInputParts != types.length) {
  +                    continue;
  +                }
  +            }
   
               // Go through all the parameters making sure all their datatypes match
               Iterator partIt = inputParts.iterator();
  
  
  
  1.27      +3 -3      xml-axis-wsif/java/src/org/apache/wsif/util/WSIFUtils.java
  
  Index: WSIFUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/util/WSIFUtils.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- WSIFUtils.java	2 Jan 2003 10:34:52 -0000	1.26
  +++ WSIFUtils.java	2 Jan 2003 10:39:40 -0000	1.27
  @@ -1120,7 +1120,7 @@
            if (bops != null) {
               for (Iterator i = bops.iterator(); i.hasNext();) {
                  BindingOperation bop = (BindingOperation) i.next();
  -               if ( opName.equals(bop.getName()) ) {
  +               if ( opName.equalsIgnoreCase(bop.getName()) ) {
                     matchingOps.add(bop);
                  }
               }
  @@ -1149,10 +1149,10 @@
            String boutName = (bop.getBindingOutput() == null) ?
               null : 
               bop.getBindingOutput().getName();
  -         if ((inName == null) ? binName == null : inName.equals(binName)) {
  +         if ((inName == null) ? binName == null : inName.equalsIgnoreCase(binName)) {
               if ((outName == null)
                  ? boutName == null
  -               : outName.equals(boutName)) {
  +               : outName.equalsIgnoreCase(boutName)) {
                  if ( choosenOp == null ) {
                     choosenOp = bop;
                  } else {
  
  
  

Mime
View raw message