antelder    2003/03/26 04:48:54

  Modified:    java/src/org/apache/wsif/providers/soap/apacheaxis
                        WSIFOperation_ApacheAxis.java
  Log:
  Correct the parameter namespace with use=literal
  
  Revision  Changes    Path
  1.83      +36 -5     
xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis/WSIFOperation_ApacheAxis.java
  
  Index: WSIFOperation_ApacheAxis.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis/WSIFOperation_ApacheAxis.java,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- WSIFOperation_ApacheAxis.java     20 Mar 2003 16:15:20 -0000      1.82
  +++ WSIFOperation_ApacheAxis.java     26 Mar 2003 12:48:54 -0000      1.83
  @@ -172,6 +172,8 @@
   
        transient protected String inputEncodingStyle;
        transient protected String inputNamespace;
  +     transient protected String inputUse;
  +
        transient protected String soapActionURI;
   
        transient protected HashMap responseMessageParameters;
  @@ -252,6 +254,7 @@
                op.setSoapActionURI(getSoapActionURI());
                op.setInputNamespace(getInputNamespace());
                op.setInputEncodingStyle(getInputEncodingStyle());
  +             op.setInputUse(getInputUse());
                op.setOutputEncodingStyle(getOutputEncodingStyle());
                op.setAsyncOperation(isAsyncOperation());
                op.setResponseHandler(getResponseHandler());
  @@ -580,6 +583,11 @@
                        throw new WSIFException(
                                "unsupported use " + use + " in " + soapOperation);
                }
  +             if (isInput == true) {
  +                     setInputUse(use);
  +             } else {
  +//                   setOutputUse(use);
  +             }
   
           // get encoding style
                if (isInput) {
  @@ -896,6 +904,22 @@
                return inputNamespace;
        }
   
  +    /**
  +     * Returns the inputUse.
  +     * @return String
  +     */
  +    public String getInputUse() {
  +        return inputUse;
  +    }
  +
  +    /**
  +     * Sets the inputUse.
  +     * @param inputUse The inputUse to set
  +     */
  +    protected void setInputUse(String inputUse) {
  +        this.inputUse = inputUse;
  +    }
  +
        /**
         * Gets the name of the portType wsdl:operation element
         * being used by this WSIFOperation
  @@ -1599,7 +1623,17 @@
         */
       private void setCallParameterNames(Call call) throws WSIFException {
   
  -             String inputNamespace = getInputNamespace();
  +        boolean wrappedStyleOp = 
  +            ProviderUtils.isUnwrapable(getPortTypeOperation());
  +
  +             String inputNamespace;
  +        if (WSIFAXISConstants.USE_LITERAL.equals(getInputUse())
  +        && !wrappedStyleOp) {
  +            inputNamespace = "";
  +        } else {
  +            inputNamespace = getInputNamespace();
  +        }
  +
                String outputNamespace = "";
   
                List soapParts;
  @@ -1631,13 +1665,10 @@
                   }
               }
               if (!inJmsProps.containsKey(partName)) {
  -                if (inputMIMEParts.isEmpty()
  -                || (inputMIMEParts.contains(p) || soapParts.contains(p))) {
  +                if (inputMIMEParts.contains(p) || soapParts.contains(p)) {
                       QName name = new QName(inputNamespace, partName);
                       QName type = getPartType(p);
                       call.addParameter(name, type, ParameterMode.IN);
  -//                    call.addParameter(partName, type, ParameterMode.IN);
  -//TODO: sort out param namespace
                   }
               }
           }
  
  
  

Reply via email to