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 gd...@apache.org on 2007/03/04 19:17:07 UTC

svn commit: r514453 [3/26] - in /webservices/axis2/trunk/java/modules/kernel: src/org/apache/axis2/ src/org/apache/axis2/addressing/ src/org/apache/axis2/addressing/wsdl/ src/org/apache/axis2/builder/ src/org/apache/axis2/client/ src/org/apache/axis2/c...

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/SOAPBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/SOAPBuilder.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/SOAPBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/SOAPBuilder.java Sun Mar  4 10:16:54 2007
@@ -16,12 +16,6 @@
 
 package org.apache.axis2.builder;
 
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.impl.builder.StAXBuilder;
 import org.apache.axiom.om.util.StAXUtils;
@@ -31,19 +25,25 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.context.MessageContext;
 
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.io.IOException;
+import java.io.InputStream;
+
 public class SOAPBuilder implements Builder {
-    
+
     public OMElement processDocument(InputStream inputStream, String contentType,
-            MessageContext messageContext) throws AxisFault {
+                                     MessageContext messageContext) throws AxisFault {
         XMLStreamReader streamReader;
         try {
             String charSetEncoding = (String) messageContext
-            .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
+                    .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
             streamReader = StAXUtils.createXMLStreamReader(BuilderUtil.getReader(inputStream,
-                    charSetEncoding));
+                                                                                 charSetEncoding));
             StAXBuilder builder = new StAXSOAPModelBuilder(streamReader);
             SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();
-            BuilderUtil.validateSOAPVersion(BuilderUtil.getEnvelopeNamespace(contentType), envelope);
+            BuilderUtil
+                    .validateSOAPVersion(BuilderUtil.getEnvelopeNamespace(contentType), envelope);
             BuilderUtil.validateCharSetEncoding(charSetEncoding, builder.getDocument()
                     .getCharsetEncoding(), envelope.getNamespace().getNamespaceURI());
             return envelope;

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java Sun Mar  4 10:16:54 2007
@@ -49,7 +49,7 @@
             queryParameterSeparator = (String) axisBindingOperation
                     .getProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR);
             templatedPath =
-                (String) axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION);
+                    (String) axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION);
         }
         if (queryParameterSeparator == null) {
             queryParameterSeparator =
@@ -74,8 +74,8 @@
         String requestURL = endpointReference.getAddress();
         try {
             requestURL = extractParametersUsingHttpLocation(templatedPath, parameterMap,
-                                               requestURL,
-                                               queryParameterSeparator);
+                                                            requestURL,
+                                                            queryParameterSeparator);
         } catch (UnsupportedEncodingException e) {
             throw new AxisFault(e);
         }
@@ -92,7 +92,6 @@
                                      inputStream);
 
 
-
         return BuilderUtil.buildsoapMessage(messageContext, parameterMap,
                                             soapFactory);
     }
