axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/encoding ServiceDescription.java
Date Wed, 04 Jul 2001 14:20:58 GMT
rubys       01/07/04 07:20:58

  Modified:    java/src/org/apache/axis/client ServiceClient.java
               java/src/org/apache/axis/encoding ServiceDescription.java
  Log:
  Move encoding from ServiceClient to ServiceDescription.  Default to
  soap encoding for rpc requests - allows simple rpc services to interop
  by default with Apache xml-soap 2.2.
  
  Revision  Changes    Path
  1.27      +3 -11     xml-axis/java/src/org/apache/axis/client/ServiceClient.java
  
  Index: ServiceClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/ServiceClient.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ServiceClient.java	2001/07/01 03:30:42	1.26
  +++ ServiceClient.java	2001/07/04 14:20:52	1.27
  @@ -96,7 +96,6 @@
                                                           
       // keep prop hashtable small
       private Hashtable properties = new Hashtable(10);
  -    protected String encodingStyleURI = null ;
       
       // For testing
       private static Handler localServer = null ;
  @@ -243,14 +242,6 @@
           return (String)msgContext.getProperty(name);
       }
       
  -    public void setEncodingStyleURI( String uri ) {
  -        encodingStyleURI = uri ;
  -    }
  -    
  -    public String getEncodingStyleURI() {
  -        return( encodingStyleURI );
  -    }
  -    
       public void setRequestMessage(Message msg) {
           msgContext.setRequestMessage(msg);
       }
  @@ -310,8 +301,9 @@
           Vector               resArgs = null ;
           Object               result = null ;
           
  -        if ( encodingStyleURI != null )
  -            reqEnv.setEncodingStyleURI( encodingStyleURI );
  +        String uri = null;
  +        if (serviceDesc != null) uri = serviceDesc.getEncodingStyleURI();
  +        if (uri != null) reqEnv.setEncodingStyleURI(uri);
           
           msgContext.setRequestMessage(reqMsg);
           
  
  
  
  1.6       +16 -0     xml-axis/java/src/org/apache/axis/encoding/ServiceDescription.java
  
  Index: ServiceDescription.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ServiceDescription.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServiceDescription.java	2001/06/21 14:27:13	1.5
  +++ ServiceDescription.java	2001/07/04 14:20:56	1.6
  @@ -56,6 +56,7 @@
    */
   
   import java.util.*;
  +import org.apache.axis.Constants;
   import org.apache.axis.utils.QName;
   
   /** A very simple service description class, to demonstrate one way
  @@ -73,9 +74,11 @@
   {
       public static final String REQUEST = "Request";
       public static final String RESPONSE = "Response";
  +
       
       String name;
       boolean serviceIsRPC = true;
  +    private String encodingStyleURI = null;
       
       class Param {
           public String name;
  @@ -105,11 +108,24 @@
       {
           this.name = name;
           this.serviceIsRPC = isRPC;
  +
  +        // For RPC, default to section 5 encoding
  +        if (isRPC) encodingStyleURI = Constants.URI_SOAP_ENC;
       }
       
       public boolean isRPC()
       {
           return this.serviceIsRPC;
  +    }
  +
  +    public void setEncodingStyleURI(String uri) 
  +    {
  +        encodingStyleURI = uri ;
  +    }
  +
  +    public String getEncodingStyleURI() 
  +    {
  +        return encodingStyleURI;
       }
       
       public void addInputParam(String name, QName type)
  
  
  

Mime
View raw message