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

svn commit: r514453 [13/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/...

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java Sun Mar  4 10:16:54 2007
@@ -21,14 +21,13 @@
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
-import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.util.Utils;
+import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.httpclient.Credentials;
 import org.apache.commons.httpclient.Header;
 import org.apache.commons.httpclient.HeaderElement;
@@ -92,7 +91,7 @@
             } else {
                 throw new AxisFault(
                         "Parameter " + HTTPConstants.PROTOCOL_VERSION
-                        + " Can have values only HTTP/1.0 or HTTP/1.1");
+                                + " Can have values only HTTP/1.0 or HTTP/1.1");
             }
         }
     }
@@ -165,16 +164,16 @@
 
             proxyHostName = proxyProperties.getProxyHostName();
             if (proxyHostName == null
-                || proxyHostName.length() == 0) {
+                    || proxyHostName.length() == 0) {
                 throw new AxisFault("Proxy Name is not valid");
             }
 
             if (proxyProperties.getUserName().equals(ANONYMOUS)
-                || proxyProperties.getPassWord().equals(ANONYMOUS)) {
+                    || proxyProperties.getPassWord().equals(ANONYMOUS)) {
                 proxyCred = new UsernamePasswordCredentials("", "");
             }
             if (!proxyProperties.getUserName().equals(ANONYMOUS) &&
-                !proxyProperties.getPassWord().equals(ANONYMOUS)) {
+                    !proxyProperties.getPassWord().equals(ANONYMOUS)) {
                 proxyCred = new UsernamePasswordCredentials(
                         proxyProperties.getUserName().trim(),
                         proxyProperties
@@ -182,8 +181,8 @@
             }
             if (!proxyProperties.getDomain().equals(ANONYMOUS)) {
                 if (!proxyProperties.getUserName().equals(ANONYMOUS) &&
-                    !proxyProperties.getPassWord().equals(ANONYMOUS) &&
-                    !proxyProperties.getDomain().equals(ANONYMOUS)) {
+                        !proxyProperties.getPassWord().equals(ANONYMOUS) &&
+                        !proxyProperties.getDomain().equals(ANONYMOUS)) {
                     proxyCred = new NTCredentials(
                             proxyProperties.getUserName().trim(),
                             proxyProperties.getPassWord().trim(), proxyHostName,
@@ -206,29 +205,29 @@
      */
     protected void obtainHTTPHeaderInformation(HttpMethodBase method,
                                                MessageContext msgContext) throws AxisFault {
-           Map transportHeaders =  new CommonsTransportHeaders(method.getResponseHeaders());
-        msgContext.setProperty(MessageContext.TRANSPORT_HEADERS,transportHeaders);
-        Header header =method.getResponseHeader(HTTPConstants.HEADER_CONTENT_TYPE);
+        Map transportHeaders = new CommonsTransportHeaders(method.getResponseHeaders());
+        msgContext.setProperty(MessageContext.TRANSPORT_HEADERS, transportHeaders);
+        Header header = method.getResponseHeader(HTTPConstants.HEADER_CONTENT_TYPE);
 
         if (header != null) {
             HeaderElement[] headers = header.getElements();
             MessageContext inMessageContext = msgContext.getOperationContext().getMessageContext(
                     WSDLConstants.MESSAGE_LABEL_IN_VALUE);
-            
+
             if (inMessageContext != null) {
-                inMessageContext.setProperty(Constants.Configuration.CONTENT_TYPE, header.getValue());
+                inMessageContext
+                        .setProperty(Constants.Configuration.CONTENT_TYPE, header.getValue());
 
 
-                
-            for (int i = 0; i < headers.length; i++) {
-                NameValuePair charsetEnc =headers[i].getParameterByName(
-                        HTTPConstants.CHAR_SET_ENCODING);
-                if (charsetEnc != null) {
+                for (int i = 0; i < headers.length; i++) {
+                    NameValuePair charsetEnc = headers[i].getParameterByName(
+                            HTTPConstants.CHAR_SET_ENCODING);
+                    if (charsetEnc != null) {
                         inMessageContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING,
-                                charsetEnc.getValue());    // change to the value, which is text/xml or application/xml+soap
+                                                     charsetEnc.getValue());    // change to the value, which is text/xml or application/xml+soap
+                    }
                 }
             }
-            }
         }
 
         String sessionCookie = null;
@@ -238,7 +237,7 @@
             HeaderElement[] elements = cookieHeaders[i].getElements();
             for (int e = 0; e < elements.length; e++) {
                 HeaderElement element = elements[e];
-                if (Constants.SESSION_COOKIE.equalsIgnoreCase(element.getName())||
+                if (Constants.SESSION_COOKIE.equalsIgnoreCase(element.getName()) ||
                         Constants.SESSION_COOKIE_JSESSIONID.equalsIgnoreCase(element.getName())) {
                     sessionCookie = element.getValue();
                 }
@@ -250,7 +249,7 @@
             HeaderElement[] elements = cookieHeaders[i].getElements();
             for (int e = 0; e < elements.length; e++) {
                 HeaderElement element = elements[e];
-                if (Constants.SESSION_COOKIE.equalsIgnoreCase(element.getName())||
+                if (Constants.SESSION_COOKIE.equalsIgnoreCase(element.getName()) ||
                         Constants.SESSION_COOKIE_JSESSIONID.equalsIgnoreCase(element.getName())) {
                     sessionCookie = element.getValue();
                 }
@@ -276,10 +275,10 @@
         if (contentEncoding != null) {
             if (contentEncoding.getValue().
                     equalsIgnoreCase(HTTPConstants.COMPRESSION_GZIP)) {
-                in =new GZIPInputStream(in);
+                in = new GZIPInputStream(in);
             } else {
-                throw new AxisFault("HTTP :"+ "unsupported content-encoding of '"
-                                    + contentEncoding.getValue()+ "' found");
+                throw new AxisFault("HTTP :" + "unsupported content-encoding of '"
+                        + contentEncoding.getValue() + "' found");
             }
         }
 
@@ -301,7 +300,7 @@
             throws AxisFault {
         boolean isHostProxy = isProxyListed(msgCtx);    // list the proxy
 
-        
+
         boolean isAuthenticationEnabled = isAuthenticationEnabled(msgCtx);
         int port = targetURL.getPort();
 
@@ -317,7 +316,7 @@
             this.setAuthenticationInfo(client, msgCtx, config, targetURL);
         }
 
-            // proxy configuration
+        // proxy configuration
         if (!isHostProxy) {
             config.setHost(targetURL.getHost(), port, targetURL.getProtocol());
         } else {
@@ -337,9 +336,9 @@
     Apart from that user can change the priory or add a custom authentication scheme.
     */
     protected void setAuthenticationInfo(HttpClient agent,
-                                                       MessageContext msgCtx,
-                                                       HostConfiguration config,
-                                                       URL targetURL) throws AxisFault {
+                                         MessageContext msgCtx,
+                                         HostConfiguration config,
+                                         URL targetURL) throws AxisFault {
         config.setHost(targetURL.getHost(), targetURL.getPort(),
                        targetURL.getProtocol());
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java Sun Mar  4 10:16:54 2007
@@ -70,7 +70,8 @@
     private static final String LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME = "globalModules.jsp";
     private static final String LIST_AVAILABLE_MODULES_JSP_NAME = "listModules.jsp";
     private static final String ENGAGING_MODULE_TO_SERVICE_JSP_NAME = "engagingtoaservice.jsp";
-    private static final String ENGAGING_MODULE_TO_SERVICE_GROUP_JSP_NAME = "EngageToServiceGroup.jsp";
+    private static final String ENGAGING_MODULE_TO_SERVICE_GROUP_JSP_NAME =
+            "EngageToServiceGroup.jsp";
     private static final String ENGAGING_MODULE_GLOBALLY_JSP_NAME = "engagingglobally.jsp";
     public static final String ADMIN_JSP_NAME = "admin.jsp";
     private static final String VIEW_GLOBAL_HANDLERS_JSP_NAME = "ViewGlobalHandlers.jsp";
@@ -85,7 +86,8 @@
         super(aConfigContext);
         try {
             if (configContext.getAxisConfiguration().getRepository() != null) {
-                File repoDir = new File(configContext.getAxisConfiguration().getRepository().getFile());
+                File repoDir =
+                        new File(configContext.getAxisConfiguration().getRepository().getFile());
                 serviceDir = new File(repoDir, "services");
                 if (!serviceDir.exists()) {
                     serviceDir.mkdirs();
@@ -98,7 +100,8 @@
         }
     }
 
-    public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
+    public void handle(HttpServletRequest httpServletRequest,
+                       HttpServletResponse httpServletResponse)
             throws IOException, ServletException {
 
         // We forward to login page if axis2 security is enabled
@@ -111,18 +114,19 @@
         }
     }
 
-    protected void processIndex(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    protected void processIndex(HttpServletRequest req, HttpServletResponse res)
+            throws IOException, ServletException {
         renderView(ADMIN_JSP_NAME, req, res);
     }
 
     // supported web operations
 
     protected void processUpload(HttpServletRequest req, HttpServletResponse res)
-    throws IOException, ServletException {
+            throws IOException, ServletException {
         String hasHotDeployment =
-            (String) configContext.getAxisConfiguration().getParameterValue("hotdeployment");
+                (String) configContext.getAxisConfiguration().getParameterValue("hotdeployment");
         String hasHotUpdate =
-            (String) configContext.getAxisConfiguration().getParameterValue("hotupdate");
+                (String) configContext.getAxisConfiguration().getParameterValue("hotupdate");
         req.setAttribute("hotDeployment", (hasHotDeployment.equals("true")) ? "enabled"
                 : "disabled");
         req.setAttribute("hotUpdate", (hasHotUpdate.equals("true")) ? "enabled" : "disabled");
@@ -133,7 +137,7 @@
 
             try {
                 //Create a factory for disk-based file items
-                  FileItemFactory factory = new DiskFileItemFactory();
+                FileItemFactory factory = new DiskFileItemFactory();
                 //Create a new file upload handler
                 ServletFileUpload upload = new ServletFileUpload(factory);
                 List items = upload.parseRequest(req);
@@ -151,15 +155,15 @@
                             req.setAttribute("cause", "Unsupported file type " + fileExtesion);
                         } else {
 
-                            String fileNameOnly ;
+                            String fileNameOnly;
                             if (fileName.indexOf("\\") < 0) {
                                 fileNameOnly =
-                                    fileName.substring(fileName.lastIndexOf("/") + 1, fileName
-                                            .length());
+                                        fileName.substring(fileName.lastIndexOf("/") + 1, fileName
+                                                .length());
                             } else {
                                 fileNameOnly =
-                                    fileName.substring(fileName.lastIndexOf("\\") + 1, fileName
-                                            .length());
+                                        fileName.substring(fileName.lastIndexOf("\\") + 1, fileName
+                                                .length());
                             }
 
                             File uploadedFile = new File(serviceDir, fileNameOnly);
@@ -206,7 +210,7 @@
     }
 
     protected void processEditServicePara(HttpServletRequest req, HttpServletResponse res)
-    throws IOException, ServletException {
+            throws IOException, ServletException {
         String serviceName = req.getParameter("axisService");
         if (req.getParameter("changePara") != null) {
             AxisService service = configContext.getAxisConfiguration().getService(serviceName);
@@ -237,22 +241,24 @@
             req.getSession().removeAttribute(Constants.SERVICE);
         } else {
             AxisService serviceTemp =
-                configContext.getAxisConfiguration().getServiceForActivation(serviceName);
+                    configContext.getAxisConfiguration().getServiceForActivation(serviceName);
             if (serviceTemp.isActive()) {
 
                 if (serviceName != null) {
                     req.getSession().setAttribute(Constants.SERVICE,
-                            configContext.getAxisConfiguration().getService(serviceName));
+                                                  configContext.getAxisConfiguration().getService(
+                                                          serviceName));
                 }
             } else {
                 req.setAttribute("status", "Service " + serviceName + " is not an active service" +
-                ". \n Only parameters of active services can be edited.");
+                        ". \n Only parameters of active services can be edited.");
             }
         }
         renderView(SERVICE_PARA_EDIT_JSP_NAME, req, res);
     }
 
-    protected void processEngagingGlobally(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    protected void processEngagingGlobally(HttpServletRequest req, HttpServletResponse res)
+            throws IOException, ServletException {
         HashMap modules = configContext.getAxisConfiguration().getModules();
 
         req.getSession().setAttribute(Constants.MODULE_MAP, modules);
@@ -265,7 +271,7 @@
             try {
                 configContext.getAxisConfiguration().engageModule(new QName(moduleName));
                 req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                        moduleName + " module engaged globally successfully");
+                                              moduleName + " module engaged globally successfully");
             } catch (AxisFault axisFault) {
                 req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
             }
@@ -311,8 +317,9 @@
                         configContext.getAxisConfiguration().getModule(new QName(moduleName)),
                         configContext.getAxisConfiguration());
                 req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                        moduleName
-                                + " module engaged to the operation successfully");
+                                              moduleName
+                                                      +
+                                                      " module engaged to the operation successfully");
             } catch (AxisFault axisFault) {
                 req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
             }
@@ -344,8 +351,9 @@
                         configContext.getAxisConfiguration().getModule(new QName(moduleName)),
                         configContext.getAxisConfiguration());
                 req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                        moduleName
-                                + " module engaged to the service successfully");
+                                              moduleName
+                                                      +
+                                                      " module engaged to the service successfully");
             } catch (AxisFault axisFault) {
                 req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
             }
@@ -379,8 +387,9 @@
                     configContext.getAxisConfiguration().getModule(new QName(moduleName)),
                     configContext.getAxisConfiguration());
             req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                    moduleName
-                            + " module engaged to the service group successfully");
+                                          moduleName
+                                                  +
+                                                  " module engaged to the service group successfully");
         }
 
         req.getSession().setAttribute("axisService", null);