@@ -128,27 +127,27 @@
         }
 
         if (inputStream != null) {
-        try {
-            InputStreamReader inputStreamReader =
-                    new InputStreamReader(inputStream, charsetEncoding);
-            BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
-            while (true) {
-                String line = bufferedReader.readLine();
-                if (line != null) {
-                    String parts[] = line.split(
-                            WSDL20DefaultValueHolder.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR_DEFAULT);
-                    for (int i = 0; i < parts.length; i++) {
-                        int separator = parts[i].indexOf("=");
-                        parameterMap.put(parts[i].substring(0, separator),
-                                         parts[i].substring(separator + 1));
+            try {
+                InputStreamReader inputStreamReader =
+                        new InputStreamReader(inputStream, charsetEncoding);
+                BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
+                while (true) {
+                    String line = bufferedReader.readLine();
+                    if (line != null) {
+                        String parts[] = line.split(
+                                WSDL20DefaultValueHolder.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR_DEFAULT);
+                        for (int i = 0; i < parts.length; i++) {
+                            int separator = parts[i].indexOf("=");
+                            parameterMap.put(parts[i].substring(0, separator),
+                                             parts[i].substring(separator + 1));
+                        }
+                    } else {
+                        break;
                     }
-                } else {
-                    break;
                 }
+            } catch (IOException e) {
+                throw new AxisFault(e);
             }
-        } catch (IOException e) {
-            throw new AxisFault(e);
-        }
         }
     }
 
@@ -174,9 +173,9 @@
      * @param parameterMap
      */
     protected String extractParametersUsingHttpLocation(String templatedPath,
-                                                      MultipleEntryHashMap parameterMap,
-                                                      String requestURL,
-                                                      String queryParameterSeparator)
+                                                        MultipleEntryHashMap parameterMap,
+                                                        String requestURL,
+                                                        String queryParameterSeparator)
             throws AxisFault, UnsupportedEncodingException {
 
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java Sun Mar  4 10:16:54 2007
@@ -70,7 +70,7 @@
         this.sc = sc;
         this.options = new Options(options);
         this.completed = false;
-        this.oc = ContextFactory.createOperationContext(axisOp,this.sc);
+        this.oc = ContextFactory.createOperationContext(axisOp, this.sc);
     }
 
     /**
@@ -233,7 +233,8 @@
         }
     }
 
-    protected void prepareMessageContext(ConfigurationContext cc, MessageContext mc) throws AxisFault {
+    protected void prepareMessageContext(ConfigurationContext cc, MessageContext mc)
+            throws AxisFault {
         // set options on the message context
         if (mc.getSoapAction() == null || "".equals(mc.getSoapAction())) {
             mc.setSoapAction(options.getAction());

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java Sun Mar  4 10:16:54 2007
@@ -388,7 +388,8 @@
             RelatesTo relatesTo = (RelatesTo) relationships.get(i);
             String relationshipType = relatesTo.getRelationshipType();
             if (relationshipType.equals(AddressingConstants.Final.WSA_DEFAULT_RELATIONSHIP_TYPE)
-                    || relationshipType.equals(AddressingConstants.Submission.WSA_DEFAULT_RELATIONSHIP_TYPE)) {
+                    || relationshipType
+                    .equals(AddressingConstants.Submission.WSA_DEFAULT_RELATIONSHIP_TYPE)) {
                 return relatesTo;
             }
         }
@@ -867,7 +868,7 @@
 
         if (senderTransport == null) {
             throw new AxisFault(Messages.getMessage("unknownTransport",
-                    senderTransport));
+                                                    senderTransport));
         }
     }
 
@@ -1048,27 +1049,32 @@
         out.writeBoolean(manageSession);
 
         // the following objects could be null
-        ObjectStateUtils.writeObject(out, isExceptionToBeThrownOnSOAPFault, logCorrelationIDString + ".isExceptionToBeThrownOnSOAPFault");
-        ObjectStateUtils.writeObject(out, useSeparateListener, logCorrelationIDString + ".useSeparateListener");
+        ObjectStateUtils.writeObject(out, isExceptionToBeThrownOnSOAPFault,
+                                     logCorrelationIDString + ".isExceptionToBeThrownOnSOAPFault");
+        ObjectStateUtils.writeObject(out, useSeparateListener,
+                                     logCorrelationIDString + ".useSeparateListener");
 
         //---------------------------------------------------------
         // various strings
         //---------------------------------------------------------
 
         // String soapVersionURI
-        ObjectStateUtils.writeString(out, soapVersionURI, logCorrelationIDString + ".soapVersionURI");
+        ObjectStateUtils
+                .writeString(out, soapVersionURI, logCorrelationIDString + ".soapVersionURI");
 
         // String action
         ObjectStateUtils.writeString(out, action, logCorrelationIDString + ".action");
 
         // String transportInProtocol
-        ObjectStateUtils.writeString(out, transportInProtocol, logCorrelationIDString + ".transportInProtocol");
+        ObjectStateUtils.writeString(out, transportInProtocol,
+                                     logCorrelationIDString + ".transportInProtocol");
 
         // String messageId
         ObjectStateUtils.writeString(out, messageId, logCorrelationIDString + ".messageId");
 
         // String object id
-        ObjectStateUtils.writeString(out, logCorrelationIDString, logCorrelationIDString + ".logCorrelationIDString");
+        ObjectStateUtils.writeString(out, logCorrelationIDString,
+                                     logCorrelationIDString + ".logCorrelationIDString");
 
         //---------------------------------------------------------
         // various objects
@@ -1140,7 +1146,8 @@
         } else {
             metaTransportOut = null;
         }
-        ObjectStateUtils.writeObject(out, metaTransportOut, logCorrelationIDString + ".transportOut");
+        ObjectStateUtils
+                .writeObject(out, metaTransportOut, logCorrelationIDString + ".transportOut");
 
         //---------------------------------------------------------
         // collections and lists
@@ -1157,7 +1164,8 @@
         ObjectStateUtils.writeArrayList(out, tmp, logCorrelationIDString + ".relationships");
 
         // ArrayList referenceParameters
-        ObjectStateUtils.writeArrayList(out, referenceParameters, logCorrelationIDString + ".referenceParameters");
+        ObjectStateUtils.writeArrayList(out, referenceParameters,
+                                        logCorrelationIDString + ".referenceParameters");
 
         //---------------------------------------------------------
         // properties
@@ -1252,7 +1260,8 @@
         logCorrelationIDString = ObjectStateUtils.readString(in, "Options.logCorrelationIDString");
 
         // trace point
-        log.trace(myClassName + ":readExternal():  reading the input stream for  [" + logCorrelationIDString + "]");
+        log.trace(myClassName + ":readExternal():  reading the input stream for  [" +
+                logCorrelationIDString + "]");
 
         //---------------------------------------------------------
         // various objects
@@ -1278,12 +1287,14 @@
         // TransportInDescription transportIn
         // is not usable until the meta data has been reconciled
         transportIn = null;
-        metaTransportIn = (MetaDataEntry) ObjectStateUtils.readObject(in, "Options.metaTransportIn");
+        metaTransportIn =
+                (MetaDataEntry) ObjectStateUtils.readObject(in, "Options.metaTransportIn");
 
         // TransportOutDescription transportOut
         // is not usable until the meta data has been reconciled
         transportOut = null;
-        metaTransportOut = (MetaDataEntry) ObjectStateUtils.readObject(in, "Options.metaTransportOut");
+        metaTransportOut =
+                (MetaDataEntry) ObjectStateUtils.readObject(in, "Options.metaTransportOut");
 
         //---------------------------------------------------------
         // collections and lists
@@ -1367,13 +1378,18 @@
             }
             catch (Exception exin) {
                 // if a fault is thrown, log it and continue
-                log.trace(logCorrelationIDString + "activate():  exception caught when getting the TransportInDescription [" + qin.toString() + "]  from the AxisConfiguration [" + exin.getClass().getName() + " : " + exin.getMessage() + "]");
+                log.trace(logCorrelationIDString +
+                        "activate():  exception caught when getting the TransportInDescription [" +
+                        qin.toString() + "]  from the AxisConfiguration [" +
+                        exin.getClass().getName() + " : " + exin.getMessage() + "]");
             }
 
             if (tmpIn != null) {
                 transportIn = tmpIn;
             } else {
-                log.trace(logCorrelationIDString + "activate():  No TransportInDescription found for [" + qin.toString() + "]");
+                log.trace(logCorrelationIDString +
+                        "activate():  No TransportInDescription found for [" + qin.toString() +
+                        "]");
 
                 transportIn = null;
             }
@@ -1392,13 +1408,18 @@
             }
             catch (Exception exout) {
                 // if a fault is thrown, log it and continue
-                log.trace(logCorrelationIDString + "activate():  exception caught when getting the TransportOutDescription [" + qout.toString() + "]  from the AxisConfiguration [" + exout.getClass().getName() + " : " + exout.getMessage() + "]");
+                log.trace(logCorrelationIDString +
+                        "activate():  exception caught when getting the TransportOutDescription [" +
+                        qout.toString() + "]  from the AxisConfiguration [" +
+                        exout.getClass().getName() + " : " + exout.getMessage() + "]");
             }
 
             if (tmpOut != null) {
                 transportOut = tmpOut;
             } else {
-                log.trace(logCorrelationIDString + "activate():  No TransportOutDescription found for [" + qout.toString() + "]");
+                log.trace(logCorrelationIDString +
+                        "activate():  No TransportOutDescription found for [" + qout.toString() +
+                        "]");
 
                 transportOut = null;
             }
@@ -1412,7 +1433,8 @@
         if (metaListener != null) {
             // see if we can find an existing object
             String listenerClass = metaListener.getClassName();
-            log.trace(logCorrelationIDString + "activate():  TransportListener found for [" + listenerClass + "] ");
+            log.trace(logCorrelationIDString + "activate():  TransportListener found for [" +
+                    listenerClass + "] ");
         } else {
             listener = null;
 
@@ -1449,7 +1471,8 @@
             return false;
         }
 
-        if (this.isExceptionToBeThrownOnSOAPFault.booleanValue() != obj.isExceptionToBeThrownOnSOAPFault()) {
+        if (this.isExceptionToBeThrownOnSOAPFault.booleanValue() !=
+                obj.isExceptionToBeThrownOnSOAPFault()) {
             return false;
         }
 
@@ -1620,7 +1643,8 @@
      */
     private void checkActivateWarning(String methodname) {
         if (needsToBeReconciled) {
-            log.warn(getLogCorrelationIDString() + ":" + methodname + "(): ****WARNING**** " + myClassName + ".activate(configurationContext) needs to be invoked.");
+            log.warn(getLogCorrelationIDString() + ":" + methodname + "(): ****WARNING**** " +
+                    myClassName + ".activate(configurationContext) needs to be invoked.");
         }
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java Sun Mar  4 10:16:54 2007
@@ -127,7 +127,8 @@
         configureServiceClient(configContext, axisService);
     }
 
-    private void configureServiceClient(ConfigurationContext configContext, AxisService axisService) throws AxisFault {
+    private void configureServiceClient(ConfigurationContext configContext, AxisService axisService)
+            throws AxisFault {
         initializeTransports(configContext);
         // save the axisConfig and service
         this.axisConfig = this.configContext.getAxisConfiguration();
@@ -146,8 +147,8 @@
         }
         AxisServiceGroup axisServiceGroup = (AxisServiceGroup) this.axisService.getParent();
         ServiceGroupContext sgc = ContextFactory.createServiceGroupContext(this.configContext,
-                axisServiceGroup);
-        this.serviceContext = ContextFactory.createServiceContext(sgc,this.axisService);
+                                                                           axisServiceGroup);
+        this.serviceContext = ContextFactory.createServiceContext(sgc, this.axisService);
     }
 
 
