You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2006/01/04 04:56:35 UTC

svn commit: r365814 [1/2] - in /webservices/axis2/trunk/java: modules/adb/src/org/apache/axis2/databinding/ modules/adb/src/org/apache/axis2/databinding/typemapping/ modules/adb/src/org/apache/axis2/databinding/types/ modules/core/src/org/apache/axis2/...

Author: chinthaka
Date: Tue Jan  3 19:55:47 2006
New Revision: 365814

URL: http://svn.apache.org/viewcvs?rev=365814&view=rev
Log:
- some updates to the docs (Thanks Chatra and Hasmin)
- removing un-necessary variable initializations

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBSOAPModelBuilder.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/SerializationContext.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/TypeMappingRegistry.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Day.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Duration.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Month.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/MonthDay.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NormalizedString.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedByte.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedInt.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedLong.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedShort.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ListenerManager.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Stub.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLMEPClientBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/async/Callback.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/addressing/EndpointReferenceTypeTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/addressing/miheaders/RelatesToTest.java
    webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/ByteArrayDataSource.java
    webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/DataHandlerUtils.java
    webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEBodyPartInputStream.java
    webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java
    webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/PartOnFile.java
    webservices/axis2/trunk/java/xdocs/faq.html
    webservices/axis2/trunk/java/xdocs/http-transport.html
    webservices/axis2/trunk/java/xdocs/mail-transport.html
    webservices/axis2/trunk/java/xdocs/mtom-guide.html
    webservices/axis2/trunk/java/xdocs/rest-ws.html

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBSOAPModelBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBSOAPModelBuilder.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBSOAPModelBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBSOAPModelBuilder.java Tue Jan  3 19:55:47 2006
@@ -14,8 +14,8 @@
  * Builds a SOAPEnvelope around an ADB pull parser
  */
 public class ADBSOAPModelBuilder extends StAXOMBuilder {
-    private SOAPBody body = null;
-    private SOAPEnvelope envelope = null;
+    private SOAPBody body;
+    private SOAPEnvelope envelope;
     
     public ADBSOAPModelBuilder(XMLStreamReader parser, SOAPFactory factory) {
         super(factory, parser);

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/SerializationContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/SerializationContext.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/SerializationContext.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/SerializationContext.java Tue Jan  3 19:55:47 2006
@@ -48,8 +48,8 @@
 
     static final QName MULTIREF_QNAME = new QName("MultiRef");
 
-    Map multirefObjects = null;
-    ArrayList multirefsToWrite = null;
+    Map multirefObjects;
+    ArrayList multirefsToWrite;
 
     int multirefs = NO_MULTIREFS;
     int lastID = 0;
@@ -61,7 +61,7 @@
         Serializer serializer;
     }
 
-    XMLStreamWriter writer = null;
+    XMLStreamWriter writer;
 
     public SerializationContext(XMLStreamWriter writer) {
         this.writer = writer;

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/TypeMappingRegistry.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/TypeMappingRegistry.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/TypeMappingRegistry.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/TypeMappingRegistry.java Tue Jan  3 19:55:47 2006
@@ -65,9 +65,8 @@
         //      looping case.  Con: Seems like an obtuse rule.)
         //
         // Changing the code from (1) to (2) to see if interop fairs better.
-        if (javaType.isArray()) return true;
+        return javaType.isArray();
 
-        return false;
     }
 
     public boolean isCollection() {

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Day.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Day.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Day.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Day.java Tue Jan  3 19:55:47 2006
@@ -25,7 +25,7 @@
  */
 public class Day implements java.io.Serializable {
     int day;
-    String timezone = null;
+    String timezone;
 
     /**
      * Constructs a Day with the given values

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Duration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Duration.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Duration.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Duration.java Tue Jan  3 19:55:47 2006
@@ -25,7 +25,7 @@
  * @see <a href="http://www.w3.org/TR/xmlschema-2/#duration">XML Schema 3.2.6</a>
  */
 public class Duration implements java.io.Serializable {
-    boolean isNegative = false;
+    boolean isNegative;
     int years;
     int months;
     int days;

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java Tue Jan  3 19:55:47 2006
@@ -24,7 +24,7 @@
  */
 public class HexBinary implements Serializable {
 
-    byte[] m_value = null;
+    byte[] m_value;
 
     public HexBinary() {
     }

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Month.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Month.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Month.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Month.java Tue Jan  3 19:55:47 2006
@@ -25,7 +25,7 @@
  */
 public class Month implements java.io.Serializable {
     int month;
-    String timezone = null;
+    String timezone;
 
     /**
      * Constructs a Month with the given values

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/MonthDay.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/MonthDay.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/MonthDay.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/MonthDay.java Tue Jan  3 19:55:47 2006
@@ -26,7 +26,7 @@
 public class MonthDay implements java.io.Serializable {
     int month;
     int day;
-    String timezone = null;
+    String timezone;
 
     /**
      * Constructs a MonthDay with the given values

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NormalizedString.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NormalizedString.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NormalizedString.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NormalizedString.java Tue Jan  3 19:55:47 2006
@@ -25,7 +25,7 @@
  */
 public class NormalizedString implements java.io.Serializable {
 
-    String m_value = null;   // JAX-RPC maps xsd:string to java.lang.String
+    String m_value;   // JAX-RPC maps xsd:string to java.lang.String
 
     public NormalizedString() {
         super();

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java Tue Jan  3 19:55:47 2006
@@ -226,9 +226,9 @@
   private String m_queryString = null;
 
   /** If specified, stores the fragment for this URI; otherwise null */
-  private String m_fragment = null;
+  private String m_fragment;
 
-  private static boolean DEBUG = false;
+  private static boolean DEBUG;
 
   /**
   * Construct a new and uninitialized URI.

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedByte.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedByte.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedByte.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedByte.java Tue Jan  3 19:55:47 2006
@@ -61,10 +61,7 @@
      * @param sValue number to check against range
      */
     public static boolean isValid(long sValue) {
-      if ( (sValue < 0L ) ||  (sValue > 255L) )
-        return false;
-      else
-        return true;
+        return !((sValue < 0L) || (sValue > 255L));
     }
 
 }

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedInt.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedInt.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedInt.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedInt.java Tue Jan  3 19:55:47 2006
@@ -77,10 +77,7 @@
      *
      */
     public static boolean isValid(long iValue) {
-      if ( (iValue < 0L)  || (iValue > 4294967295L))
-        return false;
-      else
-        return true;
+        return !((iValue < 0L) || (iValue > 4294967295L));
     }
 
     private Object __equalsCalc = null;

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedLong.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedLong.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedLong.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedLong.java Tue Jan  3 19:55:47 2006
@@ -56,11 +56,8 @@
     }
 
     public static boolean isValid(BigInteger value) {
-        if (value.compareTo(BigInteger.ZERO) == -1 || // less than zero
-                value.compareTo(MAX) == 1) {
-            return false;
-        }
-        return true;
+        return !(value.compareTo(BigInteger.ZERO) == -1 || // less than zero
+                value.compareTo(MAX) == 1);
     }
 
     public String toString() {

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedShort.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedShort.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedShort.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedShort.java Tue Jan  3 19:55:47 2006
@@ -59,10 +59,7 @@
      *
      */
     public static boolean isValid(long sValue) {
-      if ( (sValue < 0L  ) || (sValue > 65535L) )
-        return false;
-      else
-        return true;
+        return !((sValue < 0L) || (sValue > 65535L));
     }
 
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ListenerManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ListenerManager.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ListenerManager.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ListenerManager.java Tue Jan  3 19:55:47 2006
@@ -35,7 +35,6 @@
  * re-architectured. It allows the client to initialize only one ConfigurationContext in a given JVM.
  */
 public class ListenerManager {
-    public static int port = 6059;
     public static Map configurationContextMap = new HashMap();
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Stub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Stub.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Stub.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Stub.java Tue Jan  3 19:55:47 2006
@@ -48,8 +48,8 @@
      * ServiceContext. The user can share information through this
      * ServiceContext across operations.
      */
-    protected boolean _maintainSession = false;
-    protected String _currentSessionId = null;
+    protected boolean _maintainSession;
+    protected String _currentSessionId;
     protected Options _clientOptions = new Options();
     protected ConfigurationContext _configurationContext;
     protected ServiceContext _serviceContext;

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLMEPClientBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLMEPClientBuilder.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLMEPClientBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLMEPClientBuilder.java Tue Jan  3 19:55:47 2006
@@ -47,7 +47,7 @@
 import java.util.Iterator;
 
 public class WSDLMEPClientBuilder {
-    private boolean isoneway = false;
+    private boolean isoneway;
     private ConfigurationContext configurationContext;
     private WSDLDescription description;
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/async/Callback.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/async/Callback.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/async/Callback.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/async/Callback.java Tue Jan  3 19:55:47 2006
@@ -9,7 +9,7 @@
     /**
      * Field complete
      */
-    private boolean complete = false;
+    private boolean complete;
 
     /**
      * This method is invoked by Axis Engine once the asynchronous operation has completed sucessfully.

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java Tue Jan  3 19:55:47 2006
@@ -87,16 +87,16 @@
     /**
      * Field processingFault
      */
-    private boolean processingFault = false;
+    private boolean processingFault;
 
-    private boolean paused = false;
+    private boolean paused;
 
-    public boolean outputWritten = false;
+    public boolean outputWritten;
 
     /**
      * Field newThreadRequired
      */
-    private boolean newThreadRequired = false;
+    private boolean newThreadRequired;
 
     private boolean isSOAP11 = true;
 
@@ -106,20 +106,20 @@
     private ArrayList executionChain = new ArrayList();
 
     // Are we doing REST now?
-    private boolean doingREST = false;
+    private boolean doingREST;
 
     // Are we doing MTOM now?
-    private boolean doingMTOM = false;
+    private boolean doingMTOM;
 
-    QName transportInName = null;
+    QName transportInName;
 
-    QName transportOutname = null;
+    QName transportOutname;
 
-    String serviceGroupId = null;
+    String serviceGroupId;
 
-    String axisServiceName = null;
+    String axisServiceName;
 
-    QName axisOperationName = null;
+    QName axisOperationName;
 
     private transient AxisOperation axisOperation;
 
@@ -476,7 +476,7 @@
 
     /**
      * Set a property for this message context.
-     * 
+     *
      * @param name
      *            name of the property
      * @param value
@@ -493,7 +493,7 @@
      * my own options and then look in my context hierarchy. Since its possible
      * that the entire hierarchy is not present, I will start at whatever level
      * has been set and start there.
-     * 
+     *
      * @param name
      *            name of the property to search for
      * @return the value of the property, or null if the property is not found

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java Tue Jan  3 19:55:47 2006
@@ -39,7 +39,7 @@
  * creation in the OperationContexFactory.
  */
 public class OperationContext extends AbstractContext {
-    private boolean isComplete = false;
+    private boolean isComplete;
 
     // the AxisOperation of which this is a running instance. The MEP of this
     // AxisOperation must be one of the 8 predefined ones in WSDL 2.0.

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java Tue Jan  3 19:55:47 2006
@@ -31,6 +31,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.wsdl.WSDLDescription;
+import org.apache.wsdl.WSDLConstants;
 
 import javax.wsdl.Definition;
 import javax.wsdl.Port;
@@ -357,7 +358,7 @@
             //TODO : This gives an NPE , Sanka pls fix that
 //            PolicyUtil.populatePolicy(desc, this);
             
-            WOMWriter womWriter = WOMWriterFactory.createWriter(org.apache.wsdl.WSDLConstants.WSDL_1_1);
+            WOMWriter womWriter = WOMWriterFactory.createWriter(WSDLConstants.WSDL_1_1);
             womWriter.setdefaultWSDLPrefix("wsdl");
             womWriter.writeWOM(desc, out);
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WOM.java Tue Jan  3 19:55:47 2006
@@ -108,8 +108,8 @@
                                            Element documentElement) {
         WSDLTypes wsdlTypes = wsdlComponentFactory.createTypes();
         ExtensionFactory extensionFactory = wsdlComponentFactory.createExtensionFactory();
-        org.apache.wsdl.extensions.Schema schemaExtensibilityElement =
-                (org.apache.wsdl.extensions.Schema) extensionFactory.getExtensionElement(
+        Schema schemaExtensibilityElement =
+                (Schema) extensionFactory.getExtensionElement(
                         ExtensionConstants.SCHEMA);
         wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
         schemaExtensibilityElement.setElement(documentElement);
@@ -129,7 +129,7 @@
             if (inaxisMessage != null) {
                 MessageReference messageRefinput = wsdlComponentFactory.createMessageReference();
                 messageRefinput.setElementQName(inaxisMessage.getElementQName());
-                messageRefinput.setDirection(org.apache.wsdl.WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
+                messageRefinput.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
                 wsdlOperation.setInputMessage(messageRefinput);
             }
 
@@ -137,7 +137,7 @@
             if (outaxisMessage != null && outaxisMessage.getElementQName() != null) {
                 MessageReference messageRefout = wsdlComponentFactory.createMessageReference();
                 messageRefout.setElementQName(outaxisMessage.getElementQName());
-                messageRefout.setDirection(org.apache.wsdl.WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
+                messageRefout.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
                 wsdlOperation.setOutputMessage(messageRefout);
             }
             portType.setOperation(wsdlOperation);
@@ -199,7 +199,7 @@
             bindingoperation.addExtensibilityElement(soapOpimpl);
             if (inMessage != null) {
                 WSDLBindingMessageReference bindingInMessage = wsdlComponentFactory.createWSDLBindingMessageReference();
-                bindingInMessage.setDirection(org.apache.wsdl.WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
+                bindingInMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
                 bindingoperation.setInput(bindingInMessage);
 
                 SOAPBody requestSoapbody = (SOAPBody) extensionFactory.getExtensionElement(
@@ -214,7 +214,7 @@
             if (outMessage != null) {
                 WSDLBindingMessageReference bindingOutMessage = wsdlComponentFactory.createWSDLBindingMessageReference();
 
-                bindingOutMessage.setDirection(org.apache.wsdl.WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
+                bindingOutMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
                 bindingoperation.setOutput(bindingOutMessage);
                 SOAPBody resSoapbody = (SOAPBody) extensionFactory.getExtensionElement(
                         ExtensionConstants.SOAP_11_BODY);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java Tue Jan  3 19:55:47 2006
@@ -177,11 +177,7 @@
         } else {
             Parameter parameter = getParameter(parameterName);
 
-            if ((parameter != null) && parameter.isLocked()) {
-                return true;
-            } else {
-                return false;
-            }
+            return (parameter != null) && parameter.isLocked();
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java Tue Jan  3 19:55:47 2006
@@ -61,7 +61,7 @@
      * to get the original state this method can be used
      *
      * @param parameters <code>OMElement</code>
-     * @throws org.apache.axis2.AxisFault
+     * @throws AxisFault
      */
     public void deserializeParameters(OMElement parameters) throws AxisFault {
         Iterator iterator =

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/addressing/EndpointReferenceTypeTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/addressing/EndpointReferenceTypeTest.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/addressing/EndpointReferenceTypeTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/addressing/EndpointReferenceTypeTest.java Tue Jan  3 19:55:47 2006
@@ -17,6 +17,7 @@
 package org.apache.axis2.addressing;
 
 import junit.framework.TestCase;
+import junit.textui.TestRunner;
 import org.apache.axis2.om.OMElement;
 
 import javax.xml.namespace.QName;
@@ -29,7 +30,7 @@
     private String address = "htttp://wwww.openource.lk/~chinthaka";
 
     public static void main(String[] args) {
-        junit.textui.TestRunner.run(EndpointReferenceTypeTest.class);
+        TestRunner.run(EndpointReferenceTypeTest.class);
     }
 
     /*

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/addressing/miheaders/RelatesToTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/addressing/miheaders/RelatesToTest.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/addressing/miheaders/RelatesToTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/addressing/miheaders/RelatesToTest.java Tue Jan  3 19:55:47 2006
@@ -17,6 +17,7 @@
 package org.apache.axis2.addressing.miheaders;
 
 import junit.framework.TestCase;
+import junit.textui.TestRunner;
 import org.apache.axis2.addressing.RelatesTo;
 
 
@@ -27,7 +28,7 @@
 
 
     public static void main(String[] args) {
-        junit.textui.TestRunner.run(RelatesToTest.class);
+        TestRunner.run(RelatesToTest.class);
 
     }
 
@@ -36,7 +37,7 @@
     }
 
     public void testGetAddress() {
-        relatesTo = new org.apache.axis2.addressing.RelatesTo(address, relationshipType);
+        relatesTo = new RelatesTo(address, relationshipType);
 
         assertEquals(
                 "RelatesTo address has not been set properly in the constructor",

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/ByteArrayDataSource.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/ByteArrayDataSource.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/ByteArrayDataSource.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/ByteArrayDataSource.java Tue Jan  3 19:55:47 2006
@@ -16,12 +16,13 @@
 
 package org.apache.axis2.attachments;
 
+import javax.activation.DataSource;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-public class ByteArrayDataSource implements javax.activation.DataSource {
+public class ByteArrayDataSource implements DataSource {
 
     private byte[] data;
 

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/DataHandlerUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/DataHandlerUtils.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/DataHandlerUtils.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/DataHandlerUtils.java Tue Jan  3 19:55:47 2006
@@ -18,18 +18,20 @@
 
 import org.apache.axis2.util.Base64;
 
+import javax.activation.DataHandler;
+
 public class DataHandlerUtils {
 
   public static Object getDataHandlerFromText(String value, String mimeType)
   {
-      org.apache.axis2.attachments.ByteArrayDataSource dataSource;
+      ByteArrayDataSource dataSource;
       byte[] data = Base64.decode(value);
       if (mimeType != null) {
-          dataSource = new org.apache.axis2.attachments.ByteArrayDataSource(data, mimeType);
+          dataSource = new ByteArrayDataSource(data, mimeType);
       } else {
           // Assumes type as application/octet-stream
-          dataSource = new org.apache.axis2.attachments.ByteArrayDataSource(data);
+          dataSource = new ByteArrayDataSource(data);
       }
-      return new javax.activation.DataHandler(dataSource);
+      return new DataHandler(dataSource);
   }
 }

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEBodyPartInputStream.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEBodyPartInputStream.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEBodyPartInputStream.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEBodyPartInputStream.java Tue Jan  3 19:55:47 2006
@@ -23,9 +23,9 @@
 public class MIMEBodyPartInputStream extends InputStream {
     PushbackInputStream inStream;
 
-    boolean boundaryFound = false;
+    boolean boundaryFound;
 
-    MIMEHelper parent = null;
+    MIMEHelper parent;
 
     byte[] boundary;
 

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java Tue Jan  3 19:55:47 2006
@@ -48,7 +48,7 @@
      * the message is MTOM optimised type is application/xop+xml If the message
      * is SWA, type is ??have to find out
      */
-    String applicationType = null;
+    String applicationType;
 
     /**
      * <code>pushbackInStream</code> stores the reference to the incoming
@@ -72,13 +72,13 @@
      * <code>endOfStreamReached</code> flag which is to be set by
      * MIMEBodyPartStream when MIME message terminator is found.
      */
-    boolean endOfStreamReached = false;
+    boolean endOfStreamReached;
 
-    String firstPartId = null;
+    String firstPartId;
 
-    boolean fileCacheEnable = false;
+    boolean fileCacheEnable;
 
-    String attachmentRepoDir = null;
+    String attachmentRepoDir;
 
     int fileStorageThreshold;
 

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/PartOnFile.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/PartOnFile.java?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/PartOnFile.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/PartOnFile.java Tue Jan  3 19:55:47 2006
@@ -52,7 +52,7 @@
             repoDir = ".";
         }
         try {
-            cacheFile = java.io.File.createTempFile("Axis2", ".att",
+            cacheFile = File.createTempFile("Axis2", ".att",
                     (repoDir == null) ? null : new File(repoDir));
 
             FileOutputStream fileOutStream = new FileOutputStream(cacheFile);

Modified: webservices/axis2/trunk/java/xdocs/faq.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/xdocs/faq.html?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/xdocs/faq.html (original)
+++ webservices/axis2/trunk/java/xdocs/faq.html Tue Jan  3 19:55:47 2006
@@ -29,25 +29,14 @@
     look?</strong><br>
 
     <p>Look at the <a
-    href="../modules/core/src/org/apache/axis2/client/Call.java">Call</a>
+    href="https://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java">ServiceClient</a>
     class, for more information please read the <a href="userguide.html">user
     guide</a></p>
   </li>
   <li><strong>I want to do One Way Messaging, Where should I
     look?</strong><br>
 
-    <p>Look at the <a
-    href="../modules/core/src/org/apache/axis2/client/MessageSender.java">MessageSender</a>
-    class, for more information please read the <a href="userguide.html">user
-    guide</a></p>
-  </li>
-  <li><strong>Why can not I set the some Addressing properties in the
-    Call?</strong><br>
-
-    <p>Only in the case of the Message Sender the user allowed to edit the
-    Message Properties, In the case of Call the Message correlation is taken
-    care by the Client API and the Addressing Headers are under the Control
-    of Axis2.</p>
+    <p>From Axis2 0.94 onwards, both request-response and one way messaging will be handled by <a href="https://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java">ServiceClient</a>. </p>
   </li>
   <li><strong>When I try to do a non blocking call with use Separate Listener
     true I get the error <i>to do two Transport Channels the Addressing

Modified: webservices/axis2/trunk/java/xdocs/http-transport.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/xdocs/http-transport.html?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/xdocs/http-transport.html (original)
+++ webservices/axis2/trunk/java/xdocs/http-transport.html Tue Jan  3 19:55:47 2006
@@ -1,147 +1,146 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <meta content="">
-  <meta content="">
-  <meta content="">
-  <meta content="">
-  <meta content="">
-  <meta content="">
-  <meta content="">
-  <meta content="">
-  <meta content="">
-  <meta content="">
-  <meta http-equiv="content-type" content="">
-  <title>HTTP transports</title>
-</head>
-
-<body lang="en">
-<h1><a name="#configTransport">HTTP transports</a></h1>
-
-<h3>CommonsHTTPTransportSender</h3>
-
-<p>This is the default transport sender that is used in Server API as well as
-Client API and as the name implies its based on commons-httpclient-3.0-rc3.
-In order to acquire the maximum flexibility, this sender has implemented POST
-interface and GET interface. GET interface is provided to help axis2 in
-supporting REST</p>
-
-<p>Chunking support and KeepAlive support also integrated via the facilities
-provided by commons-httpclient along with HTTP 1.1 support.</p>
-
-<p>&lt;transportSender/&gt; element is used to define transport senders in
-the axis2.xml as follows:</p>
-<pre><code>&lt;transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"&gt;<br>        &lt;parameter name="PROTOCOL" locked="false"&gt;HTTP/1.1&lt;/parameter&gt;<br>        &lt;parameter name="Transfer-Encoding"&gt;chunked&lt;/parameter&gt;<br>&lt;/transportSender&gt;<br></code></pre>
-
-<p>Above code snippet shows the complete configuration of the transport
-sender. &lt;parameter/&gt; element introduces the additional parameters that
-should be compliant with the sender. HTTP PROTOCOL version sets as HTTP/1.0
-or HTTP/1.1. Default version is HTTP/1.1. It should be noted that chunking
-support is available only for HTTP/1.1. Thus, the user should be careful in
-setting the "chunked" property, to use it only with version 1.1. KeepAlive
-property is default in version 1.1.</p>
-
-<p>These are the only parameters that are available from deployment. Other
-parameters such as character encoding style (UTF-8, UTF-16 etc) etc, are
-provided via MessageContext.</p>
-
-<h4>HTTPS support</h4>
-It should be noted that CommonsHTTPTransportSender can be used to communicate
-over https. <code></code>
-<pre>&lt;transportSender name="<b>https</b>" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"&gt;<br>        &lt;parameter name="PROTOCOL" locked="false"&gt;HTTP/1.1&lt;/parameter&gt;<br>        &lt;parameter name="Transfer-Encoding"&gt;chunked&lt;/parameter&gt;<br>&lt;/transportSender&gt;<br></pre>
-Please note that https works only when the server does not expect to
-authenticate the clients where the server has the clients' public keys in the
-its trust store.
-
-<h2>Timeout Configuraiton</h2>
-
-<p>There are two timeout exist in transport level. They are called, Socket
-timeout and Connection timeout. This can be configured in deployment time or
-in run time. In depoyment time, user has to add the following lines in
-axis2.xml.</p>
-
-<p>For Socket timoeout:</p>
-<pre>&lt;parameter name="SO_TIMEOUT" locked="false"&gt;some_int_value&lt;/parameter&gt;
-
-For Connection timeout: 
-
-&lt;parameter name="CONNECTION_TIMEOUT" locked="false"&gt;some_int_value&lt;/parameter&gt;
-
-In runtime it's set as follows in the Stub.</pre>
-<source><pre>...
-Options options = new Options();
-options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer(some_int_value));
-options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,new Integer(some_int_value));
-...</pre>
-</source>
-<p></p>
-
-<h2>Proxy and NTLM Authentication</h2>
-
-<p>HttpClient support "Basic, Digest and NTLM" authentication schemes. These
-are used to authenticate with http servers and proxies.</p>
-
-<p>Axis2 uses deployment time and runtime mechanisms to authenticate proxies.
-In deployment time, user has to change the Axis2.xml as follows. This
-authentication will be available in http and https.</p>
-<pre>&lt;transportSender name="<b>http</b>" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"&gt;
-        &lt;parameter name="PROTOCOL" locked="false"&gt;HTTP/1.1&lt;/parameter&gt;
-        &lt;parameter name="PROXY" proxy_host="proxy_host_name" proxy_port="proxy_host_port" locked="true&gt;userName:domain:passWord&lt;/parameter&gt;
-&lt;/transportSender&gt;<br></pre>
-
-<p>For a particular proxy, if authentication is not available fill
-"userName:domain:passWord"as "anonymous:anonymous:anonymous".</p>
-
-<p>At runtime user can override the PROXY settings with an Object of
-HttpTransportProperties.ProxyProperties. On the stub initiate an object of
-prior and and set it to the MessageContext's property bag via
-HttpConstants.PROXY. On the stub, it depicts as follows,</p>
-<pre>...
-Options options = new Options();
-....
-
-HttpTransportProperties.ProxyProperties proxyProperties = new HttpTransportProperties.ProxyProperties();
-proxyProperties.setProxyHostName(....);
-proxyProperties.setProxyPort(...);
-...
-options.setProperty(HttpConstants.PROXY, proxyProperties);
-....</pre>
-
-<p>The above code would eventually override the deployment proxy
-configuration settings.</p>
-
-<p>NTLM is the most complex of the authentication protocols supported by
-HttpClient. It requires an instance of NTCredentials be available for the
-domain name of the server or the default credentials. Note that since NTLM
-does not use the notion of realms HttpClient uses the domain name of the
-server as the name of the realm. Also note that the username provided to the
-NTCredentials should not be prefixed with the domain - ie: "axis2" is correct
-whereas "DOMAIN\axis2" is not correct.</p>
-
-<p>There are some significant differences in the way that NTLM works compared
-with basic and digest authentication. These differences are generally handled
-by HttpClient, however having an understanding of these differences can help
-avoid problems when using NTLM authentication.</p>
-<ol>
-  <li>NTLM authentication works almost exactly the same as any other form of
-    authentication in terms of the HttpClient API.  The only difference is
-    that you need to supply 'NTCredentials' instead of
-    'UsernamePasswordCredentials' (NTCredentials actually extends
-    UsernamePasswordCredentials so you can use NTCredentials right throughout
-    your application if need be).</li>
-  <li>The realm for NTLM authentication is the domain name of the computer
-    being connected to, this can be troublesome as servers often have
-    multiple domain names that refer to them.  Only the domain name that
-    HttpClient connects to (as specified by the HostConfiguration) is used to
-    look up the credentials. It is generally advised that while initially
-    testing NTLM authentication, you pass the realm in as null which is used
-    as the default.</li>
-  <li>NTLM authenticates a connection and not a request, so you need to
-    authenticate every time a new connection is made and keeping the
-    connection open during authentication is vital.  Due to this, NTLM cannot
-    be used to authenticate with both a proxy and the server, nor can NTLM be
-    used with HTTP 1.0 connections or servers that do not support HTTP
-    keep-alives.</li>
-</ol>
-</body>
-</html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta content="">
+  <meta content="">
+  <meta content="">
+  <meta content="">
+  <meta content="">
+  <meta content="">
+  <meta content="">
+  <meta content="">
+  <meta content="">
+  <meta content="">
+  <meta http-equiv="content-type" content="">
+  <title>HTTP transports</title>
+</head>
+
+<body lang="en">
+<h1><a name="#configTransport">HTTP transports</a></h1>
+
+<h3>CommonsHTTPTransportSender</h3>
+
+<p>This is the default transport sender that is used in Server API as well as
+Client API. As the name implies it is based on commons-httpclient-3.0-rc3. In
+order to acquire the maximum flexibility, this sender has implemented POST
+interface and GET interface. GET interface is provided to help axis2 support
+REST.</p>
+
+<p>Chunking support and KeepAlive support is also integrated via the
+facilities provided by commons-httpclient along with HTTP 1.1 support.</p>
+
+<p>&lt;transportSender/&gt; element is used to define transport senders in
+the axis2.xml as follows:</p>
+<pre><code>&lt;transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"&gt;<br>        &lt;parameter name="PROTOCOL" locked="false"&gt;HTTP/1.1&lt;/parameter&gt;<br>        &lt;parameter name="Transfer-Encoding"&gt;chunked&lt;/parameter&gt;<br>&lt;/transportSender&gt;<br></code></pre>
+
+<p>Above code snippet shows the complete configuration of the transport
+sender. &lt;parameter/&gt; element introduces the additional parameters that
+should be compliant with the sender. HTTP PROTOCOL version sets as HTTP/1.0
+or HTTP/1.1. Default version is HTTP/1.1. It should be noted that chunking
+support is available only for HTTP/1.1. Thus, the user should be careful in
+setting the "chunked" property and use it only with version 1.1. KeepAlive
+property is default in version 1.1.</p>
+
+<p>These are the only parameters that are available from deployment. Other
+parameters such as character encoding style (UTF-8, UTF-16 etc) etc, are
+provided via MessageContext.</p>
+
+<h4>HTTPS support</h4>
+It should be noted that CommonsHTTPTransportSender can be used to communicate
+over https. <code></code>
+<pre>&lt;transportSender name="<b>https</b>" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"&gt;<br>        &lt;parameter name="PROTOCOL" locked="false"&gt;HTTP/1.1&lt;/parameter&gt;<br>        &lt;parameter name="Transfer-Encoding"&gt;chunked&lt;/parameter&gt;<br>&lt;/transportSender&gt;<br></pre>
+Please note that https works only when the server does not expect to
+authenticate the clients and where the server has the clients' public keys in
+its trust store.
+
+<h2>Timeout Configuraiton</h2>
+
+<p>There are two timeout exists in transport level. They are called, Socket
+timeout and Connection timeout. This can be configured in deployment time or
+in run time. In depoyment time, user has to add the following lines in
+axis2.xml.</p>
+
+<p>For Socket timeout:</p>
+<pre>&lt;parameter name="SO_TIMEOUT" locked="false"&gt;some_int_value&lt;/parameter&gt;</pre>
+
+<p>For Connection timeout:</p>
+<pre> &lt;parameter name="CONNECTION_TIMEOUT" locked="false"&gt;some_int_value&lt;/parameter&gt;</pre>
+<br>
+In runtime it's set as follows in the Stub. <source>
+<pre>...
+Options options = new Options();
+options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer(some_int_value));
+options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,new Integer(some_int_value));
+...</pre>
+</source>
+<p></p>
+
+<h2>Proxy and NTLM Authentication</h2>
+
+<p>HttpClient support "Basic, Digest and NTLM" authentication schemes. These
+are used to authenticate with http servers and proxies.</p>
+
+<p>Axis2 uses deployment time and runtime mechanisms to authenticate proxies.
+In deployment time, user has to change the Axis2.xml as follows. This
+authentication will be available in http and https.</p>
+<pre>&lt;transportSender name="<b>http</b>" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"&gt;
+        &lt;parameter name="PROTOCOL" locked="false"&gt;HTTP/1.1&lt;/parameter&gt;
+        &lt;parameter name="PROXY" proxy_host="proxy_host_name" proxy_port="proxy_host_port" locked="true&gt;userName:domain:passWord&lt;/parameter&gt;
+&lt;/transportSender&gt;<br></pre>
+
+<p>For a particular proxy, if authentication is not available fill
+"userName:domain:passWord"as "anonymous:anonymous:anonymous".</p>
+
+<p>At runtime user can override the PROXY settings with an Object of
+HttpTransportProperties.ProxyProperties. On the stub initiate an object of
+prior and set it to the MessageContext's property bag via
+HttpConstants.PROXY. On the stub, it depicts as follows,</p>
+<pre>...
+Options options = new Options();
+....
+
+HttpTransportProperties.ProxyProperties proxyProperties = new HttpTransportProperties.ProxyProperties();
+proxyProperties.setProxyHostName(....);
+proxyProperties.setProxyPort(...);
+...
+options.setProperty(HttpConstants.PROXY, proxyProperties);
+....</pre>
+
+<p>The above code would eventually override the deployment proxy
+configuration settings.</p>
+
+<p>NTLM is the most complex of the authentication protocols supported by
+HttpClient. It requires an instance of NTCredentials be available for the
+domain name of the server or the default credentials. Note that since NTLM
+does not use the notion of realms HttpClient uses the domain name of the
+server as the name of the realm. Also note that the username provided to the
+NTCredentials should not be prefixed with the domain - ie: "axis2" is correct
+whereas "DOMAIN\axis2" is not correct.</p>
+
+<p>There are some significant differences in the way that NTLM works compared
+with basic and digest authentication. These differences are generally handled
+by HttpClient, however having an understanding of these differences can help
+avoid problems when using NTLM authentication.</p>
+<ol>
+  <li>NTLM authentication works almost exactly the same as any other form of
+    authentication in terms of the HttpClient API.  The only difference is
+    that you need to supply 'NTCredentials' instead of
+    'UsernamePasswordCredentials' (NTCredentials actually extends
+    UsernamePasswordCredentials so you can use NTCredentials right throughout
+    your application if need be).</li>
+  <li>The realm for NTLM authentication is the domain name of the computer
+    being connected to, this can be troublesome as servers often have
+    multiple domain names that refer to them.  Only the domain name that
+    HttpClient connects to (as specified by the HostConfiguration) is used to
+    look up the credentials. It is generally advised that while initially
+    testing NTLM authentication, you pass the realm in as null which is used
+    as the default.</li>
+  <li>NTLM authenticates a connection and not a request, so you need to
+    authenticate every time a new connection is made and keeping the
+    connection open during authentication is vital.  Due to this, NTLM cannot
+    be used to authenticate with both a proxy and the server, nor can NTLM be
+    used with HTTP 1.0 connections or servers that do not support HTTP
+    keep-alives.</li>
+</ol>
+</body>
+</html>

Modified: webservices/axis2/trunk/java/xdocs/mail-transport.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/xdocs/mail-transport.html?rev=365814&r1=365813&r2=365814&view=diff
==============================================================================
--- webservices/axis2/trunk/java/xdocs/mail-transport.html (original)
+++ webservices/axis2/trunk/java/xdocs/mail-transport.html Tue Jan  3 19:55:47 2006
@@ -1,70 +1,68 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
-  <title>Invoking a service using
-a mail</title>
+  <meta http-equiv="content-type" content="">
+  <title>Invoking a service using a mail</title>
 </head>
+
 <body>
-<h1>Invoking
-a service using a mail</h1>
+<h1>Invoking a service using a mail</h1>
+
 <h2>Prologue</h2>
-<p>Most of the web services that we
-interact with are synchronous and request-response in nature. However,
-we see that the synchronous request-response type of interaction is
-only a part of the messaging scenarios we encounter in real life.
-Asynchronous messaging is very important in constructing loosely
-coupled systems. Take for an instance a chain of stores, at the end of
-the day all the stores all over can send a mail to the central system
-telling it what that days business activity was and in the morning when
-the store opens there will be a reply to that mail with new
-instructions and updates. It is a lot like the way the old business
-worked but with a modern touch. Similarly Axis2 mail transport can be
-used to implement SETI@HOME through mail.</p>
+
+<p>Most of Web services that we interact with are synchronous and
+request-response in nature. However, we see that the synchronous
+request-response type of interaction is only a part of the messaging
+scenarios we encounter in real life. Asynchronous messaging is very important
+in constructing loosely coupled systems. Take for instance a chain of stores,
+at the end of the day all the stores all over can send a mail to the central
+system telling it what that days business activity was and in the morning
+when the store opens there will be a reply to that mail with new instructions
+and updates. It is a lot like the way the old business worked but with a
+modern touch. Similarly Axis2 mail transport can be used to implement
+SETI@HOME through mail.</p>
+
 <h2>Introduction</h2>
-<p>To get things started you will
-first need to go through the Mail Transport <a
- href="mail-configuration.html">configuration document</a>. It will give you all
-the information you need about how to configure Axis2 to get the mail
-transport working.</p>
-<p>Broadly speaking there are 3
-ways of calling a service through mail.
-</p>
-<blockquote>1. Using the simple
-mail server included in Axis2.<br>
-2. Using a generic mail server.<br>
-3. Using mailets.<br>
+
+<p>To start you will first need to go through the Mail Transport <a
+href="mail-configuration.html">configuration document</a>. It will give you
+all the information you need on how to configure Axis2 to get mail transport
+working.</p>
+
+<p>Broadly speaking there are 3 ways of calling a service through mail.</p>
+
+<blockquote>
+  1. Using the simple mail server included in Axis2.<br>
+  2. Using a generic mail server.<br>
+  3. Using mailets.<br>
 </blockquote>
+
 <p></p>
-<p>Option number 1 and 2 are
-fairly simple and easy to implement, whereas option 3 is somewhat
-harder [unless of course you are one of those guys who see mails going
-around in your dreams.]. However the mailet scenario provides a more robust and useful
-solution in a production environment.</p>
-<p>If you are not a guru in mail
-related issues you should probably get started on the simple mail server
-that has been provided with Axis2. Once you get the hang of the Axis2
-related issues then you can move onto tackle the mail beast. Please do
-keep in mind that the mail server we have implemented is ONLY FOR
-DEMONSTRATION/TESTING PURPOSES.</p>
-<h3>1. Using the simple mail
-server included in Axis2</h3>
-<p>Before we start I want to
-reiterate the fact that the mail server included with Axis2 is ONLY FOR
-DEMONSTRATION/TESTING PURPOSES.</p>
-<p>The SMTP/POP server that we
-have included has the ability to function as a standalone SMTP/POP
-server and also has the ability to work as a mailet. All this is done
-through a small filter that keeps watch for certain pre-configured
-email addresses. These pre-configured email addresses can be changed by
-doing a simple edit of the filter class
+
+<p>Option number 1 and 2 are fairly simple and easy to implement, whereas
+option 3 is somewhat harder.The mailet scenario however does provide a more
+robust and useful solution in a production environment.</p>
+
+<p>If you are not a guru in mail related issues you should probably get
+started on the simple mail server that has been provided with Axis2. Once you
+get the hang of the Axis2 related issues then you can move on to tackle the
+mail beast. Please do keep in mind that the mail server we have implemented
+is ONLY FOR DEMONSTRATION/TESTING PURPOSES.</p>
+
+<h3>1. Using the simple mail server included in Axis2</h3>
+
+<p>The SMTP/POP server that we have included has the ability to function as a
+standalone SMTP/POP server and also has the ability to work as a mailet. All
+this is done through a small filter that keeps watch for certain
+pre-configured email addresses. These pre-configured email addresses can be
+changed by doing a simple edit of the filter class
 org.apache.axis2.transport.mail.server.Sorter.</p>
-<p>Now that we have the
-environment set up, let us start pumping out some code to get the mail
-functionality off the ground. First we'll have a look at it from the
-mail server side. <br>
+
+<p>Now that we have the environment set up, let us start pumping out some
+code to get the mail functionality off the ground. First we'll have a look at
+it from the mail server side. <br>
 </p>
-<source><pre>
-        // Start the mail server using the default configurations.
+<source><pre>        // Start the mail server using the default configurations.
         ConfigurationContext configContext = UtilsMailServer.start();
 
         // Start the default mail listener. It will starting poling for mail
@@ -80,17 +78,15 @@
         configContext.getAxisConfiguration().addService(axisService);
         Utils.resolvePhases(configContext.getAxisConfiguration(), axisService);
         ServiceContext serviceContext = configContext
-                .createServiceContext(new QName("EchoXMLService"));
-</pre></source>
-<p>This code sets up your Axis2
-server working through mail, with a single service. If you need to
-have a look under the hood have a look at the MailServer and
-UtilsMailServer classes.</p>
-<p>Moving onto the client side
-have a look at the code listing below. It will call the axisService that
-was setup on the previous code listing.</p>
-<source><pre>
-        ConfigurationContext configContext = UtilsMailServer
+                .createServiceContext(new QName("EchoXMLService"));</pre>
+</source>
+<p>This code sets up your Axis2 server working through mail, with a single
+service. If you need to have a look under the hood check out the MailServer
+and UtilsMailServer classes.</p>
+
+<p>Moving onto the client side have a look at the code listing below. It will
+call the axisService that was setup on the previous code listing.</p>
+<source><pre>        ConfigurationContext configContext = UtilsMailServer
                 .createClientConfigurationContext();
         AxisService axisService = new AxisService(serviceName);
         AxisOperation axisOperation = new AxisOperation(operationName);
@@ -140,28 +136,28 @@
                                 "Server is being shutdown as the Async response is taking too long.");
                 }
         }
-        call.close();
-</pre></source>
-<p>This will call the service that
-was setup on the server and will poll the mail server till the response
-is received. Well that is all there is to it.</p>
+        call.close();</pre>
+</source>
+<p>This will call the service that was setup on the server and will poll the
+mail server till the response is received.Thats all there is to it.</p>
+
 <p></p>
+
 <h3>2. Using a generic mail server</h3>
-<p>First you need two email
-accounts that works with POP/SMTP. One will act as a server and the
-other will act as the client. For the time being we will use
-server@somewhere.org and client@somewhere.org as the server and the
-client email addresses. Now that we have the email addresses you will
-have to set up the client and the server looking at the Mail Transport <a
- href="http://ws.apache.org/axis2/mail-transport.html">introduction
+
+<p>First you need two email accounts that works with POP/SMTP. One will act
+as a server and the other will act as the client. For the time being we will
+use server@somewhere.org and client@somewhere.org as the server and the
+client email addresses. Now that we have the email addresses you will have to
+set up the client and the server with Mail Transport <a
+href="http://ws.apache.org/axis2/mail-transport.html">introduction
 document</a>.</p>
-<p>When calling the generic mail
-server the client side code will remain the same and there will be some
-modification to the server-side code.</p>
-<p>
-</p>
-<source><pre>
-        // Create a configuration context. This will also load the details about the mail
+
+<p>When calling the generic mail server the client side code will remain the
+same and there will be some modification to the server-side code.</p>
+
+<p></p>
+<source><pre>        // Create a configuration context. This will also load the details about the mail
         // address to listen to from the configuration file.
         File file = new File(MAIL_TRANSPORT_SERVER_ENABLED_REPO_PATH);
         ConfigurationContextFactory builder = new ConfigurationContextFactory();
@@ -180,22 +176,25 @@
                 Echo.class.getName(), operationName);
         configContext.getAxisConfiguration().addService(axisService);
         Utils.resolvePhases(configContext.getAxisConfiguration(), axisService);
-        ServiceContext serviceContext = configContext.createServiceContext(serviceName);
-</pre></source>
-<p>We have to create a separate ConfigurationContext and then use that. We are done; wasn't that simple?</p>
-<h3>3. Calling Axis through a
-James mailet</h3>
-<p>This process will be a bit more
-challenging than the other two methods but will provide a really
-elegant way to use the mail transport. Before we get started you will
-have to go though the James documents <a
- href="http://james.apache.org/custom_matcher_2_1.html">Writing
-a Custom Matcher</a> and <a
- href="http://james.apache.org/custom_mailet_2_1.html">Writing
-a Custom Mailet</a>.</p>
-<p>Now that we know the James part of it lets dive into to the Axis2 part of the code. Once you have set up the James side of business we just need to use the same functionality that is used in the above code. Have a look at the code listing below for more details</p>
-<source><pre>
-    public void processMail(ConfigurationContext confContext, MimeMessage mimeMessage) {
+        ServiceContext serviceContext = configContext.createServiceContext(serviceName);</pre>
+</source>
+<p>Note that a separate ConfigurationContext needs to be created and used.</p>
+
+<h3>3. Calling Axis through a James mailet</h3>
+
+<p>This process will be a bit more challenging than the other two methods but
+will provide a really elegant way to use the mail transport. Before we get
+started you will have to go though the James documents <a
+href="http://james.apache.org/custom_matcher_2_1.html">Writing a Custom
+Matcher</a> and <a
+href="http://james.apache.org/custom_mailet_2_1.html">Writing a Custom
+Mailet</a>.</p>
+
+<p>Now that we know the James part of it lets dive into to the Axis2 part of
+the code. Once you have set up the James side of business we need to use the
+same functionality that is used in the above code. Have a look at the code
+listing below for more details</p>
+<source><pre>    public void processMail(ConfigurationContext confContext, MimeMessage mimeMessage) {
         // create an Axis server
         AxisEngine engine = new AxisEngine(confContext);
         MessageContext msgContext = null;
@@ -235,9 +234,9 @@
 
             // This is just in place to work with SOAP 1.1 and 1.2.
             String soapNamespaceURI = "";
-            if (mimeMessage.getContentType().indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) > -1) {
+            if (mimeMessage.getContentType().indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) &gt; -1) {
                 soapNamespaceURI = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
-            } else if (mimeMessage.getContentType().indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1) {
+            } else if (mimeMessage.getContentType().indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) &gt; -1) {
                 soapNamespaceURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
 
             }
@@ -260,18 +259,16 @@
                 log.error(e);
             }
         }
-    }
-</pre>
+    }</pre>
 </source>
-<p>If you don't happen to have a ConfigurationContext lying around to call this method you can use the following bit of code to get one. Once you create one you can store that on the mailet and keep using it.
-</p>
-<source><pre>
-        File file = new File(MAIL_TRANSPORT_SERVER_ENABLED_REPO_PATH);
+<p>If you don't happen to have a ConfigurationContext lying around to call
+this method you can use the following bit of code to get one. Once you create
+one you can store that on the mailet and keep using it.</p>
+<source><pre>        File file = new File(MAIL_TRANSPORT_SERVER_ENABLED_REPO_PATH);
         ConfigurationContextFactory builder = new ConfigurationContextFactory();
         ConfigurationContext configContextbuilder
-                .buildConfigurationContext(file.getAbsolutePath());
-</pre>
+                .buildConfigurationContext(file.getAbsolutePath());</pre>
 </source>
-<p>Well that seems to be all from the wonderful world of mail for now. :)</p>
+<p></p>
 </body>
 </html>