@@ -388,7 +397,8 @@
     }
 
 
-    protected void processLogout(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    protected void processLogout(HttpServletRequest req, HttpServletResponse res)
+            throws IOException, ServletException {
         req.getSession().invalidate();
         renderView("index.jsp", req, res);
     }
@@ -408,13 +418,15 @@
         renderView(SELECT_SERVICE_JSP_NAME, req, res);
     }
 
-    protected void processActivateService(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    protected void processActivateService(HttpServletRequest req, HttpServletResponse res)
+            throws IOException, ServletException {
         if (req.getParameter("submit") != null) {
             String serviceName = req.getParameter("axisService");
             String turnon = req.getParameter("turnon");
             if (serviceName != null) {
                 if (turnon != null) {
-                    AxisService service = configContext.getAxisConfiguration().getServiceForActivation(serviceName);
+                    AxisService service = configContext.getAxisConfiguration()
+                            .getServiceForActivation(serviceName);
                     service.setActive(true);
                 }
             }
@@ -423,13 +435,15 @@
         renderView(ACTIVATE_SERVICE_JSP_NAME, req, res);
     }
 
-    protected void processDeactivateService(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    protected void processDeactivateService(HttpServletRequest req, HttpServletResponse res)
+            throws IOException, ServletException {
         if (req.getParameter("submit") != null) {
             String serviceName = req.getParameter("axisService");
             String turnoff = req.getParameter("turnoff");
             if (serviceName != null) {
                 if (turnoff != null) {
-                    AxisService service = configContext.getAxisConfiguration().getService(serviceName);
+                    AxisService service =
+                            configContext.getAxisConfiguration().getService(serviceName);
                     service.setActive(false);
                 }
                 populateSessionInformation(req);
@@ -445,7 +459,7 @@
     protected void processViewGlobalHandlers(HttpServletRequest req, HttpServletResponse res)
             throws IOException, ServletException {
         req.getSession().setAttribute(Constants.GLOBAL_HANDLERS,
-                configContext.getAxisConfiguration());
+                                      configContext.getAxisConfiguration());
 
         renderView(VIEW_GLOBAL_HANDLERS_JSP_NAME, req, res);
     }
@@ -456,14 +470,15 @@
 
         if (service != null) {
             req.getSession().setAttribute(Constants.SERVICE_HANDLERS,
-                    configContext.getAxisConfiguration().getService(service));
+                                          configContext.getAxisConfiguration().getService(service));
         }
 
         renderView(VIEW_SERVICE_HANDLERS_JSP_NAME, req, res);
     }
 
 
-    protected void processListPhases(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    protected void processListPhases(HttpServletRequest req, HttpServletResponse res)
+            throws IOException, ServletException {
         PhasesInfo info = configContext.getAxisConfiguration().getPhasesInfo();
         req.getSession().setAttribute(Constants.PHASE_LIST, info);
         renderView(LIST_PHASES_JSP_NAME, req, res);
@@ -482,7 +497,7 @@
             throws IOException, ServletException {
         populateSessionInformation(req);
         req.getSession().setAttribute(Constants.ERROR_SERVICE_MAP,
-                configContext.getAxisConfiguration().getFaultyServices());
+                                      configContext.getAxisConfiguration().getFaultyServices());
 
         renderView(LIST_SERVICES_JSP_NAME, req, res);
     }
@@ -499,7 +514,8 @@
     }
 
 
-    protected void processListContexts(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    protected void processListContexts(HttpServletRequest req, HttpServletResponse res)
+            throws IOException, ServletException {
         req.getSession().setAttribute(Constants.CONFIG_CONTEXT, configContext);
         renderView("ViewContexts.jsp", req, res);
     }
@@ -513,18 +529,19 @@
         renderView(LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME, req, res);
     }
 
-    protected void processListModules(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    protected void processListModules(HttpServletRequest req, HttpServletResponse res)
+            throws IOException, ServletException {
         HashMap modules = configContext.getAxisConfiguration().getModules();
 
         req.getSession().setAttribute(Constants.MODULE_MAP, modules);
         req.getSession().setAttribute(Constants.ERROR_MODULE_MAP,
-                configContext.getAxisConfiguration().getFaultyModules());
+                                      configContext.getAxisConfiguration().getFaultyModules());
 
         renderView(LIST_AVAILABLE_MODULES_JSP_NAME, req, res);
     }
 
-    protected void processdisengageModule(HttpServletRequest req, HttpServletResponse res) 
-                                                        throws IOException, ServletException {
+    protected void processdisengageModule(HttpServletRequest req, HttpServletResponse res)
+            throws IOException, ServletException {
         String type = req.getParameter("type");
         String serviceName = req.getParameter("serviceName");
         String moduleName = req.getParameter("module");
@@ -532,30 +549,35 @@
         AxisService service = axisConfiguration.getService(serviceName);
         AxisModule module = axisConfiguration.getModule(new QName(moduleName));
         if (type.equals("operation")) {
-            if (service.isEngaged(module.getName()) || axisConfiguration.isEngaged(module.getName())) {
-                req.getSession().setAttribute("status", "Can not disengage module " + moduleName + 
+            if (service.isEngaged(module.getName()) ||
+                    axisConfiguration.isEngaged(module.getName())) {
+                req.getSession().setAttribute("status", "Can not disengage module " + moduleName +
                         ". This module is engaged at a higher level.");
             } else {
                 String opName = req.getParameter("operation");
                 AxisOperation op = service.getOperation(new QName(opName));
                 op.disengageModule(module);
-                req.getSession().setAttribute("status", "Module " + moduleName + " was disengaged from " +
-                        "operation " + opName + " in service " + serviceName + ".");
+                req.getSession()
+                        .setAttribute("status", "Module " + moduleName + " was disengaged from " +
+                                "operation " + opName + " in service " + serviceName + ".");
             }
         } else {
             if (axisConfiguration.isEngaged(module.getName())) {
-                req.getSession().setAttribute("status", "Can not disengage module " + moduleName + ". " +
-                        "This module is engaged at a higher level.");
+                req.getSession()
+                        .setAttribute("status", "Can not disengage module " + moduleName + ". " +
+                                "This module is engaged at a higher level.");
             } else {
                 service.disengageModule(axisConfiguration.getModule(new QName(moduleName)));
-                req.getSession().setAttribute("status", "Module " + moduleName + " was disengaged from" +
-                        " service " + serviceName + ".");
+                req.getSession()
+                        .setAttribute("status", "Module " + moduleName + " was disengaged from" +
+                                " service " + serviceName + ".");
             }
         }
         renderView("disengage.jsp", req, res);
     }
 
-    protected void processSelectService(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    protected void processSelectService(HttpServletRequest req, HttpServletResponse res)
+            throws IOException, ServletException {
         populateSessionInformation(req);
         req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "VIEW");
 
@@ -572,7 +594,8 @@
 
     private boolean axisSecurityEnabled
             () {
-        Parameter parameter = configContext.getAxisConfiguration().getParameter(Constants.ADMIN_SECURITY_DISABLED);
+        Parameter parameter = configContext.getAxisConfiguration()
+                .getParameter(Constants.ADMIN_SECURITY_DISABLED);
         return parameter == null || !"true".equals(parameter.getValue());
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisAdminServlet.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisAdminServlet.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisAdminServlet.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisAdminServlet.java Sun Mar  4 10:16:54 2007
@@ -30,13 +30,14 @@
  */
 public class AxisAdminServlet extends AxisServlet {
 
-  protected transient AdminAgent agent;
+    protected transient AdminAgent agent;
 
-  protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
-    doGet(req, res);
-  }
+    protected void doPost(HttpServletRequest req, HttpServletResponse res)
+            throws ServletException, IOException {
+        doGet(req, res);
+    }
 
-  protected void doGet(HttpServletRequest req,
+    protected void doGet(HttpServletRequest req,
                          HttpServletResponse resp) throws ServletException, IOException {
         try {
             req.getSession().setAttribute(Constants.SERVICE_PATH, configContext.getServicePath());

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisRequestEntity.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisRequestEntity.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisRequestEntity.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisRequestEntity.java Sun Mar  4 10:16:54 2007
@@ -35,29 +35,30 @@
  * Axis2 message formatter object.
  */
 public class AxisRequestEntity implements RequestEntity {
-    
+
     private MessageFormatter messageFormatter;
-    
+
     private boolean chunked = false;
-    
+
     private MessageContext messageContext;
-    
+
     private byte[] bytes;
-    
+
     private boolean isAllowedRetry;
-    
+
     private OMOutputFormat format;
-    
+
     private String soapAction;
-    
+
     /**
      * Method calls to this request entity are delegated to the following Axis2
      * message formatter object.
-     * 
+     *
      * @param messageFormatter
      */
     public AxisRequestEntity(MessageFormatter messageFormatter,
-            MessageContext msgContext, OMOutputFormat format,String soapAction, boolean chunked,boolean isAllowedRetry) {
+                             MessageContext msgContext, OMOutputFormat format, String soapAction,
+                             boolean chunked, boolean isAllowedRetry) {
         this.messageFormatter = messageFormatter;
         this.messageContext = msgContext;
         this.chunked = chunked;
@@ -65,13 +66,13 @@
         this.format = format;
         this.soapAction = soapAction;
     }
-    
+
     public boolean isRepeatable() {
         // All Axis2 request entity implementations were returning this true
         // So we return true as defualt
         return true;
     }
-    
+
     public void writeRequest(OutputStream outStream) throws IOException {
         Object gzip = messageContext.getOptions().getProperty(
                 HTTPConstants.MC_GZIP_REQUEST);
@@ -80,10 +81,10 @@
         }
         try {
             if (chunked) {
-                messageFormatter.writeTo(messageContext,format,outStream, isAllowedRetry);
+                messageFormatter.writeTo(messageContext, format, outStream, isAllowedRetry);
             } else {
                 if (bytes == null) {
-                    bytes = messageFormatter.getBytes(messageContext,format);
+                    bytes = messageFormatter.getBytes(messageContext, format);
                 }
                 outStream.write(bytes);
             }
@@ -96,9 +97,9 @@
         } catch (IOException e) {
             throw new AxisFault(e);
         }
-        
+
     }
-    
+
     public long getContentLength() {
         if (chunked) {
             return -1;
@@ -107,13 +108,13 @@
             try {
                 bytes = messageFormatter.getBytes(messageContext, format);
             } catch (AxisFault e) {
-                    return -1;
+                return -1;
             }
         }
         return bytes.length;
     }
-    
+
     public String getContentType() {
-        return messageFormatter.getContentType(messageContext,format,soapAction);
+        return messageFormatter.getContentType(messageContext, format, soapAction);
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java Sun Mar  4 10:16:54 2007
@@ -110,7 +110,7 @@
         String contentType = request.getContentType();
         if (!HTTPTransportUtils.isRESTRequest(contentType)) {
             msgContext = createMessageContext(request, response);
-            msgContext.setProperty(Constants.Configuration.CONTENT_TYPE,contentType);
+            msgContext.setProperty(Constants.Configuration.CONTENT_TYPE, contentType);
             try {
                 // adding ServletContext into msgContext;
                 InvocationResponse pi = HTTPTransportUtils.
@@ -125,7 +125,7 @@
                         (Boolean) msgContext.getProperty(RequestResponseTransport.HOLD_RESPONSE);
 
                 if (pi.equals(InvocationResponse.SUSPEND) ||
-                    (holdResponse != null && Boolean.TRUE.equals(holdResponse))) {
+                        (holdResponse != null && Boolean.TRUE.equals(holdResponse))) {
                     ((RequestResponseTransport) msgContext
                             .getProperty(RequestResponseTransport.TRANSPORT_CONTROL))
                             .awaitResponse();
@@ -139,7 +139,7 @@
                 }
 
                 response.setContentType("text/xml; charset="
-                                        + msgContext
+                        + msgContext
                         .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING));
 
                 if ((contextWritten == null) || !Constants.VALUE_TRUE.equals(contextWritten)) {
@@ -219,12 +219,12 @@
         // 2. list services requests
         // 3. REST requests.
         if ((query != null) && (query.indexOf("wsdl2") >= 0 ||
-                                query.indexOf("wsdl") >= 0 || query.indexOf("xsd") >= 0 ||
-                                query.indexOf("policy") >= 0)) {
+                query.indexOf("wsdl") >= 0 || query.indexOf("xsd") >= 0 ||
+                query.indexOf("policy") >= 0)) {
             // handling meta data exchange stuff
             agent.processListService(request, response);
         } else if (requestURI.endsWith(LIST_SERVICES_SUFIX) ||
-                   requestURI.endsWith(LIST_FAUKT_SERVICES_SUFIX)) {
+                requestURI.endsWith(LIST_FAUKT_SERVICES_SUFIX)) {
             // handling list services request
             try {
                 agent.handle(request, response);
@@ -291,7 +291,7 @@
     protected void disableRESTErrorMessage(HttpServletResponse response) throws IOException {
         PrintWriter writer = new PrintWriter(response.getOutputStream());
         writer.println("<html><body><h2>Please enable REST support in WEB-INF/conf/axis2.xml " +
-                       "and WEB-INF/web.xml</h2></body></html>");
+                "and WEB-INF/web.xml</h2></body></html>");
         writer.flush();
         response.setStatus(HttpServletResponse.SC_ACCEPTED);
 
@@ -378,7 +378,7 @@
 
             if (valueElement != null) {
                 if (valueElement.getText().trim().indexOf(SOAP12Constants.FAULT_CODE_SENDER) >
-                    -1 && !msgContext.isDoingREST()) {
+                        -1 && !msgContext.isDoingREST()) {
                     response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
                 }
             }
@@ -555,15 +555,15 @@
 
 
         EndpointReference soapEndpoint = new EndpointReference("http://" + ip + ":" + port + '/' +
-                                                               configContext
-                                                                       .getServiceContextPath() +
-                                                                                                "/" +
-                                                                                                serviceName);
+                configContext
+                        .getServiceContextPath() +
+                "/" +
+                serviceName);
 
         if (!disableREST) {
             EndpointReference restEndpoint =
                     new EndpointReference("http://" + ip + ":" + port + '/' +
-                                          configContext.getRESTContextPath() + "/" + serviceName);
+                            configContext.getRESTContextPath() + "/" + serviceName);
             return new EndpointReference[]{soapEndpoint, restEndpoint};
         } else {
             return new EndpointReference[]{soapEndpoint};
@@ -696,7 +696,7 @@
         public void acknowledgeMessage(MessageContext msgContext) throws AxisFault {
             log.debug("Acking one-way request");
             response.setContentType("text/xml; charset="
-                                    + msgContext
+                    + msgContext
                     .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING));
 
             response.setStatus(HttpServletResponse.SC_ACCEPTED);
@@ -739,7 +739,7 @@
         HttpServletResponse response;
 
         public ProcessRESTRequest(String httpMethodString, HttpServletRequest request,
-                           HttpServletResponse response)
+                                  HttpServletResponse response)
                 throws IOException {
             this.request = request;
             this.response = response;
@@ -752,7 +752,8 @@
 
         public void processXMLRequest() throws IOException, ServletException {
             try {
-                RESTUtil.processXMLRequest(messageContext, request.getInputStream(), response.getOutputStream(), request.getContentType());
+                RESTUtil.processXMLRequest(messageContext, request.getInputStream(),
+                                           response.getOutputStream(), request.getContentType());
                 this.checkResponseWritten();
             } catch (AxisFault axisFault) {
                 processFault(axisFault);
@@ -764,7 +765,8 @@
 
         public void processURLRequest() throws IOException, ServletException {
             try {
-                RESTUtil.processURLRequest(messageContext,response.getOutputStream(), request.getContentType());
+                RESTUtil.processURLRequest(messageContext, response.getOutputStream(),
+                                           request.getContentType());
                 this.checkResponseWritten();
             } catch (AxisFault axisFault) {
                 processFault(axisFault);

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Sun Mar  4 10:16:54 2007
@@ -81,7 +81,7 @@
     }
 
     public void init(ConfigurationContext confContext,
-            TransportOutDescription transportOut) throws AxisFault {
+                     TransportOutDescription transportOut) throws AxisFault {
 
         // <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter> or
         // <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter> is
@@ -97,7 +97,7 @@
 
                 if ((transferEncoding != null)
                         && HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED
-                                .equals(transferEncoding.getValue())) {
+                        .equals(transferEncoding.getValue())) {
                     chunked = true;
                 }
             } else if (HTTPConstants.HEADER_PROTOCOL_10.equals(version
@@ -156,21 +156,22 @@
             if (mimeBoundaryProperty != null) {
                 format.setMimeBoundary((String) mimeBoundaryProperty);
             }
-            
+
             TransportOutDescription transportOut = msgContext.getConfigurationContext().
-                                        getAxisConfiguration().getTransportOut(new QName (Constants.TRANSPORT_HTTP));
-            
+                    getAxisConfiguration().getTransportOut(new QName(Constants.TRANSPORT_HTTP));
+
             //if a parameter hs set been set, we will omit the SOAP action for SOAP 1.2 
-            if (transportOut!=null) {
+            if (transportOut != null) {
                 Parameter param = transportOut.getParameter(HTTPConstants.OMIT_SOAP_12_ACTION);
                 Object value = null;
                 if (param != null) {
                     value = param.getValue();
                 }
-                
-                if (value!=null && JavaUtils.isTrueExplicitly(value)) {
-                    if (msgContext.isSOAP11()!=true) {
-                        msgContext.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION, Boolean.TRUE);
+
+                if (value != null && JavaUtils.isTrueExplicitly(value)) {
+                    if (msgContext.isSOAP11() != true) {
+                        msgContext.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,
+                                               Boolean.TRUE);
                     }
                 }
             }
@@ -223,8 +224,8 @@
     }
 
     private void sendUsingOutputStream(MessageContext msgContext,
-            OMOutputFormat format) throws AxisFault, XMLStreamException {
-        
+                                       OMOutputFormat format) throws AxisFault, XMLStreamException {
+
         OutputStream out = (OutputStream) msgContext
                 .getProperty(MessageContext.TRANSPORT_OUT);
 
@@ -249,7 +250,7 @@
                     }
                 }
             }
-       }
+        }
 
         format.setAutoCloseWriter(true);
 
@@ -276,7 +277,7 @@
     }
 
     private void writeMessageWithCommons(MessageContext messageContext,
-            EndpointReference toEPR, OMOutputFormat format)
+                                         EndpointReference toEPR, OMOutputFormat format)
             throws AxisFault {
         try {
             URL url = new URL(toEPR.getAddress());
@@ -328,7 +329,7 @@
                 soapActionString = messageContext.getWSAAction();
                 if (messageContext.getAxisOperation() != null
                         && ((soapActionString == null) || (soapActionString
-                                .length() == 0))) {
+                        .length() == 0))) {
                     // last option is to get it from the axis operation
                     soapActionString = messageContext.getAxisOperation()
                             .getInputAction();
@@ -340,7 +341,7 @@
         if (soapActionString == null && messageContext.isSOAP11()) {
             soapActionString = "\"\"";
         }
-        
+
         return soapActionString;
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPConstants.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPConstants.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPConstants.java Sun Mar  4 10:16:54 2007
@@ -388,12 +388,12 @@
     public static final byte SENDER[] = "400".getBytes();
     public static final String PROXY = "PROXY";
     public static final String AUTHENTICATE = "_NTLM_DIGEST_BASIC_AUTHENTICATION_";
-    
+
     /**
      * @deprecated
      */
     public static final String MTOM_RECEIVED_CONTENT_TYPE = "MTOM_RECEIVED";
-    
+
     /**
      * Field ISE[]
      */
@@ -446,8 +446,9 @@
 
     public static final String HEADER_ACCEPT_ENCODING = "Accept-Encoding";
     public static final String HEADER_CONTENT_ENCODING = "Content-Encoding";
-    public static final String HEADER_CONTENT_ENCODING_LOWERCASE = HEADER_CONTENT_ENCODING.toLowerCase();
-    
+    public static final String HEADER_CONTENT_ENCODING_LOWERCASE =
+            HEADER_CONTENT_ENCODING.toLowerCase();
+
 
     public static final String COMPRESSION_GZIP = "gzip";
 
@@ -464,9 +465,9 @@
      */
     public static final String MC_GZIP_REQUEST = "transport.http.gzipRequest";
 
-     /* by default the HTTP response body is not compressed. set this message
-     * context property to true to have the response body gzip compressed.
-     */
+    /* by default the HTTP response body is not compressed. set this message
+    * context property to true to have the response body gzip compressed.
+    */
     public static final String MC_GZIP_RESPONSE = "gzipResponse";
 
     /**
@@ -474,19 +475,20 @@
      * up by the sender while sending the request
      */
     public static final String HTTP_HEADERS = "HTTP_HEADERS";
-    public static final String CHUNKED="__CHUNKED__";
+    public static final String CHUNKED = "__CHUNKED__";
     public static final String HTTP_PROTOCOL_VERSION = "__HTTP_PROTOCOL_VERSION__";
     //to set and get the property from service context
     public static final String COOKIE_STRING = "Cookie";
     public static final String HTTP_METHOD_GET = "GET";
     public static final String HTTP_METHOD_POST = "POST";
-    
+
     /**
      * @deprecated Please use Constants.Configuration.CONTENT_TYPE
      */
     public static final String CONTENT_TYPE = "Content-Type";
 
     public static final String OMIT_SOAP_12_ACTION = "OmitSOAP12Action";
+
     /**
      * Method getBytes.
      *

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java Sun Mar  4 10:16:54 2007
@@ -42,7 +42,7 @@
 public class HTTPSender extends AbstractHTTPSender {
 
 
-    public void send(MessageContext msgContext,URL url, String soapActionString)
+    public void send(MessageContext msgContext, URL url, String soapActionString)
             throws MalformedURLException, AxisFault, IOException {
 
         // execute the HtttpMethodBase - a connection manager can be given for

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java Sun Mar  4 10:16:54 2007
@@ -105,7 +105,8 @@
 
                 Iterator iterator = axisService.getOperations();
 
-                temp += "<h3><a href=\"" + axisService.getName() + "?wsdl\">" + axisService.getName() + "</a></h3>";
+                temp += "<h3><a href=\"" + axisService.getName() + "?wsdl\">" +
+                        axisService.getName() + "</a></h3>";
 
                 if (iterator.hasNext()) {
                     temp += "Available operations <ul>";
@@ -155,7 +156,8 @@
             Iterator iterator = axisService.getOperations();
             temp += "<h3>" + axisService.getName() + "</h3>";
             temp += "<a href=\"" + axisService.getName() + "?wsdl\">wsdl</a> <br/> ";
-            temp += "<i>Service Description :  " + axisService.getServiceDescription() + "</i><br/><br/>";
+            temp += "<i>Service Description :  " + axisService.getServiceDescription() +
+                    "</i><br/><br/>";
             if (iterator.hasNext()) {
                 temp += "Available operations <ul>";
                 for (; iterator.hasNext();) {
@@ -171,7 +173,8 @@
         }
         catch (AxisFault axisFault) {
             temp = "<html><head><title>Service has a fualt</title></head>" + "<body>"
-                    + "<hr><h2><font color=\"blue\">" + axisFault.getMessage() + "</font></h2></body></html>";
+                    + "<hr><h2><font color=\"blue\">" + axisFault.getMessage() +
+                    "</font></h2></body></html>";
         }
         return temp;
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java Sun Mar  4 10:16:54 2007
@@ -55,10 +55,11 @@
 
 
     public static SOAPEnvelope createEnvelopeFromGetRequest(String requestUrl,
-                                   Map map,ConfigurationContext configCtx) throws AxisFault {
+                                                            Map map, ConfigurationContext configCtx)
+            throws AxisFault {
         String[] values =
                 Utils.parseRequestURLForServiceAndOperation(requestUrl,
-                                                        configCtx.getServiceContextPath());
+                                                            configCtx.getServiceContextPath());
         if (values == null) {
             return new SOAP11Factory().getDefaultEnvelope();
         }
@@ -101,7 +102,7 @@
 //        if (msgContext.isDoingMTOM()) {
 //            return true;
 //        }
-        
+
         boolean enableMTOM = false;
         Parameter parameter = msgContext.getParameter(Constants.Configuration.ENABLE_MTOM);
         if (parameter != null) {
@@ -114,7 +115,7 @@
         }
         return enableMTOM;
     }
-    
+
     public static boolean doWriteSwA(MessageContext msgContext) {
         // check whether isDoingSWA is already true in the message context
 //        if (msgContext.isDoingSwA()) {
@@ -132,12 +133,12 @@
         }
         return enableSwA;
     }
-    
+
     /**
      * Utility method to query CharSetEncoding. First look in the
      * MessageContext. If it's not there look in the OpContext. Use the defualt,
      * if it's not given in either contexts.
-     * 
+     *
      * @param msgContext
      * @return CharSetEncoding
      */
@@ -162,21 +163,22 @@
     }
 
     /**
-     *
-     * @param msgContext - The MessageContext of the Request Message
-     * @param out - The output stream of the response
-     * @param soapAction - SoapAction of the request
-     * @param requestURI - The URL that the request came to
+     * @param msgContext           - The MessageContext of the Request Message
+     * @param out                  - The output stream of the response
+     * @param soapAction           - SoapAction of the request
+     * @param requestURI           - The URL that the request came to
      * @param configurationContext - The Axis Configuration Context
-     * @param requestParameters - The parameters of the request message
+     * @param requestParameters    - The parameters of the request message
      * @return - boolean indication whether the operation was succesfull
      * @throws AxisFault - Thrown in case a fault occurs
      * @deprecated use RESTUtil.processURLRequest(MessageContext msgContext, OutputStream out, String contentType) instead
      */
 
     public static boolean processHTTPGetRequest(MessageContext msgContext,
-                                                OutputStream out, String soapAction, String requestURI,
-                                                ConfigurationContext configurationContext, Map requestParameters)
+                                                OutputStream out, String soapAction,
+                                                String requestURI,
+                                                ConfigurationContext configurationContext,
+                                                Map requestParameters)
             throws AxisFault {
         if ((soapAction != null) && soapAction.startsWith("\"") && soapAction.endsWith("\"")) {
             soapAction = soapAction.substring(1, soapAction.length() - 1);
@@ -187,7 +189,8 @@
         msgContext.setProperty(MessageContext.TRANSPORT_OUT, out);
         msgContext.setServerSide(true);
         SOAPEnvelope envelope = HTTPTransportUtils.createEnvelopeFromGetRequest(requestURI,
-                                                                                requestParameters, configurationContext);
+                                                                                requestParameters,
+                                                                                configurationContext);
 
         if (envelope == null) {
             return false;
@@ -204,19 +207,22 @@
     private static final int VERSION_SOAP11 = 1;
     private static final int VERSION_SOAP12 = 2;
 
-    public static InvocationResponse processHTTPPostRequest(MessageContext msgContext, InputStream in,
-                                              OutputStream out, String contentType, String soapActionHeader, String requestURI)
+    public static InvocationResponse processHTTPPostRequest(MessageContext msgContext,
+                                                            InputStream in,
+                                                            OutputStream out, String contentType,
+                                                            String soapActionHeader,
+                                                            String requestURI)
             throws AxisFault {
         int soapVersion = VERSION_UNKNOWN;
         InvocationResponse pi = InvocationResponse.CONTINUE;
-        
+
         try {
 
             in = handleGZip(msgContext, in);
 
             // remove the starting and trailing " from the SOAP Action
             if ((soapActionHeader != null) && soapActionHeader.charAt(0) == '\"'
-                && soapActionHeader.endsWith("\"")) {
+                    && soapActionHeader.endsWith("\"")) {
                 soapActionHeader = soapActionHeader.substring(1, soapActionHeader.length() - 1);
             }
 
@@ -227,44 +233,44 @@
             msgContext.setServerSide(true);
 
             SOAPEnvelope envelope = null;
-            boolean isMIME=false;
+            boolean isMIME = false;
 
             // get the type of char encoding
             String charSetEnc = BuilderUtil.getCharSetEncoding(contentType);
-            if(charSetEnc == null){
+            if (charSetEnc == null) {
                 charSetEnc = MessageContext.DEFAULT_CHAR_SET_ENCODING;
             }
             msgContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEnc);
 
             if (contentType != null) {
-				if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) > -1) {
-					soapVersion = VERSION_SOAP12;
-					TransportUtils.processContentTypeForAction(contentType, msgContext);
-				} else if (contentType
-						.indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1) {
-					soapVersion = VERSION_SOAP11;
-				} else if (isRESTRequest(contentType)) {
+                if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) > -1) {
+                    soapVersion = VERSION_SOAP12;
+                    TransportUtils.processContentTypeForAction(contentType, msgContext);
+                } else if (contentType
+                        .indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1) {
+                    soapVersion = VERSION_SOAP11;
+                } else if (isRESTRequest(contentType)) {
                     // If REST, construct a SOAP11 envelope to hold the rest message and
                     // indicate that this is a REST message.
-                    soapVersion = VERSION_SOAP11; 
+                    soapVersion = VERSION_SOAP11;
                     msgContext.setDoingREST(true);
                 }
-				if (soapVersion == VERSION_SOAP11) {
-					// TODO Keith : Do we need this anymore
-					// Deployment configuration parameter
-					Parameter enableREST = msgContext
-							.getParameter(Constants.Configuration.ENABLE_REST);
-					if ((soapActionHeader == null) && (enableREST != null)) {
-						if (Constants.VALUE_TRUE.equals(enableREST.getValue())) {
-							// If the content Type is text/xml (BTW which is the
-							// SOAP 1.1 Content type ) and the SOAP Action is
-							// absent it is rest !!
-							msgContext.setDoingREST(true);
-						}
-					}
-				}
-			}
-            envelope = TransportUtils.createSOAPMessage(msgContext,in,contentType);
+                if (soapVersion == VERSION_SOAP11) {
+                    // TODO Keith : Do we need this anymore
+                    // Deployment configuration parameter
+                    Parameter enableREST = msgContext
+                            .getParameter(Constants.Configuration.ENABLE_REST);
+                    if ((soapActionHeader == null) && (enableREST != null)) {
+                        if (Constants.VALUE_TRUE.equals(enableREST.getValue())) {
+                            // If the content Type is text/xml (BTW which is the
+                            // SOAP 1.1 Content type ) and the SOAP Action is
+                            // absent it is rest !!
+                            msgContext.setDoingREST(true);
+                        }
+                    }
+                }
+            }
+            envelope = TransportUtils.createSOAPMessage(msgContext, in, contentType);
             msgContext.setEnvelope(envelope);
             AxisEngine engine = new AxisEngine(msgContext.getConfigurationContext());
 
@@ -273,7 +279,7 @@
             } else {
                 pi = engine.receive(msgContext);
             }
-            
+
             return pi;
         } catch (SOAPProcessingException e) {
             throw new AxisFault(e);
@@ -343,8 +349,8 @@
         if (contentType == null) {
             return false;
         }
-        return ( contentType.indexOf(HTTPConstants.MEDIA_TYPE_APPLICATION_XML) > -1 ||
-                 contentType.indexOf(HTTPConstants.MEDIA_TYPE_X_WWW_FORM) > -1 ||
-                 contentType.indexOf(HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA) > -1);
+        return (contentType.indexOf(HTTPConstants.MEDIA_TYPE_APPLICATION_XML) > -1 ||
+                contentType.indexOf(HTTPConstants.MEDIA_TYPE_X_WWW_FORM) > -1 ||
+                contentType.indexOf(HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA) > -1);
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java Sun Mar  4 10:16:54 2007
@@ -63,7 +63,8 @@
 
         ConfigurationContext configurationContext = msgContext.getConfigurationContext();
         final String servicePath = configurationContext.getServiceContextPath();
-        final String contextPath = (servicePath.startsWith("/") ? servicePath : "/" + servicePath) + "/";
+        final String contextPath =
+                (servicePath.startsWith("/") ? servicePath : "/" + servicePath) + "/";
 
         HttpVersion ver = request.getRequestLine().getHttpVersion();
         String uri = request.getRequestLine().getUri();
@@ -95,7 +96,8 @@
                 if (!uri.endsWith(contextPath)) {
                     String serviceName = uri.replaceAll(contextPath, "");
                     if (serviceName.indexOf("/") < 0) {
-                        String res = HTTPTransportReceiver.printServiceHTML(serviceName, configurationContext);
+                        String res = HTTPTransportReceiver
+                                .printServiceHTML(serviceName, configurationContext);
                         StringEntity entity = new StringEntity(res);
                         entity.setContentType("text/html");
                         response.setEntity(entity);
@@ -158,7 +160,8 @@
             }
             //cater for named xsds - check for the xsd name
             if (uri.indexOf("?xsd=") > 0) {
-                String serviceName = uri.substring(uri.lastIndexOf("/") + 1, uri.lastIndexOf("?xsd="));
+                String serviceName =
+                        uri.substring(uri.lastIndexOf("/") + 1, uri.lastIndexOf("?xsd="));
                 String schemaName = uri.substring(uri.lastIndexOf("=") + 1);
 
                 HashMap services = configurationContext.getAxisConfiguration().getServices();
@@ -210,20 +213,18 @@
             }
 
 
-
-
-        } else if(method.equals(HTTPConstants.HEADER_PUT)) {
+        } else if (method.equals(HTTPConstants.HEADER_PUT)) {
             outbuffer = copyCommonProperties(msgContext, request);
             HttpEntity inentity = ((HttpEntityEnclosingRequest) request).getEntity();
             String contentType = processContentType(inentity, msgContext);
-                pi = RESTUtil.processXMLRequest(msgContext, inentity.getContent(),
-                                                outbuffer.getOutputStream(), contentType);
+            pi = RESTUtil.processXMLRequest(msgContext, inentity.getContent(),
+                                            outbuffer.getOutputStream(), contentType);
 
-        } else if(method.equals(HTTPConstants.HEADER_DELETE)) {
+        } else if (method.equals(HTTPConstants.HEADER_DELETE)) {
             outbuffer = copyCommonProperties(msgContext, request);
 
 
-                pi = RESTUtil.processURLRequest(msgContext, outbuffer.getOutputStream(), null);
+            pi = RESTUtil.processURLRequest(msgContext, outbuffer.getOutputStream(), null);
 
         } else {
 
@@ -252,20 +253,24 @@
     }
 
     private void handleResponse(InvocationResponse pi, HttpResponse response,
-                                OutputBuffer outbuffer,MessageContext msgContext)
+                                OutputBuffer outbuffer, MessageContext msgContext)
             throws IOException {
-            Boolean holdResponse = (Boolean) msgContext.getProperty(RequestResponseTransport.HOLD_RESPONSE);
+        Boolean holdResponse =
+                (Boolean) msgContext.getProperty(RequestResponseTransport.HOLD_RESPONSE);
 
-            if (pi.equals(InvocationResponse.SUSPEND) || (holdResponse != null && Boolean.TRUE.equals(holdResponse))) {
-                try {
-                ((RequestResponseTransport)msgContext.getProperty(RequestResponseTransport.TRANSPORT_CONTROL)).awaitResponse();
-              }
-                catch (InterruptedException e) {
-                throw new IOException("We were interrupted, so this may not function correctly:"+ e.getMessage());
-              }
+        if (pi.equals(InvocationResponse.SUSPEND) ||
+                (holdResponse != null && Boolean.TRUE.equals(holdResponse))) {
+            try {
+                ((RequestResponseTransport) msgContext
+                        .getProperty(RequestResponseTransport.TRANSPORT_CONTROL)).awaitResponse();
+            }
+            catch (InterruptedException e) {
+                throw new IOException("We were interrupted, so this may not function correctly:" +
+                        e.getMessage());
             }
+        }
 
-            response.setEntity(outbuffer);
+        response.setEntity(outbuffer);
     }
 
     private String processContentType(HttpEntity inentity, MessageContext msgContext) {
@@ -274,7 +279,7 @@
         if (header != null) {
             contentType = header.getValue();
         }
-        msgContext.setProperty(Constants.Configuration.CONTENT_TYPE,contentType);
+        msgContext.setProperty(Constants.Configuration.CONTENT_TYPE, contentType);
         return contentType;
     }
 
@@ -285,46 +290,46 @@
         msgContext.setProperty(Constants.OUT_TRANSPORT_INFO, outbuffer);
         msgContext.setTo(new EndpointReference(request.getRequestLine().getUri()));
         msgContext.setProperty(RequestResponseTransport.TRANSPORT_CONTROL,
-                                   new SimpleHTTPRequestResponseTransport());
+                               new SimpleHTTPRequestResponseTransport());
         return outbuffer;
     }
 
-    public String getHostAddress(HttpRequest request) throws java.net.SocketException{
+    public String getHostAddress(HttpRequest request) throws java.net.SocketException {
         try {
             Header hostHeader = request.getFirstHeader("host");
-            if (hostHeader!=null){
+            if (hostHeader != null) {
                 String host = hostHeader.getValue();
-                return new URI("http://"+host).getHost();
+                return new URI("http://" + host).getHost();
             }
-        } catch (Exception e){
-            
+        } catch (Exception e) {
+
         }
         return HttpUtils.getIpAddress();
-    }    
+    }
 
     class SimpleHTTPRequestResponseTransport implements RequestResponseTransport {
-        
-      private CountDownLatch responseReadySignal = new CountDownLatch(1);
-      RequestResponseTransportStatus status = RequestResponseTransportStatus.INITIAL;
-      
+
+        private CountDownLatch responseReadySignal = new CountDownLatch(1);
+        RequestResponseTransportStatus status = RequestResponseTransportStatus.INITIAL;
+
         public void acknowledgeMessage(MessageContext msgContext) throws AxisFault {
-        //TODO: Once the core HTTP API allows us to return an ack before unwinding, then the should be fixed
-        signalResponseReady();
-      }
-      
+            //TODO: Once the core HTTP API allows us to return an ack before unwinding, then the should be fixed
+            signalResponseReady();
+        }
+
         public void awaitResponse() throws InterruptedException {
-          status = RequestResponseTransportStatus.WAITING;
-          responseReadySignal.await();
-      }
-      
+            status = RequestResponseTransportStatus.WAITING;
+            responseReadySignal.await();
+        }
+
         public void signalResponseReady() {
-          status = RequestResponseTransportStatus.SIGNALLED;
-          responseReadySignal.countDown();
-      }
-
-      public RequestResponseTransportStatus getStatus() {
-        return status;
-      }
-      
+            status = RequestResponseTransportStatus.SIGNALLED;
+            responseReadySignal.countDown();
+        }
+
+        public RequestResponseTransportStatus getStatus() {
+            return status;
+        }
+
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorkerFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorkerFactory.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorkerFactory.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorkerFactory.java Sun Mar  4 10:16:54 2007
@@ -37,9 +37,9 @@
     public HTTPWorkerFactory() {
         super();
     }
-    
+
     public Worker newWorker() {
         return new HTTPWorker();
     }
-    
+
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HttpTransportProperties.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HttpTransportProperties.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HttpTransportProperties.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HttpTransportProperties.java Sun Mar  4 10:16:54 2007
@@ -120,13 +120,14 @@
             this.userName = userName;
         }
     }
+
     /*
     This class is responsible for holding all the necessary information needed for NTML, Digest
     and Basic Authentication. Authentication itself is handled by httpclient. User doesn't need to
     warry about what authentication mechanism it uses. Axis2 uses httpclinet's default authentication
     patterns.
     */
-    public static class Authenticator{
+    public static class Authenticator {
         /*host that needed to be authenticated with*/
         private String host;
         /*port of the host that needed to be authenticated with*/
@@ -214,20 +215,23 @@
         public List getAuthSchemes() {
             return this.authSchemes;
         }
-        public void setAllowedRetry(boolean allowedRetry){
+
+        public void setAllowedRetry(boolean allowedRetry) {
             this.allowedRetry = allowedRetry;
         }
+
         public boolean isAllowedRetry() {
-            return  this.allowedRetry;
+            return this.allowedRetry;
         }
     }
-    public static class MailProperties{
+
+    public static class MailProperties {
         final Properties mailProperties = new Properties();
 
         private String password;
 
         public void addProperty(String key, String value) {
-            mailProperties.put(key,value);
+            mailProperties.put(key, value);
         }
 
         public void deleteProperty(String key) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ListingAgent.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ListingAgent.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ListingAgent.java Sun Mar  4 10:16:54 2007
@@ -74,7 +74,7 @@
             if (trsIn == null) {
                 trsIn = new TransportInDescription(new QName(schema));
                 HTTPSListener httspReceiver = new HTTPSListener(port, schema);
-                httspReceiver.init(configContext,trsIn);
+                httspReceiver.init(configContext, trsIn);
                 trsIn.setReceiver(httspReceiver);
                 configContext.getListenerManager().addListener(trsIn, true);
             }
@@ -95,7 +95,7 @@
             int seperatorIndex = ip.indexOf(":");
             int slashIndex = ip.indexOf("/");
             String portstr = ip.substring(seperatorIndex + 1,
-                    slashIndex);
+                                          slashIndex);
             try {
                 addTransportListner(httpServletRequest.getScheme(), Integer.parseInt(portstr));
             } catch (NumberFormatException e) {
@@ -104,7 +104,8 @@
         }
         String query = httpServletRequest.getQueryString();
         if (query != null) {
-            if (query.indexOf("?wsdl2") > 0 || query.indexOf("?wsdl") > 0 || query.indexOf("?xsd") > 0) {
+            if (query.indexOf("?wsdl2") > 0 || query.indexOf("?wsdl") > 0 ||
+                    query.indexOf("?xsd") > 0) {
                 processListService(httpServletRequest, httpServletResponse);
             } else {
                 super.handle(httpServletRequest, httpServletResponse);
@@ -160,14 +161,14 @@
 
         String filePart = req.getRequestURL().toString();
         String serviceName = filePart.substring(filePart.lastIndexOf("/") + 1,
-                filePart.length());
+                                                filePart.length());
         HashMap services = configContext.getAxisConfiguration().getServices();
         String query = req.getQueryString();
         int wsdl2 = query.indexOf("wsdl2");
         int wsdl = query.indexOf("wsdl");
         int xsd = query.indexOf("xsd");
         int policy = query.indexOf("policy");
-        
+
         if ((services != null) && !services.isEmpty()) {
             Object serviceObj = services.get(serviceName);
             if (serviceObj != null) {
@@ -176,7 +177,8 @@
                     OutputStream out = res.getOutputStream();
                     res.setContentType("text/xml");
                     String ip = extractHostAndPort(filePart, isHttp);
-                    ((AxisService) serviceObj).printWSDL2(out, ip, configContext.getServiceContextPath());
+                    ((AxisService) serviceObj)
+                            .printWSDL2(out, ip, configContext.getServiceContextPath());
                     out.flush();
                     out.close();
                     return;
@@ -209,8 +211,9 @@
                             out.flush();
                             out.close();
                         } else {
-                            InputStream in = axisService.getClassLoader().getResourceAsStream(DeploymentConstants.META_INF + "/" + xsds);
-                            if(in != null) {
+                            InputStream in = axisService.getClassLoader()
+                                    .getResourceAsStream(DeploymentConstants.META_INF + "/" + xsds);
+                            if (in != null) {
                                 out.write(IOUtils.getStreamAsByteArray(in));
                                 out.flush();
                                 out.close();
@@ -236,9 +239,9 @@
                     }
                     return;
                 } else if (policy >= 0) {
-                    
+
                     OutputStream out = res.getOutputStream();
-                    
+
                     ExternalPolicySerializer serializer = new ExternalPolicySerializer();
                     serializer.setAssertionsToFilter(configContext
                             .getAxisConfiguration().getLocalPolicyAssertions());
@@ -282,7 +285,7 @@
                         }
 
                     } else {
-                        
+
                         PolicyInclude policyInclude = ((AxisService) serviceObj).getPolicyInclude();
                         Policy effecPolicy = policyInclude.getEffectivePolicy();
 
@@ -313,13 +316,13 @@
                             String outStr = "<b>No effective policy for "
                                     + serviceName + " servcie</b>";
                             out.write(outStr.getBytes());
-                        }                        
+                        }
                     }
-                  
+
                     return;
                 } else {
                     req.getSession().setAttribute(Constants.SINGLE_SERVICE,
-                            serviceObj);
+                                                  serviceObj);
                 }
             } else {
                 req.getSession().setAttribute(Constants.SINGLE_SERVICE, null);
@@ -335,17 +338,17 @@
 
         populateSessionInformation(req);
         req.getSession().setAttribute(Constants.ERROR_SERVICE_MAP,
-                configContext.getAxisConfiguration().getFaultyServices());
+                                      configContext.getAxisConfiguration().getFaultyServices());
 
         renderView(LIST_MULTIPLE_SERVICE_JSP_NAME, req, res);
     }
-    
+
     private Policy findPolicy(String id, AxisDescription des) {
 
         List policyElements = des.getPolicyInclude().getPolicyElements();
         PolicyRegistry registry = des.getPolicyInclude().getPolicyRegistry();
 
-        Object policyComponent ;
+        Object policyComponent;
 
         Policy policy = registry.lookup(id);
 
@@ -405,13 +408,17 @@
         public void stop() throws AxisFault {
         }
 
-        public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault {
-            return new EndpointReference[]{new EndpointReference(schema + "://" + ip + ":" + port + "/" + axisConf.getServiceContextPath() + "/" + serviceName)};  //To change body of implemented methods use File | Settings | File Templates.
+        public EndpointReference[] getEPRsForService(String serviceName, String ip)
+                throws AxisFault {
+            return new EndpointReference[]{new EndpointReference(schema + "://" + ip + ":" + port +
+                    "/" + axisConf.getServiceContextPath() + "/" +
+                    serviceName)};  //To change body of implemented methods use File | Settings | File Templates.
         }
 
         public EndpointReference getEPRForService(String serviceName, String ip) throws AxisFault {
             return getEPRsForService(serviceName, ip)[0];
         }
+
         public SessionContext getSessionContext(MessageContext messageContext) {
             HttpServletRequest req = (HttpServletRequest) messageContext.getProperty(
                     HTTPConstants.MC_HTTP_SERVLETREQUEST);
@@ -423,12 +430,12 @@
                 sessionContext = new SessionContext(null);
                 sessionContext.setCookieID(sessionId);
                 req.getSession().setAttribute(Constants.SESSION_CONTEXT_PROPERTY,
-                        sessionContext);
+                                              sessionContext);
             }
             messageContext.setSessionContext(sessionContext);
             messageContext.setProperty(AxisServlet.SESSION_ID, sessionId);
             return sessionContext;
-    }
+        }
 
 
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java Sun Mar  4 10:16:54 2007
@@ -16,21 +16,21 @@
 
 package org.apache.axis2.transport.http;
 
-import org.apache.axis2.transport.MessageFormatter;
-import org.apache.axis2.transport.http.util.URLTemplatingUtil;
-import org.apache.axis2.transport.http.util.ComplexPart;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.AxisFault;
-import org.apache.axiom.om.OMOutputFormat;
+import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMOutputFormat;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.transport.MessageFormatter;
+import org.apache.axis2.transport.http.util.ComplexPart;
+import org.apache.axis2.transport.http.util.URLTemplatingUtil;
 import org.apache.commons.httpclient.methods.multipart.Part;
 import org.apache.commons.httpclient.methods.multipart.StringPart;
 
-import java.io.OutputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -38,44 +38,42 @@
 /**
  * Formates the request message as multipart/form-data. An example of this serialization is shown
  * below which was extracted from the Web Services Description Language (WSDL) Version 2.0 Part 2: Adjuncts
- *
+ * <p/>
  * The following instance data of an input message:
-
-<data>
-  <town>
-    <name>Fréjus</name>
-    <country>France</country>
-  </town>
-  <date>@@@@-@@-@@</date>
-</data>
-
-with the following operation element
-
-<operation ref='t:data'
-    whttp:location='temperature'
-    whttp:method='POST'
-    whttp:inputSerialization='multipart/form-data'/>
-
-will serialize the message as follow:
-
-Content-Type: multipart/form-data; boundary=AaB03x
-Content-Length: xxx
-
---AaB03x
-Content-Disposition: form-data; name="town"
-Content-Type: application/xml
-
-<town>
-  <name>Fréjus</name>
-  <country>France</country>
-</town>
---AaB03x
-Content-Disposition: form-data; name="date"
-Content-Type: text/plain; charset=utf-8
-
-@@@@-@@-@@
---AaB03x--
-
+ * <p/>
+ * <data>
+ * <town>
+ * <name>Fréjus</name>
+ * <country>France</country>
+ * </town>
+ * <date>@@@@-@@-@@</date>
+ * </data>
+ * <p/>
+ * with the following operation element
+ * <p/>
+ * <operation ref='t:data'
+ * whttp:location='temperature'
+ * whttp:method='POST'
+ * whttp:inputSerialization='multipart/form-data'/>
+ * <p/>
+ * will serialize the message as follow:
+ * <p/>
+ * Content-Type: multipart/form-data; boundary=AaB03x
+ * Content-Length: xxx
+ * <p/>
+ * --AaB03x
+ * Content-Disposition: form-data; name="town"
+ * Content-Type: application/xml
+ * <p/>
+ * <town>
+ * <name>Fréjus</name>
+ * <country>France</country>
+ * </town>
+ * --AaB03x
+ * Content-Disposition: form-data; name="date"
+ * Content-Type: text/plain; charset=utf-8
+ *
+ * @@@@-@@-@@ --AaB03x--
  */
 public class MultipartFormDataFormatter implements MessageFormatter {
 
@@ -144,8 +142,8 @@
         String contentType = HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA;
         String encoding = format.getCharSetEncoding();
         if (encoding != null) {
-			contentType += "; charset=" + encoding;
-		}
+            contentType += "; charset=" + encoding;
+        }
         contentType = contentType + "; " + "boundary=" + format.getMimeBoundary();
         return contentType;
     }
@@ -173,7 +171,6 @@
     }
 
     /**
-     *
      * @param dataOut
      * @return
      */
@@ -187,8 +184,10 @@
                 Iterator iter2 = ele.getChildElements();
                 // check whether the element is a complex type
                 if (iter2.hasNext()) {
-                    OMElement omElement = omFactory.createOMElement(ele.getQName().getLocalPart(), null);
-                    omElement.addChild(processComplexType(omElement, ele.getChildElements(), omFactory));
+                    OMElement omElement =
+                            omFactory.createOMElement(ele.getQName().getLocalPart(), null);
+                    omElement.addChild(
+                            processComplexType(omElement, ele.getChildElements(), omFactory));
                     parts.add(new ComplexPart(ele.getQName().getLocalPart(), omElement.toString()));
                 } else {
                     parts.add(new StringPart(ele.getQName().getLocalPart(), ele.getText()));
@@ -200,7 +199,6 @@
     }
 
     /**
-     *
      * @param parent
      * @param iter
      * @param omFactory

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity.java Sun Mar  4 10:16:54 2007
@@ -122,7 +122,7 @@
         // action header is not mandated in SOAP 1.2. So putting it, if available
         if (!msgCtxt.isSOAP11() && (soapActionString != null)
                 && !"".equals(soapActionString.trim()) && !"\"\"".equals(soapActionString.trim())) {
-            contentType =contentType + ";action=\"" + soapActionString + "\";";
+            contentType = contentType + ";action=\"" + soapActionString + "\";";
         }
         return contentType;
     }



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