@@ -185,7 +186,9 @@
     public ServiceClient(ConfigurationContext configContext, URL wsdlURL,
                          QName wsdlServiceName, String portName) throws AxisFault {
         configureServiceClient(configContext, AxisService.createClientSideAxisService(wsdlURL,
-                wsdlServiceName, portName, options));
+                                                                                      wsdlServiceName,
+                                                                                      portName,
+                                                                                      options));
     }
 
     private void initializeTransports(ConfigurationContext configContext) throws AxisFault {
@@ -231,7 +234,8 @@
         // shortcut client API. NOTE: We only add the ones we know we'll use
         // later in the convenience API; if you use
         // this constructor then you can't expect any magic!
-        AxisService axisService = new AxisService(ANON_SERVICE + this.hashCode() + System.currentTimeMillis());
+        AxisService axisService =
+                new AxisService(ANON_SERVICE + this.hashCode() + System.currentTimeMillis());
         RobustOutOnlyAxisOperation robustoutoonlyOperation = new RobustOutOnlyAxisOperation(
                 ANON_ROBUST_OUT_ONLY_OP);
         axisService.addOperation(robustoutoonlyOperation);
@@ -372,7 +376,8 @@
      */
     public void addStringHeader(QName headerName, String headerText) throws AxisFault {
         if (headerName.getNamespaceURI() == null || "".equals(headerName.getNamespaceURI())) {
-            throw new AxisFault("Failed to add string header , you have to have namespaceURI for the QName");
+            throw new AxisFault(
+                    "Failed to add string header , you have to have namespaceURI for the QName");
         }
         OMElement omElement = OMAbstractFactory.getOMFactory().createOMElement(
                 headerName, null);
@@ -689,7 +694,8 @@
         // if a configuration context was created for this client there'll also
         //  be a service group, so discard that
         if (!createConfigCtx) {
-            String serviceGroupName = ((AxisServiceGroup) axisService.getParent()).getServiceGroupName();
+            String serviceGroupName =
+                    ((AxisServiceGroup) axisService.getParent()).getServiceGroupName();
             AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
             AxisServiceGroup asg = axisConfiguration.getServiceGroup(serviceGroupName);
             if (asg != null) {
@@ -699,31 +705,32 @@
             configContext.terminate();
         }
     }
-    
+
     /**
      * Configure the ServiceClient to interact with the Web service described by
      * the specified AxisService object.
-     * 
+     *
      * @param axisService the AxisService that represents the new Web service.
-     * @throws AxisFault if an error occurs while configuring the ServiceClient. 
+     * @throws AxisFault if an error occurs while configuring the ServiceClient.
      */
-    public void setAxisService(AxisService axisService) throws AxisFault{
-        
+    public void setAxisService(AxisService axisService) throws AxisFault {
+
         if (axisService == null) {
             // AxisFault?
-            throw new IllegalArgumentException("AxisService is null");            
+            throw new IllegalArgumentException("AxisService is null");
         }
-        
+
         axisConfig.removeService(this.axisService.getName());
         this.axisService = axisService;
-        
+
         axisService.setClientSide(true);
         axisConfig.addService(axisService);
-        
+
         AxisServiceGroup axisServiceGroup = (AxisServiceGroup) axisService.getParent();
-        ServiceGroupContext serviceGroupContext = ContextFactory.createServiceGroupContext(configContext,
-                axisServiceGroup);
+        ServiceGroupContext serviceGroupContext =
+                ContextFactory.createServiceGroupContext(configContext,
+                                                         axisServiceGroup);
         this.serviceContext = ContextFactory.createServiceContext(
-                serviceGroupContext,this.axisService);
+                serviceGroupContext, this.axisService);
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java Sun Mar  4 10:16:54 2007
@@ -194,26 +194,27 @@
 
     protected void addPropertyToOperationClient(OperationClient operationClient,
                                                 String propertyKey,
-                                                Object propertyValue){
-        operationClient.getOptions().setProperty(propertyKey,propertyValue);
+                                                Object propertyValue) {
+        operationClient.getOptions().setProperty(propertyKey, propertyValue);
     }
 
     protected void addPropertyToOperationClient(OperationClient operationClient,
                                                 String propertyKey,
-                                                boolean value){
-       addPropertyToOperationClient(operationClient,propertyKey,new Boolean(value));
+                                                boolean value) {
+        addPropertyToOperationClient(operationClient, propertyKey, new Boolean(value));
     }
 
     protected void addPropertyToOperationClient(OperationClient operationClient,
                                                 String propertyKey,
-                                                int value){
-       addPropertyToOperationClient(operationClient,propertyKey,new Integer(value));
+                                                int value) {
+        addPropertyToOperationClient(operationClient, propertyKey, new Integer(value));
     }
 
-    protected void setMustUnderstand(OMElement headerElement, OMNamespace omNamespace){
+    protected void setMustUnderstand(OMElement headerElement, OMNamespace omNamespace) {
         OMFactory omFactory = OMAbstractFactory.getOMFactory();
         OMAttribute mustUnderstandAttribute =
-                omFactory.createOMAttribute(SOAP12Constants.ATTR_MUSTUNDERSTAND,omNamespace, "true");
+                omFactory.createOMAttribute(SOAP12Constants.ATTR_MUSTUNDERSTAND, omNamespace,
+                                            "true");
         headerElement.addAttribute(mustUnderstandAttribute);
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/WSDLBasedPolicyProcessor.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/WSDLBasedPolicyProcessor.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/WSDLBasedPolicyProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/WSDLBasedPolicyProcessor.java Sun Mar  4 10:16:54 2007
@@ -109,7 +109,7 @@
                  * list.
                  */
                 List modulesToEngage;
-               
+
                 for (Iterator namespaces = namespaceList.iterator(); iterator
                         .hasNext();) {
                     String namespace = (String) namespaces.next();
@@ -126,27 +126,26 @@
                                         + namespace + "type assertions");
                         // TODO: Log this ..
                         continue;
-                        
+
                     } else {
                         engageModulesToAxisDescription(modulesToEngage, op);
                     }
                 }
-                
 
                 /*
-                 * We only pick the first policy alternative. Other policy
-                 * alternatives are ignored.
-                 */
+                * We only pick the first policy alternative. Other policy
+                * alternatives are ignored.
+                */
                 break;
             }
         }
     }
 
     /**
-     * Engages the list of Modules to the specified AxisDescription. 
+     * Engages the list of Modules to the specified AxisDescription.
      */
     private void engageModulesToAxisDescription(List modulesToEngage,
-            AxisDescription axisDescription) throws AxisFault {
+                                                AxisDescription axisDescription) throws AxisFault {
         AxisModule axisModule;
         QName moduleName;
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/async/AsyncResult.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/async/AsyncResult.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/async/AsyncResult.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/async/AsyncResult.java Sun Mar  4 10:16:54 2007
@@ -35,9 +35,9 @@
 
     /**
      * Constructor.
-     * 
+     *
      * @param result message context providing result information
-     * (<code>null</code> if no response)
+     *               (<code>null</code> if no response)
      */
     public AsyncResult(MessageContext result) {
         this.result = result;
@@ -45,7 +45,7 @@
 
     /**
      * Get the SOAP Envelope for the response message.
-     * 
+     *
      * @return Envelope (<code>null</code> if none)
      */
     public SOAPEnvelope getResponseEnvelope() {
@@ -58,7 +58,7 @@
 
     /**
      * Get the complete message context for the response.
-     * 
+     *
      * @return context (<code>null</code> if none)
      */
     public MessageContext getResponseMessageContext() {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusterManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusterManager.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusterManager.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusterManager.java Sun Mar  4 10:16:54 2007
@@ -24,17 +24,17 @@
     public void init(ConfigurationContext context);
 
     public void addContext(AbstractContext context);
-    
+
     public void removeContext(AbstractContext context);
-    
+
     public void updateState(AbstractContext context);
-    
+
     /**
      * This can be used to limit the contexts that get replicated through the 'flush' method.
-     * 
+     *
      * @param context
      * @return
      */
-    public boolean isContextClusterable (AbstractContext context);
-    
+    public boolean isContextClusterable(AbstractContext context);
+
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/AbstractContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/AbstractContext.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/AbstractContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/AbstractContext.java Sun Mar  4 10:16:54 2007
@@ -32,7 +32,7 @@
 public abstract class AbstractContext {
 
     /**
-     * Property used to indicate copying of properties is needed by context. 
+     * Property used to indicate copying of properties is needed by context.
      */
     public static final String COPY_PROPERTIES = "CopyProperties";
 
@@ -40,12 +40,12 @@
 
     protected transient AbstractContext parent;
     protected transient Map properties;
-    
+
     protected AbstractContext(AbstractContext parent) {
         this.parent = parent;
     }
 
-    protected AbstractContext(){
+    protected AbstractContext() {
     }
 
     /**
@@ -109,7 +109,7 @@
         }
     }
 
-    /**                         
+    /**
      * This will do a copy of the given properties to the current properties
      * table.
      *
@@ -169,25 +169,25 @@
     public void setLastTouchedTime(long t) {
         lastTouchedTime = t;
     }
-    
-    public void flush () throws AxisFault {
-        
+
+    public void flush() throws AxisFault {
+
         ConfigurationContext configContext = getRootContext();
-        if (configContext==null) {
-            throw new AxisFault (Messages.getMessage("cannotFlushRootNull"));
+        if (configContext == null) {
+            throw new AxisFault(Messages.getMessage("cannotFlushRootNull"));
         }
-        
+
         AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
         ClusterManager clusterManager = axisConfiguration.getClusterManager();
-        
+
         //Calling the ClusterManager probably to replicate the updated state of the context.
-        if (clusterManager!=null && clusterManager.isContextClusterable (this)) {
+        if (clusterManager != null && clusterManager.isContextClusterable(this)) {
             clusterManager.updateState(this);
         }
-        
+
         //Other logic needed for flushing the contexts
     }
-    
-    public abstract ConfigurationContext getRootContext ();
-    
+
+    public abstract ConfigurationContext getRootContext();
+
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java Sun Mar  4 10:16:54 2007
@@ -71,14 +71,15 @@
         super(null);
         this.axisConfiguration = axisConfiguration;
         initConfigContextTimeout(axisConfiguration);
-        
+
         if (axisConfiguration.getClusterManager() != null) {
             initCluster();
-    }
+        }
     }
 
     private void initConfigContextTimeout(AxisConfiguration axisConfiguration) {
-        Parameter parameter = axisConfiguration.getParameter(Constants.Configuration.CONFIG_CONTEXT_TIMOUT_INTERVAL);
+        Parameter parameter = axisConfiguration
+                .getParameter(Constants.Configuration.CONFIG_CONTEXT_TIMOUT_INTERVAL);
         if (parameter != null) {
             Object value = parameter.getValue();
             if (value != null && value instanceof String) {
@@ -91,7 +92,7 @@
         ClusterManager clusterManager = axisConfiguration.getClusterManager();
         clusterManager.init(this);
     }
-    
+
     protected void finalize() throws Throwable {
         super.finalize();
     }
@@ -123,27 +124,30 @@
         if (serviceContext == null) {
             String scope = axisService.getScope();
             if (Constants.SCOPE_APPLICATION.equals(scope)) {
-                String serviceGroupName = ((AxisServiceGroup) axisService.getParent()).getServiceGroupName();
-                serviceGroupContext = (ServiceGroupContext) applicationSessionServiceGroupContextTable.get(
-                        serviceGroupName);
+                String serviceGroupName =
+                        ((AxisServiceGroup) axisService.getParent()).getServiceGroupName();
+                serviceGroupContext =
+                        (ServiceGroupContext) applicationSessionServiceGroupContextTable.get(
+                                serviceGroupName);
                 if (serviceGroupContext == null) {
                     AxisServiceGroup axisServiceGroup = messageContext.getAxisServiceGroup();
                     if (axisServiceGroup == null) {
                         axisServiceGroup = (AxisServiceGroup) axisService.getParent();
                         messageContext.setAxisServiceGroup(axisServiceGroup);
                     }
-                    serviceGroupContext =ContextFactory.createServiceGroupContext(
-                            messageContext.getConfigurationContext(),axisServiceGroup);
-                    applicationSessionServiceGroupContextTable.put(serviceGroupName, serviceGroupContext);
-                    
+                    serviceGroupContext = ContextFactory.createServiceGroupContext(
+                            messageContext.getConfigurationContext(), axisServiceGroup);
+                    applicationSessionServiceGroupContextTable
+                            .put(serviceGroupName, serviceGroupContext);
+
                     ClusterManager clusterManager = this.getAxisConfiguration().getClusterManager();
-                    if (clusterManager!=null) {
+                    if (clusterManager != null) {
                         clusterManager.addContext(serviceGroupContext);
                     }
                 }
                 messageContext.setServiceGroupContext(serviceGroupContext);
                 messageContext.setServiceContext(ContextFactory.createServiceContext(
-                        serviceGroupContext,axisService));
+                        serviceGroupContext, axisService));
             } else if (Constants.SCOPE_SOAP_SESSION.equals(scope)) {
                 String serviceGroupContextId = messageContext.getServiceGroupContextId();
                 if (serviceGroupContextId != null) {
@@ -155,33 +159,37 @@
                     }
                 } else {
                     AxisServiceGroup axisServiceGroup = (AxisServiceGroup) axisService.getParent();
-                    serviceGroupContext = ContextFactory.createServiceGroupContext(this,axisServiceGroup);
-                    serviceContext = ContextFactory.createServiceContext(serviceGroupContext,axisService);
+                    serviceGroupContext =
+                            ContextFactory.createServiceGroupContext(this, axisServiceGroup);
+                    serviceContext =
+                            ContextFactory.createServiceContext(serviceGroupContext, axisService);
                     // set the serviceGroupContextID
                     serviceGroupContextId = UUIDGenerator.getUUID();
                     serviceGroupContext.setId(serviceGroupContextId);
 
                     ClusterManager clusterManager = this.getAxisConfiguration().getClusterManager();
-                    if (clusterManager!=null) {
+                    if (clusterManager != null) {
                         clusterManager.addContext(serviceGroupContext);
                     }
-                    
+
                     messageContext.setServiceGroupContextId(serviceGroupContextId);
                     registerServiceGroupContextintoSoapSessionTable(serviceGroupContext);
                 }
                 messageContext.setServiceGroupContext(serviceGroupContext);
                 messageContext.setServiceContext(
-                        ContextFactory.createServiceContext(serviceGroupContext,axisService));
+                        ContextFactory.createServiceContext(serviceGroupContext, axisService));
             } else if (Constants.SCOPE_REQUEST.equals(scope)) {
                 AxisServiceGroup axisServiceGroup = (AxisServiceGroup) axisService.getParent();
-                serviceGroupContext =ContextFactory.createServiceGroupContext(this,axisServiceGroup);
+                serviceGroupContext =
+                        ContextFactory.createServiceGroupContext(this, axisServiceGroup);
                 messageContext.setServiceGroupContext(serviceGroupContext);
-                serviceContext = ContextFactory.createServiceContext(serviceGroupContext,axisService);
+                serviceContext =
+                        ContextFactory.createServiceContext(serviceGroupContext, axisService);
                 messageContext.setServiceContext(serviceContext);
                 messageContext.getOperationContext().setParent(serviceContext);
             }
         }
-        if(messageContext.getOperationContext() != null) {
+        if (messageContext.getOperationContext() != null) {
             messageContext.getOperationContext().setParent(serviceContext);
         }
     }
@@ -218,7 +226,8 @@
         }
     }
 
-    public void registerServiceGroupContextintoSoapSessionTable(ServiceGroupContext serviceGroupContext) {
+    public void registerServiceGroupContextintoSoapSessionTable(
+            ServiceGroupContext serviceGroupContext) {
         String id = serviceGroupContext.getId();
         serviceGroupContextMap.put(id, serviceGroupContext);
         serviceGroupContext.touch();
@@ -227,7 +236,8 @@
         cleanupServiceGroupContexts();
     }
 
-    public void addServiceGroupContextintoApplicatoionScopeTable(ServiceGroupContext serviceGroupContext) {
+    public void addServiceGroupContextintoApplicatoionScopeTable(
+            ServiceGroupContext serviceGroupContext) {
         if (applicationSessionServiceGroupContextTable == null) {
             applicationSessionServiceGroupContextTable = new Hashtable();
         }
@@ -256,7 +266,8 @@
         return opCtx;
     }
 
-    public OperationContext findOperationContext(String operationName, String serviceName, String serviceGroupName) {
+    public OperationContext findOperationContext(String operationName, String serviceName,
+                                                 String serviceGroupName) {
         if (operationName == null) {
             return null;
         }
@@ -284,7 +295,8 @@
                     valueServiceName = value.getServiceName();
                     valueServiceGroupName = value.getServiceGroupName();
 
-                    if ((valueOperationName != null) && (valueOperationName.equals(operationName))) {
+                    if ((valueOperationName != null) && (valueOperationName.equals(operationName)))
+                    {
                         if ((valueServiceName != null) && (valueServiceName.equals(serviceName))) {
                             if ((valueServiceGroupName != null) && (serviceGroupName != null)
                                     && (valueServiceGroupName.equals(serviceGroupName))) {
@@ -303,7 +315,7 @@
             }
         }
 
-        // if we got here, we did not find an operation context 
+        // if we got here, we did not find an operation context
         // that fits the criteria
         return null;
     }
@@ -322,8 +334,9 @@
         return null;
     }
 
-    public ServiceGroupContext getServiceGroupContextFromSoapSessionTable(String serviceGroupContextId,
-                                                                          MessageContext msgContext) {
+    public ServiceGroupContext getServiceGroupContextFromSoapSessionTable(
+            String serviceGroupContextId,
+            MessageContext msgContext) {
         ServiceGroupContext serviceGroupContext =
                 (ServiceGroupContext) serviceGroupContextMap.get(serviceGroupContextId);
 
@@ -445,7 +458,8 @@
     public void cleanupContexts() {
         if ((applicationSessionServiceGroupContextTable != null) &&
                 (applicationSessionServiceGroupContextTable.size() > 0)) {
-            Iterator applicationScopeSgs = applicationSessionServiceGroupContextTable.values().iterator();
+            Iterator applicationScopeSgs =
+                    applicationSessionServiceGroupContextTable.values().iterator();
             while (applicationScopeSgs.hasNext()) {
                 ServiceGroupContext serviceGroupContext =
                         (ServiceGroupContext) applicationScopeSgs.next();
@@ -456,7 +470,8 @@
         if ((serviceGroupContextMap != null) && (serviceGroupContextMap.size() > 0)) {
             Iterator sopaSessionSgs = serviceGroupContextMap.values().iterator();
             while (sopaSessionSgs.hasNext()) {
-                ServiceGroupContext serviceGroupContext = (ServiceGroupContext) sopaSessionSgs.next();
+                ServiceGroupContext serviceGroupContext =
+                        (ServiceGroupContext) sopaSessionSgs.next();
                 cleanupServiceContexts(serviceGroupContext);
             }
             serviceGroupContextMap.clear();
@@ -554,17 +569,17 @@
         return serviceGroupContextTimoutInterval;
     }
 
-    public void removeServiceGroupContext(AxisServiceGroup serviceGroup){
-        if(serviceGroup!=null){
-            Object obj =applicationSessionServiceGroupContextTable.get(
+    public void removeServiceGroupContext(AxisServiceGroup serviceGroup) {
+        if (serviceGroup != null) {
+            Object obj = applicationSessionServiceGroupContextTable.get(
                     serviceGroup.getServiceGroupName());
-            if(obj==null){
+            if (obj == null) {
                 ArrayList toBeRemovedList = new ArrayList();
                 Iterator serviceGroupContexts = serviceGroupContextMap.values().iterator();
                 while (serviceGroupContexts.hasNext()) {
                     ServiceGroupContext serviceGroupContext =
                             (ServiceGroupContext) serviceGroupContexts.next();
-                    if(serviceGroupContext.getDescription().equals(serviceGroup)){
+                    if (serviceGroupContext.getDescription().equals(serviceGroup)) {
                         toBeRemovedList.add(serviceGroupContext.getId());
                     }
                 }
@@ -580,6 +595,6 @@
     public ConfigurationContext getRootContext() {
         return this;
     }
-    
-    
+
+
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java Sun Mar  4 10:16:54 2007
@@ -77,7 +77,8 @@
         return configContext;
     }
 
-    private static void initApplicationScopeServices(ConfigurationContext configCtx) throws AxisFault {
+    private static void initApplicationScopeServices(ConfigurationContext configCtx)
+            throws AxisFault {
         Iterator serviceGroups = configCtx.getAxisConfiguration().getServiceGroups();
         while (serviceGroups.hasNext()) {
             AxisServiceGroup axisServiceGroup = (AxisServiceGroup) serviceGroups.next();
@@ -241,7 +242,8 @@
                 try {
                     sender.init(configContext, transportOut);
                 } catch (AxisFault axisFault) {
-                    log.info(Messages.getMessage("transportiniterror", transportOut.getName().getLocalPart()));
+                    log.info(Messages.getMessage("transportiniterror",
+                                                 transportOut.getName().getLocalPart()));
                 }
             }
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ContextFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ContextFactory.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ContextFactory.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ContextFactory.java Sun Mar  4 10:16:54 2007
@@ -22,6 +22,7 @@
 *
 *
 */
+
 public class ContextFactory {
 
     public static MessageContext createMessageContext(
@@ -41,8 +42,9 @@
                                                       AxisService service) throws AxisFault {
         return serviceGroupContext.getServiceContext(service);
     }
+
     public static OperationContext createOperationContext(AxisOperation axisOperation,
-                                                          ServiceContext serviceContext){
-        return new OperationContext(axisOperation,serviceContext);
+                                                          ServiceContext serviceContext) {
+        return new OperationContext(axisOperation, serviceContext);
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org