axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muthu...@apache.org
Subject cvs commit: ws-axis/contrib/axismora/src/org/apache/axismora/client SOAPBodyContentFactory.java Call.java ClientRequestContext.java AxisClient.java InputParameterInfo.java
Date Sat, 03 Jan 2004 03:41:23 GMT
muthulee    2004/01/02 19:41:23

  Modified:    contrib/axismora/src/org/apache/axismora/client Call.java
                        ClientRequestContext.java AxisClient.java
                        InputParameterInfo.java
  Added:       contrib/axismora/src/org/apache/axismora/client
                        SOAPBodyContentFactory.java
  Log:
  Client tested. Fixed.
  PR:
  Obtained from:
  Submitted by:	
  Reviewed by:	
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.5       +2 -2      ws-axis/contrib/axismora/src/org/apache/axismora/client/Call.java
  
  Index: Call.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/axismora/src/org/apache/axismora/client/Call.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Call.java	19 Dec 2003 03:35:15 -0000	1.4
  +++ Call.java	3 Jan 2004 03:41:23 -0000	1.5
  @@ -113,7 +113,7 @@
       /*style of the web service*/ 
       private Style style;
       /*specifies whether literal or encoded*/
  -    private Use use;
  +    private Use use = Use.ENCODED;
        
       private SOAPConstants constants = SOAPConstants.SOAP12_CONSTANTS;
   
  @@ -313,7 +313,7 @@
   
               ClientRequestContext reqContext =
                   new ClientRequestContext(sender, soapAction, 
  -                			methodName, inInfo, style, encoding);
  +                			methodName, inInfo, style, encoding, use);
                   			
               return this.engine.processClient(reqContext);
           } catch (MalformedURLException e) {
  
  
  
  1.3       +20 -5     ws-axis/contrib/axismora/src/org/apache/axismora/client/ClientRequestContext.java
  
  Index: ClientRequestContext.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/axismora/src/org/apache/axismora/client/ClientRequestContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClientRequestContext.java	21 Nov 2003 04:39:58 -0000	1.2
  +++ ClientRequestContext.java	3 Jan 2004 03:41:23 -0000	1.3
  @@ -62,6 +62,7 @@
   
   import org.apache.axis.AxisFault;
   import org.apache.axis.enum.Style;
  +import org.apache.axis.enum.Use;
   
   /**
    * @author hemapani
  @@ -73,17 +74,22 @@
       /* name of the method the client invokes */
       private QName methodName;
   
  -    private Serializable[] inparams;
  +    private InputParameterInfo[] inparams;
  +    
  +    /*This object would serialize the body, specific to different modes.*/
  +    private Serializable bodySerializer;
  +    
       private Style style;
       private String encoding;
  -
  +    private Use use;
  +    
       public ClientRequestContext(
           HTTPSender sender,
           QName soapAction,
           QName methodName,
  -        Serializable[] inparams,
  +	    InputParameterInfo[] inparams,
           Style style,
  -        String encoding)
  +        String encoding, Use use)
           throws AxisFault {
           if (soapAction == null)
               throw new AxisFault("the soap action must be specified");
  @@ -94,6 +100,7 @@
           this.methodName = methodName;
           this.style = (style == null ? Style.RPC : style);
           this.encoding = encoding;
  +        this.use = use;
       }
   
       /**
  @@ -114,6 +121,7 @@
        * @return
        */
       public Style getStyle() {
  +        this.style= Style.DOCUMENT;
           return style;
       }
   
  @@ -134,8 +142,15 @@
       /**
        * @return
        */
  -    public Serializable[] getInparams() {
  +    public InputParameterInfo[] getInparams() {
           return inparams;
  +    }
  +   
  +    /**
  +     * @return
  +     */
  +    public Use getUse() {
  +        return use;
       }
   
   }
  
  
  
  1.3       +6 -3      ws-axis/contrib/axismora/src/org/apache/axismora/client/AxisClient.java
  
  Index: AxisClient.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/axismora/src/org/apache/axismora/client/AxisClient.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AxisClient.java	15 Dec 2003 03:22:25 -0000	1.2
  +++ AxisClient.java	3 Jan 2004 03:41:23 -0000	1.3
  @@ -145,11 +145,14 @@
                */
               data = new BasicMessageContext(nodeinfo, service, servicepool, requestContext);
               data.setAtServerSide(false);
  -            data.setMethodName(requestContext.getMethodName());
  -            data.setSoapBodyContent(requestContext.getInparams());
  -
  +            
  +            //TODO:below line should be handled inside SOAPBodyContentFactory.
  +            //data.setMethodName(requestContext.getMethodName()); 
  +            data.setSoapBodyContent(SOAPBodyContentFactory.getSOAPBodyContent(requestContext));
  +            
               //set http user detail
               this.invoke(data);
  +           
               return data;
           } catch (Exception e) {
               throw AxisFault.makeFault(e);
  
  
  
  1.4       +17 -0     ws-axis/contrib/axismora/src/org/apache/axismora/client/InputParameterInfo.java
  
  Index: InputParameterInfo.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/axismora/src/org/apache/axismora/client/InputParameterInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InputParameterInfo.java	15 Dec 2003 03:22:25 -0000	1.3
  +++ InputParameterInfo.java	3 Jan 2004 03:41:23 -0000	1.4
  @@ -107,4 +107,21 @@
           outparam = parameter;
       }
   
  +	public OutParameter getOutParamter(){
  +		   return outparam;
  +	}
  +    /**
  +     * @return
  +     */
  +    public QName getQname() {
  +        return qname;
  +    }
  +
  +    /**
  +     * @param name
  +     */
  +    public void setQname(QName name) {
  +        qname = name;
  +    }
  +
   }
  
  
  
  1.1                  ws-axis/contrib/axismora/src/org/apache/axismora/client/SOAPBodyContentFactory.java
  
  Index: SOAPBodyContentFactory.java
  ===================================================================
  package org.apache.axismora.client;
  
  import org.apache.axis.enum.Style;
  import org.apache.axismora.provider.result.DocLiteralSerializer;
  
  /**
   * 
   * @author Dimuthu
   * @author Srinath
   *
   * To change the template for this generated type comment go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  public class SOAPBodyContentFactory {
  	
  	public static Object getSOAPBodyContent(ClientRequestContext requestContext){
  		if(Style.DOCUMENT.equals(requestContext.getStyle())){
  		System.out.println("I am in document");
  		InputParameterInfo[] info = requestContext.getInparams();
  		InputParameterInfo param = info[0];
  			return new DocLiteralSerializer(param.getOutParamter(),param.getQname());
  		
  		}else{
  			System.out.println("I am not ******* in document");
  			return new Object();
  		}		
  	}
  }
  
  
  

Mime
View raw message