You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ha...@apache.org on 2003/04/11 15:21:24 UTC

cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava JavaStubWriter.java

haddadc     2003/04/11 06:21:24

  Modified:    java/src/org/apache/axis/client Stub.java
               java/src/org/apache/axis/wsdl/toJava JavaStubWriter.java
  Log:
  deprecated Stub.getResponseHeaders() and removed code for that method so that response headers are not automatically reflected back into the global header list for the Stub.  The method will remain in the code because pre-1.1 stubs will reference the method. Updated the stub writer to not generate files referencing getResponseHeaders().
  PR:18854
  
  Revision  Changes    Path
  1.27      +10 -37    xml-axis/java/src/org/apache/axis/client/Stub.java
  
  Index: Stub.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Stub.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Stub.java	10 Apr 2003 00:36:00 -0000	1.26
  +++ Stub.java	11 Apr 2003 13:21:24 -0000	1.27
  @@ -406,43 +406,16 @@
   
       /**
        * Helper method for updating headers from the response.
  +     *
  +     * Deprecated, since response headers should not be
  +     * automatically reflected back into the stub list.
  +     *
  +     *
  +     * @deprecated This method has been changed to a no-op but remains
  +     *               in the code to keep compatibility with pre-1.1
  +     *               generated stubs.
        */
  -    protected void getResponseHeaders(org.apache.axis.client.Call call) throws AxisFault {		
  -        org.apache.axis.Message response = call.getMessageContext().getResponseMessage();      
  -        org.apache.axis.message.SOAPEnvelope env = response.getSOAPEnvelope();
  -        if ( env != null )	{
  -            Iterator iterator = env.getHeaders().iterator();
  -            while(iterator.hasNext()){
  -                SOAPHeaderElement header = (SOAPHeaderElement) iterator.next();
  -                int iPosition = getHeaderPosition(headers,header);
  -                if (iPosition == -1)
  -                	headers.add(header);
  -                else
  -                	headers.set(iPosition,header);
  -            }
  -        }				
  -    }  
  +     protected void getResponseHeaders(org.apache.axis.client.Call call) throws AxisFault {
  +     }
   
  -	/**
  -   *    Determine if a specific header exists in a list of headers
  -   *    and return the list index position
  -   *    Call this method before adding headers to our list
  -   *    @param vElems - list of headers
  -   *    @param  oHeader - header to check for...
  -   *    @return the index position where the item was found or -1
  -   */
  -    private int getHeaderPosition(Vector vElems,SOAPHeaderElement oHeader) {
  - 
  -      if (vElems == null)
  -        return -1;
  - 
  -      for(int iScan=0;iScan<vElems.size();iScan++) {
  -        SOAPHeaderElement oElem = (SOAPHeaderElement)vElems.get(iScan);
  -        if (oElem.getQName().equals(oHeader.getQName()) == true) {
  -            return iScan;           
  -          }
  - 
  -      }
  -      return -1;
  -    }
   }
  
  
  
  1.114     +0 -2      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
  
  Index: JavaStubWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
  retrieving revision 1.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- JavaStubWriter.java	19 Jan 2003 21:25:10 -0000	1.113
  +++ JavaStubWriter.java	11 Apr 2003 13:21:24 -0000	1.114
  @@ -852,7 +852,6 @@
           int allOuts = parms.outputs + parms.inouts;
           if (allOuts > 0) {
               pw.println("        else {");
  -            pw.println("            getResponseHeaders(_call);");
               pw.println("            extractAttachments(_call);");
           
               if (allOuts == 1) {
  @@ -900,7 +899,6 @@
               }
               pw.println("        }");
           } else {
  -            pw.println("        getResponseHeaders(_call);");
               pw.println("        extractAttachments(_call);");
           }
       } // writeResponseHandling