servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tt...@apache.org
Subject svn commit: r533074 [1/4] - in /incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src: main/java/org/apache/servicemix/http/ main/java/org/apache/servicemix/http/endpoints/ main/java/org/apache/servicemix/http/jetty/ main/java/or...
Date Fri, 27 Apr 2007 12:23:23 GMT
Author: tterm
Date: Fri Apr 27 05:23:20 2007
New Revision: 533074

URL: http://svn.apache.org/viewvc?view=rev&rev=533074
Log:
SM-932 Enable PMD/CheckStyle for binding components

Added:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/AbstractProcessor.java
Removed:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/Constants.java
Modified:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/BasicAuthCredentials.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ContextManager.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpBootstrap.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpBridgeServlet.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpManagedServlet.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpProcessor.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpWsdl1Deployer.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ManagedContextManager.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ProxyParameters.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/SslParameters.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpSoapConsumerEndpoint.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpSoapConsumerMarshaler.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/SerializedMarshaler.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/jetty/JCLLogger.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/jetty/JaasJettyPrincipal.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/jetty/JaasUserRealm.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/jetty/JettyContextManager.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/jetty/ServiceMixSslSocketConnector.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzer.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/CommonsHttpSSLSocketFactory.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/tools/PortTypeDecorator.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/ConsumerEndpointTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpAddressingTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpConsumerTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpManagedTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpProviderTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpSoapTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpSpringTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpTxTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpURITest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpWsdlTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/HttpXBeanDeployerTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/ServerManagerTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/WsdlRoundtripTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/endpoints/Person.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/endpoints/PersonImpl.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/endpoints/SerializedMarshalerTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/security/HttpSecurityTest.java

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/BasicAuthCredentials.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/BasicAuthCredentials.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/BasicAuthCredentials.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/BasicAuthCredentials.java Fri Apr 27 05:23:20 2007
@@ -16,75 +16,72 @@
  */
 package org.apache.servicemix.http;
 
-import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.Credentials;
+import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.UsernamePasswordCredentials;
 import org.apache.commons.httpclient.auth.AuthScope;
 
 /**
- * 
  * @author roehl.sioson
  * @org.apache.xbean.XBean element="basicAuthCredentials"
- *                  description="This class contains parameters needed to send basic authentication credentials"
- *
+ * description="This class contains parameters needed to send basic authentication credentials"
  */
 public class BasicAuthCredentials {
 
-	protected String username;
-	protected String password;
-	
-	public BasicAuthCredentials()
-	{
-	}
+    protected String username;
+    protected String password;
+
+    public BasicAuthCredentials() {
+    }
 
     /**
      * @return Returns the username.
      */
-	public String getUsername() {
-		return username;
-	}
+    public String getUsername() {
+        return username;
+    }
 
     /**
      * @param ssl The username to set.
      */
-	public void setUsername(String username) {
-		this.username = username;
-	}
-	
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
     /**
      * @return Returns the password.
      */
-	public String getPassword() {
-		return password;
-	}
+    public String getPassword() {
+        return password;
+    }
 
     /**
      * @param ssl The password to set.
      */
-	public void setPassword(String password) {
-		this.password = password;
-	}
+    public void setPassword(String password) {
+        this.password = password;
+    }
 
     /**
      * Applies this authentication to the given method.
+     *
      * @param method The method to receive authentication headers.
      */
-    public void applyCredentials( HttpClient client )
-    {
-        AuthScope scope = new AuthScope( AuthScope.ANY_HOST, AuthScope.ANY_PORT );
-        Credentials credentials = new UsernamePasswordCredentials( this.username, this.password );
-        client.getState().setCredentials( scope, credentials );
+    public void applyCredentials(HttpClient client) {
+        AuthScope scope = new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT);
+        Credentials credentials = new UsernamePasswordCredentials(this.username, this.password);
+        client.getState().setCredentials(scope, credentials);
     }
 
     /**
      * Applies this authentication to the given method.
+     *
      * @param method The method to receive authentication headers.
      */
-    public void applyProxyCredentials( HttpClient client )
-    {
-        AuthScope scope = new AuthScope( AuthScope.ANY_HOST, AuthScope.ANY_PORT );
-        Credentials credentials = new UsernamePasswordCredentials( this.username, this.password );
-        client.getState().setProxyCredentials( scope, credentials );
+    public void applyProxyCredentials(HttpClient client) {
+        AuthScope scope = new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT);
+        Credentials credentials = new UsernamePasswordCredentials(this.username, this.password);
+        client.getState().setProxyCredentials(scope, credentials);
     }
 
 }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ContextManager.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ContextManager.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ContextManager.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ContextManager.java Fri Apr 27 05:23:20 2007
@@ -16,24 +16,22 @@
  */
 package org.apache.servicemix.http;
 
-
 public interface ContextManager {
 
-    public void init() throws Exception;
+    void init() throws Exception;
+
+    void shutDown() throws Exception;
+
+    void start() throws Exception;
+
+    void stop() throws Exception;
+
+    Object createContext(String strUrl, HttpProcessor processor) throws Exception;
 
-    public void shutDown() throws Exception;
+    void remove(Object context) throws Exception;
 
-    public void start() throws Exception;
+    void setConfiguration(HttpConfiguration configuration);
 
-    public void stop() throws Exception;
-    
-    public Object createContext(String strUrl, 
-                                HttpProcessor processor) throws Exception;
-    
-    public void remove(Object context) throws Exception;
-
-    public void setConfiguration(HttpConfiguration configuration);
-    
-    public HttpProcessor getMainProcessor();
+    HttpProcessor getMainProcessor();
 
 }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpBootstrap.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpBootstrap.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpBootstrap.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpBootstrap.java Fri Apr 27 05:23:20 2007
@@ -34,15 +34,17 @@
     protected InstallationContext context;
     protected ObjectName mbeanName;
     protected HttpConfiguration configuration;
-    
+
     public HttpBootstrap() {
     }
-    
+
     public ObjectName getExtensionMBeanName() {
         return mbeanName;
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see javax.jbi.component.Bootstrap#init(javax.jbi.component.InstallationContext)
      */
     public void init(InstallationContext installContext) throws JBIException {
@@ -71,8 +73,10 @@
         }
         server.registerMBean(configuration, this.mbeanName);
     }
-    
-    /* (non-Javadoc)
+
+    /*
+     * (non-Javadoc)
+     * 
      * @see javax.jbi.component.Bootstrap#cleanUp()
      */
     public void cleanUp() throws JBIException {
@@ -97,13 +101,17 @@
         }
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see javax.jbi.component.Bootstrap#onInstall()
      */
     public void onInstall() throws JBIException {
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see javax.jbi.component.Bootstrap#onUninstall()
      */
     public void onUninstall() throws JBIException {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpBridgeServlet.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpBridgeServlet.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpBridgeServlet.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpBridgeServlet.java Fri Apr 27 05:23:20 2007
@@ -30,7 +30,7 @@
      * Generated serial version UID
      */
     private static final long serialVersionUID = -7995806514300732777L;
-    
+
     private HttpProcessor processor;
 
     public HttpProcessor getProcessor() {
@@ -51,7 +51,6 @@
         }
     }
 
-    
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
         try {
             getProcessor().process(request, response);
@@ -66,7 +65,8 @@
         }
     }
 
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
+                    IOException {
         try {
             getProcessor().process(request, response);
         } catch (IOException e) {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpComponent.java Fri Apr 27 05:23:20 2007
@@ -45,28 +45,27 @@
 /**
  * 
  * @author gnodet
- * @org.apache.xbean.XBean element="component"
- *                  description="An http component"
+ * @org.apache.xbean.XBean element="component" description="An http component"
  */
 public class HttpComponent extends DefaultComponent {
 
-    public final static String[] EPR_PROTOCOLS = { "http:", "https" };
-    
+    public static final String[] EPR_PROTOCOLS = {"http:", "https"};
+
     static {
         JCLLogger.init();
     }
-    
+
     protected ContextManager server;
     protected HttpClient client;
     protected MultiThreadedHttpConnectionManager connectionManager;
     protected HttpConfiguration configuration = new HttpConfiguration();
     protected HttpEndpointType[] endpoints;
-    
+
     protected String protocol;
     protected String host;
     protected int port = 80;
     protected String path;
-    
+
     /**
      * @return the host
      */
@@ -75,7 +74,8 @@
     }
 
     /**
-     * @param host the host to set
+     * @param host
+     *            the host to set
      */
     public void setHost(String host) {
         this.host = host;
@@ -89,7 +89,8 @@
     }
 
     /**
-     * @param path the path to set
+     * @param path
+     *            the path to set
      */
     public void setPath(String path) {
         this.path = path;
@@ -103,7 +104,8 @@
     }
 
     /**
-     * @param port the port to set
+     * @param port
+     *            the port to set
      */
     public void setPort(int port) {
         this.port = port;
@@ -117,7 +119,8 @@
     }
 
     /**
-     * @param protocol the protocol to set
+     * @param protocol
+     *            the protocol to set
      */
     public void setProtocol(String protocol) {
         this.protocol = protocol;
@@ -131,7 +134,8 @@
     }
 
     /**
-     * @param endpoints the endpoints to set
+     * @param endpoints
+     *            the endpoints to set
      */
     public void setEndpoints(HttpEndpointType[] endpoints) {
         this.endpoints = endpoints;
@@ -148,7 +152,7 @@
     public HttpClient getClient() {
         return client;
     }
-    
+
     public void setClient(HttpClient client) {
         this.client = client;
     }
@@ -160,12 +164,14 @@
     public HttpConfiguration getConfiguration() {
         return configuration;
     }
-    
+
     public void setConfiguration(HttpConfiguration configuration) {
         this.configuration = configuration;
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see org.servicemix.common.BaseComponentLifeCycle#getExtensionMBean()
      */
     protected Object getExtensionMBean() throws Exception {
@@ -182,8 +188,8 @@
         if (configuration.getKeystoreManager() == null) {
             try {
                 String name = configuration.getKeystoreManagerName();
-                Object km =  context.getNamingContext().lookup(name);
-                configuration.setKeystoreManager((KeystoreManager) km); 
+                Object km = context.getNamingContext().lookup(name);
+                configuration.setKeystoreManager((KeystoreManager) km);
             } catch (Throwable e) {
                 // ignore
             }
@@ -191,8 +197,8 @@
         if (configuration.getAuthenticationService() == null) {
             try {
                 String name = configuration.getAuthenticationServiceName();
-                Object as =  context.getNamingContext().lookup(name);
-                configuration.setAuthenticationService((AuthenticationService) as); 
+                Object as = context.getNamingContext().lookup(name);
+                configuration.setAuthenticationService((AuthenticationService) as);
             } catch (Throwable e) {
                 configuration.setAuthenticationService(new JAASAuthenticationService());
             }
@@ -210,9 +216,9 @@
         if (configuration.isManaged()) {
             server = new ManagedContextManager();
         } else {
-            JettyContextManager server = new JettyContextManager();
-            server.setMBeanServer(context.getMBeanServer());
-            this.server = server;
+            JettyContextManager jcm = new JettyContextManager();
+            jcm.setMBeanServer(context.getMBeanServer());
+            this.server = jcm;
         }
         server.setConfiguration(configuration);
         server.init();
@@ -256,7 +262,7 @@
         httpEp.setRole(MessageExchange.Role.PROVIDER);
         URI uri = new URI(ep.getEndpointName());
         Map map = URISupport.parseQuery(uri.getQuery());
-        if( IntrospectionSupport.setProperties(httpEp, map, "http.") ) {
+        if (IntrospectionSupport.setProperties(httpEp, map, "http.")) {
             uri = URISupport.createRemainingURI(uri, map);
         }
         if (httpEp.getLocationURI() == null) {
@@ -274,7 +280,8 @@
     }
 
     /**
-     * @param keystoreManager the keystoreManager to set
+     * @param keystoreManager
+     *            the keystoreManager to set
      */
     public void setKeystoreManager(KeystoreManager keystoreManager) {
         this.configuration.setKeystoreManager(keystoreManager);
@@ -288,28 +295,32 @@
     }
 
     /**
-     * @param authenticationService the authenticationService to set
+     * @param authenticationService
+     *            the authenticationService to set
      */
     public void setAuthenticationService(AuthenticationService authenticationService) {
         this.configuration.setAuthenticationService(authenticationService);
     }
 
     /**
-     * When servicemix-http is embedded inside a web application and configured
-     * to reuse the existing servlet container, this method will create and
-     * return the HTTPProcessor which will handle all servlet calls
-     * @param mappings 
+     * When servicemix-http is embedded inside a web application and configured to reuse the existing servlet container,
+     * this method will create and return the HTTPProcessor which will handle all servlet calls
+     * 
+     * @param mappings
      */
     public HttpProcessor getMainProcessor() {
         return server.getMainProcessor();
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see org.servicemix.common.BaseComponent#createServiceUnitManager()
      */
     public BaseServiceUnitManager createServiceUnitManager() {
-        Deployer[] deployers = new Deployer[] { new BaseXBeanDeployer(this, getEndpointClasses()), 
-                                                new HttpWsdl1Deployer(this) };
+        Deployer[] deployers = 
+            new Deployer[] {new BaseXBeanDeployer(this, getEndpointClasses()),
+                            new HttpWsdl1Deployer(this)};
         return new BaseServiceUnitManager(this, deployers);
     }
 
@@ -318,7 +329,7 @@
     }
 
     protected Class[] getEndpointClasses() {
-        return new Class[] { HttpEndpoint.class, HttpConsumerEndpoint.class, HttpProviderEndpoint.class };
+        return new Class[] {HttpEndpoint.class, HttpConsumerEndpoint.class, HttpProviderEndpoint.class};
     }
 
 }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java Fri Apr 27 05:23:20 2007
@@ -20,8 +20,8 @@
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.util.Properties;
 import java.io.InputStream;
+import java.util.Properties;
 
 import org.apache.servicemix.jbi.security.auth.AuthenticationService;
 import org.apache.servicemix.jbi.security.keystore.KeystoreManager;
@@ -36,12 +36,12 @@
 
     public static final String DEFAULT_JETTY_CONNECTOR_CLASS_NAME = SelectChannelConnector.class.getName();
     public static final String MAPPING_DEFAULT = "/jbi";
-    public final static String CONFIG_FILE = "component.properties"; 
+    public static final String CONFIG_FILE = "component.properties"; 
     
     private String rootDir;
     private String componentName = "servicemix-http";
     private Properties properties = new Properties();
-    private boolean streamingEnabled = false;
+    private boolean streamingEnabled;
     private String jettyConnectorClassName = DEFAULT_JETTY_CONNECTOR_CLASS_NAME;
     private transient KeystoreManager keystoreManager;
     private transient AuthenticationService authenticationService;
@@ -81,7 +81,7 @@
      * If the component is deployed in a web container and uses
      * a servlet instead of starting its own web server.
      */
-    private boolean managed = false;
+    private boolean managed;
     
     /**
      * When managed is true, this is the servlet mapping used
@@ -361,7 +361,7 @@
         this.proxyPort = proxyPort;
         save();
     }
-    
+
     public void save() {
         setProperty(componentName + ".jettyThreadPoolSize", Integer.toString(jettyThreadPoolSize));
         setProperty(componentName + ".jettyConnectorClassName", jettyConnectorClassName);

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java Fri Apr 27 05:23:20 2007
@@ -18,56 +18,56 @@
 
 public interface HttpConfigurationMBean {
 
-    public boolean isStreamingEnabled();
+    boolean isStreamingEnabled();
 
-    public void setStreamingEnabled(boolean streamingEnabled);
+    void setStreamingEnabled(boolean streamingEnabled);
 
-    public String getJettyConnectorClassName();
+    String getJettyConnectorClassName();
 
-    public void setJettyConnectorClassName(String jettyConnectorClassName);
+    void setJettyConnectorClassName(String jettyConnectorClassName);
 
-    public int getJettyThreadPoolSize();
+    int getJettyThreadPoolSize();
 
-    public void setJettyThreadPoolSize(int jettyThreadPoolSize);
-    
-    public int getMaxConnectionsPerHost();
-    
-    public void setMaxConnectionsPerHost(int maxConnectionsPerHost);
-    
-    public int getMaxTotalConnections();
-    
-    public void setMaxTotalConnections(int maxTotalConnections);
-    
-    public String getKeystoreManagerName();
-    
-    public void setKeystoreManagerName(String name);
-    
-    public String getAuthenticationServiceName();
-    
-    public void setAuthenticationServiceName(String name);
-    
-    public boolean isJettyManagement();
-    
-    public void setJettyManagement(boolean jettyManagement);
+    void setJettyThreadPoolSize(int jettyThreadPoolSize);
 
-    public int getConnectorMaxIdleTime();
+    int getMaxConnectionsPerHost();
 
-    public void setConnectorMaxIdleTime(int connectorMaxIdleTime);
+    void setMaxConnectionsPerHost(int maxConnectionsPerHost);
 
-    public int getConsumerProcessorSuspendTime();
+    int getMaxTotalConnections();
 
-    public void setConsumerProcessorSuspendTime(int consumerProcessorSuspendTime);
+    void setMaxTotalConnections(int maxTotalConnections);
 
-    public int getRetryCount();
+    String getKeystoreManagerName();
 
-    public void setRetryCount(int retryCount);
+    void setKeystoreManagerName(String name);
 
-    public String getProxyHost();
+    String getAuthenticationServiceName();
 
-    public void setProxyHost(String name);
+    void setAuthenticationServiceName(String name);
 
-    public int getProxyPort();
+    boolean isJettyManagement();
 
-    public void setProxyPort(int name);
+    void setJettyManagement(boolean jettyManagement);
+
+    int getConnectorMaxIdleTime();
+
+    void setConnectorMaxIdleTime(int connectorMaxIdleTime);
+
+    int getConsumerProcessorSuspendTime();
+
+    void setConsumerProcessorSuspendTime(int consumerProcessorSuspendTime);
+
+    int getRetryCount();
+
+    void setRetryCount(int retryCount);
+
+    String getProxyHost();
+
+    void setProxyHost(String name);
+
+    int getProxyPort();
+
+    void setProxyPort(int name);
 
 }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java Fri Apr 27 05:23:20 2007
@@ -30,6 +30,7 @@
 import javax.wsdl.extensions.http.HTTPAddress;
 import javax.xml.namespace.QName;
 
+import com.ibm.wsdl.extensions.http.HTTPAddressImpl;
 import org.apache.servicemix.common.ExchangeProcessor;
 import org.apache.servicemix.common.ExternalEndpoint;
 import org.apache.servicemix.common.ManagementSupport;
@@ -40,8 +41,6 @@
 import org.apache.servicemix.jbi.security.keystore.KeystoreManager;
 import org.apache.servicemix.soap.SoapEndpoint;
 
-import com.ibm.wsdl.extensions.http.HTTPAddressImpl;
-
 /**
  * 
  * @author gnodet
@@ -68,7 +67,8 @@
     }
 
     /**
-     * @param soapAction the soapAction to set
+     * @param soapAction
+     *            the soapAction to set
      */
     public void setSoapAction(String soapAction) {
         this.soapAction = soapAction;
@@ -82,7 +82,8 @@
     }
 
     /**
-     * @param authMethod the authMethod to set
+     * @param authMethod
+     *            the authMethod to set
      */
     public void setAuthMethod(String authMethod) {
         this.authMethod = authMethod;
@@ -96,7 +97,8 @@
     }
 
     /**
-     * @param ssl The ssl to set.
+     * @param ssl
+     *            The ssl to set.
      */
     public void setSsl(SslParameters ssl) {
         this.ssl = ssl;
@@ -119,8 +121,7 @@
     }
 
     /**
-     * Authentication parameters used for provider endpoints using BASIC 
-     * authentication.
+     * Authentication parameters used for provider endpoints using BASIC authentication.
      * 
      * @return Returns the basicAuthentication.
      */
@@ -129,12 +130,13 @@
     }
 
     /**
-     * @param basicAuthentication The basicAuthentication to set.
+     * @param basicAuthentication
+     *            The basicAuthentication to set.
      */
     public void setBasicAuthentication(BasicAuthCredentials basicAuthCredentials) {
         this.basicAuthentication = basicAuthCredentials;
     }
-    
+
     /**
      * @return Returns the proxy.
      */
@@ -143,12 +145,13 @@
     }
 
     /**
-     * @param proxy The proxy to set.
+     * @param proxy
+     *            The proxy to set.
      */
     public void setProxy(ProxyParameters proxy) {
         this.proxy = proxy;
     }
-	
+
     /**
      * @org.apache.xbean.Property alias="role"
      * @param role
@@ -252,23 +255,18 @@
             }
             if (portType.getQName().getNamespaceURI().equals(service.getNamespaceURI())) {
                 if (isSoap()) {
-                    PortTypeDecorator.decorate(
-                            def, 
-                            portType, 
-                            location, 
-                            endpoint + "Binding",
-                            service.getLocalPart(),
-                            endpoint);       
+                    PortTypeDecorator.decorate(def, portType, location, endpoint + "Binding", service.getLocalPart(),
+                                    endpoint);
                     definition = def;
                 } else {
-                    Binding binding = def.createBinding();
-                    binding.setPortType(portType);
-                    binding.setQName(new QName(service.getNamespaceURI(), endpoint + "Binding"));
-                    binding.setUndefined(false);
-                    def.addBinding(binding);
+                    Binding bnd = def.createBinding();
+                    bnd.setPortType(portType);
+                    bnd.setQName(new QName(service.getNamespaceURI(), endpoint + "Binding"));
+                    bnd.setUndefined(false);
+                    def.addBinding(bnd);
                     Port port = def.createPort();
                     port.setName(endpoint);
-                    port.setBinding(binding);
+                    port.setBinding(bnd);
                     HTTPAddress address = new HTTPAddressImpl();
                     address.setLocationURI(location);
                     port.addExtensibilityElement(address);
@@ -281,13 +279,8 @@
                 }
             } else {
                 definition = PortTypeDecorator.createImportDef(def, service.getNamespaceURI(), "porttypedef.wsdl");
-                PortTypeDecorator.decorate(
-                        definition, 
-                        portType, 
-                        location, 
-                        endpoint + "Binding",
-                        service.getLocalPart(),
-                        endpoint);       
+                PortTypeDecorator.decorate(definition, portType, location, endpoint + "Binding",
+                                service.getLocalPart(), endpoint);
             }
         }
     }
@@ -301,11 +294,8 @@
     }
 
     protected ServiceEndpoint createExternalEndpoint() {
-        return new ExternalEndpoint(getServiceUnit().getComponent().getEPRElementName(),
-                                    getLocationURI(),
-                                    getService(),
-                                    getEndpoint(),
-                                    getInterfaceName());
+        return new ExternalEndpoint(getServiceUnit().getComponent().getEPRElementName(), getLocationURI(),
+                        getService(), getEndpoint(), getInterfaceName());
     }
 
     public AuthenticationService getAuthenticationService() {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpManagedServlet.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpManagedServlet.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpManagedServlet.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpManagedServlet.java Fri Apr 27 05:23:20 2007
@@ -29,30 +29,31 @@
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
 /**
- * This servlet is meant to be used when embedding ServiceMix in a web application
- * so that so servicemix-http component will reuse the web container.
- *  
+ * This servlet is meant to be used when embedding ServiceMix in a web application so that so servicemix-http component
+ * will reuse the web container.
+ * 
  * @author gnodet
  */
 public class HttpManagedServlet extends javax.servlet.http.HttpServlet {
 
     public static final String CONTAINER_PROPERTY = "container";
     public static final String CONTAINER_DEFAULT = "jbi";
-    
+
     public static final String COMPONENT_PROPERTY = "component";
     public static final String COMPONENT_DEFAULT = "servicemix-http";
-    
+
     public static final String MAPPING_PROPERTY = "mapping";
-    
+
     private HttpProcessor processor;
-    
+
     public void init(ServletConfig config) throws ServletException {
         super.init(config);
-        
+
         // Retrieve spring application context
-        ApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
-        
-        // Retrieve 
+        ApplicationContext applicationContext = WebApplicationContextUtils
+                        .getRequiredWebApplicationContext(getServletContext());
+
+        // Retrieve
         String containerName = config.getInitParameter(CONTAINER_PROPERTY);
         if (containerName == null) {
             containerName = CONTAINER_DEFAULT;
@@ -65,7 +66,7 @@
         if (componentName == null) {
             componentName = COMPONENT_DEFAULT;
         }
-        ComponentMBeanImpl componentMBean  = container.getComponent(componentName);
+        ComponentMBeanImpl componentMBean = container.getComponent(componentName);
         if (componentMBean == null) {
             throw new IllegalStateException("Unable to find component " + componentName);
         }
@@ -74,10 +75,11 @@
         if (mapping != null) {
             component.getConfiguration().setMapping(mapping);
         }
-        processor = component.getMainProcessor(); 
+        processor = component.getMainProcessor();
     }
-    
-    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+
+    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException,
+                    IOException {
         try {
             processor.process(request, response);
         } catch (IOException e) {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpProcessor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpProcessor.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpProcessor.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpProcessor.java Fri Apr 27 05:23:20 2007
@@ -22,8 +22,8 @@
 public interface HttpProcessor {
 
     SslParameters getSsl();
-    
+
     String getAuthMethod();
-    
+
     void process(HttpServletRequest request, HttpServletResponse response) throws Exception;
 }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpWsdl1Deployer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpWsdl1Deployer.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpWsdl1Deployer.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpWsdl1Deployer.java Fri Apr 27 05:23:20 2007
@@ -29,7 +29,7 @@
 
 /**
  * @author gnodet
- *
+ * 
  */
 public class HttpWsdl1Deployer extends AbstractWsdl1Deployer {
 
@@ -37,12 +37,14 @@
         super(component);
     }
 
-    /* (non-Javadoc)
-     * @see org.servicemix.common.wsdl1.AbstractWsdl1Deployer#createEndpoint(javax.wsdl.extensions.ExtensibilityElement, javax.wsdl.extensions.ExtensibilityElement)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.servicemix.common.wsdl1.AbstractWsdl1Deployer#createEndpoint(javax.wsdl.extensions.ExtensibilityElement,
+     *      javax.wsdl.extensions.ExtensibilityElement)
      */
-    protected Endpoint createEndpoint(ExtensibilityElement portElement, 
-                                      ExtensibilityElement bindingElement,
-                                      JbiEndpoint jbiEndpoint) {
+    protected Endpoint createEndpoint(ExtensibilityElement portElement, ExtensibilityElement bindingElement,
+                    JbiEndpoint jbiEndpoint) {
         if (jbiEndpoint == null) {
             return null;
         }
@@ -70,7 +72,9 @@
         }
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see org.servicemix.common.wsdl1.AbstractWsdl1Deployer#filterPortElement(javax.wsdl.extensions.ExtensibilityElement)
      */
     protected boolean filterPortElement(ExtensibilityElement element) {
@@ -86,7 +90,9 @@
         return false;
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see org.servicemix.common.wsdl1.AbstractWsdl1Deployer#filterBindingElement(javax.wsdl.extensions.ExtensibilityElement)
      */
     protected boolean filterBindingElement(ExtensibilityElement element) {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ManagedContextManager.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ManagedContextManager.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ManagedContextManager.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ManagedContextManager.java Fri Apr 27 05:23:20 2007
@@ -26,21 +26,17 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
+
 import org.mortbay.jetty.MimeTypes;
 import org.mortbay.util.ByteArrayISO8859Writer;
 import org.mortbay.util.StringUtil;
 
-import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
-
 public class ManagedContextManager implements ContextManager {
 
-    private static final Log logger = LogFactory.getLog(ManagedContextManager.class);
-    
     private HttpConfiguration configuration;
     private Map managedContexts;
-    
+
     public void init() throws Exception {
         if (configuration == null) {
             configuration = new HttpConfiguration();
@@ -57,21 +53,20 @@
 
     public void stop() throws Exception {
     }
-    
-    public synchronized Object createContext(String strUrl, 
-                                             HttpProcessor processor) throws Exception {
+
+    public synchronized Object createContext(String strUrl, HttpProcessor processor) throws Exception {
         URI uri = new URI(strUrl);
         String path = uri.getPath();
         if (!path.startsWith("/")) {
             path = path + "/";
         }
         if (!path.endsWith("/")) {
-            path = path + "/"; 
+            path = path + "/";
         }
         managedContexts.put(path, processor);
         return path;
     }
-    
+
     public synchronized void remove(Object context) throws Exception {
         managedContexts.remove(context);
     }
@@ -90,18 +85,22 @@
         }
         return new MainProcessor();
     }
-    
+
     protected class MainProcessor implements HttpProcessor {
         private String mapping;
+
         public MainProcessor() {
             this.mapping = configuration.getMapping();
         }
+
         public String getAuthMethod() {
             return null;
         }
+
         public SslParameters getSsl() {
             return null;
         }
+
         public void process(HttpServletRequest request, HttpServletResponse response) throws Exception {
             String uri = request.getRequestURI();
             if ("/".equals(uri) && "GET".equals(request.getMethod())) {
@@ -119,16 +118,17 @@
             }
             displayServices(request, response);
         }
+
         public void displayServices(HttpServletRequest request, HttpServletResponse response) throws IOException {
             response.setStatus(404);
             response.setContentType(MimeTypes.TEXT_HTML);
-            
+
             ByteArrayISO8859Writer writer = new ByteArrayISO8859Writer(1500);
 
             String uri = request.getRequestURI();
             uri = StringUtil.replace(uri, "<", "&lt;");
             uri = StringUtil.replace(uri, ">", "&gt;");
-            
+
             writer.write("<HTML>\n<HEAD>\n<TITLE>Error 404 - Not Found");
             writer.write("</TITLE>\n<BODY>\n<H2>Error 404 - Not Found.</H2>\n");
             writer.write("No service matched or handled this request.<BR>");
@@ -141,18 +141,19 @@
                     context += "/";
                 }
                 String protocol = request.isSecure() ? "https" : "http";
-                context = protocol + "://" + request.getLocalName() + ":" + request.getLocalPort() + request.getContextPath() + mapping + context; 
+                context = protocol + "://" + request.getLocalName() + ":" + request.getLocalPort()
+                                + request.getContextPath() + mapping + context;
                 writer.write("<li><a href=\"");
                 writer.write(context);
                 writer.write("?wsdl\">");
                 writer.write(context);
                 writer.write("</a></li>\n");
             }
-            
-            for (int i=0; i < 10; i++) {
+
+            for (int i = 0; i < 10; i++) {
                 writer.write("\n<!-- Padding for IE                  -->");
             }
-            
+
             writer.write("\n</BODY>\n</HTML>\n");
             writer.flush();
             response.setContentLength(writer.size());

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ProxyParameters.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ProxyParameters.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ProxyParameters.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/ProxyParameters.java Fri Apr 27 05:23:20 2007
@@ -16,19 +16,18 @@
  */
 package org.apache.servicemix.http;
 
-
 /**
  * This class contains all parameters needed to send http requests through a proxy
- *  
+ * 
  * @author Fabrice Dewasmes
- * @org.apache.xbean.XBean 
+ * @org.apache.xbean.XBean
  */
 public class ProxyParameters {
 
     protected String proxyHost;
     protected int proxyPort;
     protected BasicAuthCredentials proxyCredentials;
-    
+
     /**
      * @return Returns the proxyCredentials.
      */
@@ -37,7 +36,8 @@
     }
 
     /**
-     * @param proxyCredentials The proxyCredentials to set.
+     * @param proxyCredentials
+     *            The proxyCredentials to set.
      */
     public void setProxyCredentials(BasicAuthCredentials proxyCredentials) {
         this.proxyCredentials = proxyCredentials;
@@ -53,7 +53,8 @@
     }
 
     /**
-     * @param proxyHost The proxy host name to set.
+     * @param proxyHost
+     *            The proxy host name to set.
      */
     public void setProxyHost(String proxyHost) {
         this.proxyHost = proxyHost;
@@ -69,7 +70,8 @@
     }
 
     /**
-     * @param proxyPort The ProxyPort to set.
+     * @param proxyPort
+     *            The ProxyPort to set.
      */
     public void setProxyPort(int proxyPort) {
         this.proxyPort = proxyPort;

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/SslParameters.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/SslParameters.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/SslParameters.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/SslParameters.java Fri Apr 27 05:23:20 2007
@@ -17,11 +17,10 @@
 package org.apache.servicemix.http;
 
 /**
- * This class contains all parameters needed to create an SSL server or client
- * socket.
- *  
+ * This class contains all parameters needed to create an SSL server or client socket.
+ * 
  * @author gnodet
- * @org.apache.xbean.XBean 
+ * @org.apache.xbean.XBean
  */
 public class SslParameters {
 
@@ -37,240 +36,276 @@
     private String protocol = "TLS";
     private String keyManagerFactoryAlgorithm = "SunX509"; // cert algorithm
     private String trustManagerFactoryAlgorithm = "SunX509"; // cert algorithm
-    private String provider = null;
-    private boolean wantClientAuth = false;
-    private boolean needClientAuth = false;
-    
+    private String provider;
+    private boolean wantClientAuth;
+    private boolean needClientAuth;
+
     /**
      * @return the provider
      */
     public String getProvider() {
         return provider;
     }
+
     /**
-     * @param provider the provider to set
+     * @param provider
+     *            the provider to set
      */
     public void setProvider(String provider) {
         this.provider = provider;
     }
+
     /**
      * @return the managed
      */
     public boolean isManaged() {
         return managed;
     }
+
     /**
-     * @param managed the managed to set
+     * @param managed
+     *            the managed to set
      */
     public void setManaged(boolean managed) {
         this.managed = managed;
     }
+
     /**
      * @return the keyAlias
      */
     public String getKeyAlias() {
         return keyAlias;
     }
+
     /**
-     * @param keyAlias the keyAlias to set
+     * @param keyAlias
+     *            the keyAlias to set
      */
     public void setKeyAlias(String keyAlias) {
         this.keyAlias = keyAlias;
     }
+
     /**
      * @return Returns the algorithm.
      */
     public String getKeyManagerFactoryAlgorithm() {
         return keyManagerFactoryAlgorithm;
     }
+
     /**
-     * @param algorithm The algorithm to set.
+     * @param algorithm
+     *            The algorithm to set.
      */
     public void setKeyManagerFactoryAlgorithm(String algorithm) {
         this.keyManagerFactoryAlgorithm = algorithm;
     }
+
     /**
      * @return Returns the algorithm.
      */
     public String getTrustManagerFactoryAlgorithm() {
         return trustManagerFactoryAlgorithm;
     }
+
     /**
-     * @param algorithm The algorithm to set.
+     * @param algorithm
+     *            The algorithm to set.
      */
     public void setTrustManagerFactoryAlgorithm(String algorithm) {
         this.trustManagerFactoryAlgorithm = algorithm;
     }
+
     /**
      * @return Returns the keyPassword.
      */
     public String getKeyPassword() {
         return keyPassword;
     }
+
     /**
-     * @param keyPassword The keyPassword to set.
+     * @param keyPassword
+     *            The keyPassword to set.
      */
     public void setKeyPassword(String keyPassword) {
         this.keyPassword = keyPassword;
     }
+
     /**
      * @return Returns the keyStore.
      */
     public String getKeyStore() {
         return keyStore;
     }
+
     /**
-     * @param keyStore The keyStore to set.
+     * @param keyStore
+     *            The keyStore to set.
      */
     public void setKeyStore(String keyStore) {
         this.keyStore = keyStore;
     }
+
     /**
      * @return Returns the keyStorePassword.
      */
     public String getKeyStorePassword() {
         return keyStorePassword;
     }
+
     /**
-     * @param keyStorePassword The keyStorePassword to set.
+     * @param keyStorePassword
+     *            The keyStorePassword to set.
      */
     public void setKeyStorePassword(String keyStorePassword) {
         this.keyStorePassword = keyStorePassword;
     }
+
     /**
      * @return Returns the keyStoreType.
      */
     public String getKeyStoreType() {
         return keyStoreType;
     }
+
     /**
-     * @param keyStoreType The keyStoreType to set.
+     * @param keyStoreType
+     *            The keyStoreType to set.
      */
     public void setKeyStoreType(String keyStoreType) {
         this.keyStoreType = keyStoreType;
     }
+
     /**
      * @return Returns the needClientAuth.
      */
     public boolean isNeedClientAuth() {
         return needClientAuth;
     }
+
     /**
-     * @param needClientAuth The needClientAuth to set.
+     * @param needClientAuth
+     *            The needClientAuth to set.
      */
     public void setNeedClientAuth(boolean needClientAuth) {
         this.needClientAuth = needClientAuth;
     }
+
     /**
      * @return Returns the protocol.
      */
     public String getProtocol() {
         return protocol;
     }
+
     /**
-     * @param protocol The protocol to set.
+     * @param protocol
+     *            The protocol to set.
      */
     public void setProtocol(String protocol) {
         this.protocol = protocol;
     }
+
     /**
      * @return Returns the wantClientAuth.
      */
     public boolean isWantClientAuth() {
         return wantClientAuth;
     }
+
     /**
-     * @param wantClientAuth The wantClientAuth to set.
+     * @param wantClientAuth
+     *            The wantClientAuth to set.
      */
     public void setWantClientAuth(boolean wantClientAuth) {
         this.wantClientAuth = wantClientAuth;
     }
+
     /**
      * @return Returns the trustStore.
      */
     public String getTrustStore() {
         return trustStore;
     }
+
     /**
-     * @param trustStore The trustStore to set.
+     * @param trustStore
+     *            The trustStore to set.
      */
     public void setTrustStore(String trustStore) {
         this.trustStore = trustStore;
     }
+
     /**
      * @return Returns the trustStorePassword.
      */
     public String getTrustStorePassword() {
         return trustStorePassword;
     }
+
     /**
-     * @param trustStorePassword The trustStorePassword to set.
+     * @param trustStorePassword
+     *            The trustStorePassword to set.
      */
     public void setTrustStorePassword(String trustStorePassword) {
         this.trustStorePassword = trustStorePassword;
     }
+
     /**
      * @return Returns the trustStoreType.
      */
     public String getTrustStoreType() {
         return trustStoreType;
     }
+
     /**
-     * @param trustStoreType The trustStoreType to set.
+     * @param trustStoreType
+     *            The trustStoreType to set.
      */
     public void setTrustStoreType(String trustStoreType) {
         this.trustStoreType = trustStoreType;
     }
-    
+
     public boolean equals(Object o) {
         if (o == this) {
             return true;
         }
-        if (o instanceof SslParameters == false) {
+        if (!(o instanceof SslParameters)) {
             return false;
         }
         SslParameters s = (SslParameters) o;
-        return managed == s.managed &&
-               eq(keyAlias, s.keyAlias) &&
-               eq(keyManagerFactoryAlgorithm, s.keyManagerFactoryAlgorithm) &&
-               eq(trustManagerFactoryAlgorithm, s.trustManagerFactoryAlgorithm) &&
-               eq(keyPassword, s.keyPassword) &&
-               eq(keyStore, s.keyStore) &&
-               eq(keyStorePassword, s.keyStorePassword) &&
-               eq(keyStoreType, s.keyStoreType) &&
-               needClientAuth == s.needClientAuth &&
-               eq(protocol, s.protocol) &&
-               eq(trustStore, s.trustStore) &&
-               eq(trustStorePassword, s.trustStorePassword) &&
-               eq(trustStoreType, s.trustStoreType) &&
-               wantClientAuth == s.wantClientAuth;
-               
+        return managed == s.managed && eq(keyAlias, s.keyAlias)
+                        && eq(keyManagerFactoryAlgorithm, s.keyManagerFactoryAlgorithm)
+                        && eq(trustManagerFactoryAlgorithm, s.trustManagerFactoryAlgorithm)
+                        && eq(keyPassword, s.keyPassword) && eq(keyStore, s.keyStore)
+                        && eq(keyStorePassword, s.keyStorePassword) && eq(keyStoreType, s.keyStoreType)
+                        && needClientAuth == s.needClientAuth && eq(protocol, s.protocol)
+                        && eq(trustStore, s.trustStore) && eq(trustStorePassword, s.trustStorePassword)
+                        && eq(trustStoreType, s.trustStoreType) && wantClientAuth == s.wantClientAuth;
+
     }
-    
+
     public int hashCode() {
-        return Boolean.valueOf(managed).hashCode() ^
-               hash(keyAlias) ^
-               hash(keyManagerFactoryAlgorithm) ^
-               hash(trustManagerFactoryAlgorithm) ^
-               hash(keyPassword) ^
-               hash(keyStore) ^
-               hash(keyStorePassword) ^
-               hash(keyStoreType) ^
-               Boolean.valueOf(needClientAuth).hashCode() ^
-               hash(protocol) ^
-               hash(trustStore) ^
-               hash(trustStorePassword) ^
-               hash(trustStoreType) ^
-               Boolean.valueOf(wantClientAuth).hashCode();
+        return Boolean.valueOf(managed).hashCode() 
+                    ^ Boolean.valueOf(needClientAuth).hashCode() 
+                    ^ Boolean.valueOf(wantClientAuth).hashCode()
+                    ^ hash(new String[] {keyAlias, keyManagerFactoryAlgorithm, trustManagerFactoryAlgorithm, keyPassword, keyStore,
+                        keyStorePassword, keyStoreType, protocol, trustStore, trustStorePassword, trustStoreType});
     }
-    
+
     private static boolean eq(String s1, String s2) {
         return (s1 == null) ? s2 == null : s1.equals(s2);
     }
+
+    private static int hash(String... strings) {
+        int result = 0;
+        for (String s : strings) {
+            result ^= hash(s);
+        }
+        return result;
+    }
     
     private static int hash(String s) {
         return s != null ? s.hashCode() : 0;
     }
-
 
 }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler.java Fri Apr 27 05:23:20 2007
@@ -41,18 +41,18 @@
  * @since 3.2
  */
 public class DefaultHttpConsumerMarshaler implements HttpConsumerMarshaler {
-    
+
     private StAXSourceTransformer transformer = new StAXSourceTransformer();
     private URI defaultMep;
 
     public DefaultHttpConsumerMarshaler() {
         this(MessageExchangeSupport.IN_OUT);
     }
-    
+
     public DefaultHttpConsumerMarshaler(URI defaultMep) {
         this.defaultMep = defaultMep;
     }
-    
+
     public URI getDefaultMep() {
         return defaultMep;
     }
@@ -70,7 +70,8 @@
         return me;
     }
 
-    public void sendOut(MessageExchange exchange, NormalizedMessage outMsg, HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public void sendOut(MessageExchange exchange, NormalizedMessage outMsg, HttpServletRequest request,
+        HttpServletResponse response) throws Exception {
         XMLStreamReader reader = transformer.toXMLStreamReader(outMsg.getContent());
         XMLStreamWriter writer = transformer.getOutputFactory().createXMLStreamWriter(response.getWriter());
         writer.writeStartDocument();
@@ -79,15 +80,17 @@
         writer.flush();
         response.setStatus(HttpServletResponse.SC_OK);
     }
-    
-    public void sendFault(MessageExchange exchange, Fault fault, HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+    public void sendFault(MessageExchange exchange, Fault fault, HttpServletRequest request,
+        HttpServletResponse response) throws Exception {
         response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
         XMLStreamReader reader = transformer.toXMLStreamReader(fault.getContent());
         XMLStreamWriter writer = transformer.getOutputFactory().createXMLStreamWriter(response.getWriter());
         XMLStreamHelper.copy(reader, writer);
     }
 
-    public void sendError(MessageExchange exchange, Exception error, HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public void sendError(MessageExchange exchange, Exception error, HttpServletRequest request,
+        HttpServletResponse response) throws Exception {
         response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
         XMLStreamWriter writer = transformer.getOutputFactory().createXMLStreamWriter(response.getWriter());
         writer.writeStartDocument();
@@ -100,8 +103,9 @@
         writer.writeEndElement();
         writer.writeEndDocument();
     }
-    
-    public void sendAccepted(MessageExchange exchange, HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+    public void sendAccepted(MessageExchange exchange, HttpServletRequest request, HttpServletResponse response)
+        throws Exception {
         response.setStatus(HttpServletResponse.SC_ACCEPTED);
     }
 

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/DefaultHttpProviderMarshaler.java Fri Apr 27 05:23:20 2007
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.servicemix.http.endpoints;
 
 import java.io.IOException;
@@ -15,8 +31,8 @@
 
     private String locationUri;
     private Expression locationUriExpression;
-    private int retryCount = 0;
-    
+    private int retryCount;
+
     public int getRetryCount() {
         return retryCount;
     }
@@ -52,13 +68,13 @@
         }
         return uri;
     }
-    
+
     public HttpMethod createMethod(MessageExchange exchange, NormalizedMessage inMsg) throws Exception {
         PostMethod method = new PostMethod();
         setRetryHandler(method);
         return method;
     }
-    
+
     protected void setRetryHandler(HttpMethod method) {
         HttpMethodRetryHandler retryHandler = new HttpMethodRetryHandler() {
             public boolean retryMethod(HttpMethod method, IOException exception, int executionCount) {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java Fri Apr 27 05:23:20 2007
@@ -17,17 +17,17 @@
 package org.apache.servicemix.http.endpoints;
 
 import java.io.IOException;
+import java.net.URI;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
-import java.net.URI;
 
+import javax.jbi.management.DeploymentException;
 import javax.jbi.messaging.ExchangeStatus;
 import javax.jbi.messaging.Fault;
 import javax.jbi.messaging.MessageExchange;
 import javax.jbi.messaging.NormalizedMessage;
 import javax.jbi.servicedesc.ServiceEndpoint;
-import javax.jbi.management.DeploymentException;
 import javax.security.auth.Subject;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -37,6 +37,8 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
+import org.w3c.dom.Node;
+
 import org.apache.servicemix.common.DefaultComponent;
 import org.apache.servicemix.common.ServiceUnit;
 import org.apache.servicemix.common.endpoints.ConsumerEndpoint;
@@ -51,13 +53,10 @@
 import org.mortbay.jetty.RetryRequest;
 import org.mortbay.util.ajax.Continuation;
 import org.mortbay.util.ajax.ContinuationSupport;
-import org.w3c.dom.Node;
 
 /**
- * Plain HTTP consumer endpoint.
- * This endpoint can be used to handle plain HTTP request (without SOAP) or
- * to be able to process the request in a non standard way.  For HTTP requests,
- * a WSDL2 HTTP binding can be used.
+ * Plain HTTP consumer endpoint. This endpoint can be used to handle plain HTTP request (without SOAP) or to be able to
+ * process the request in a non standard way. For HTTP requests, a WSDL2 HTTP binding can be used.
  * 
  * @author gnodet
  * @since 3.2
@@ -66,19 +65,19 @@
 public class HttpConsumerEndpoint extends ConsumerEndpoint implements HttpProcessor, HttpEndpointType {
 
     public static final String MAIN_WSDL = "main.wsdl";
-    
+
     private String authMethod;
     private SslParameters ssl;
     private String locationURI;
     private HttpConsumerMarshaler marshaler = new DefaultHttpConsumerMarshaler();
-    private long timeout = 0; // 0 => default to the timeout configured on component
+    private long timeout; // 0 => default to the timeout configured on component
     private URI defaultMep = MessageExchangeSupport.IN_OUT;
 
     private Map<String, Object> resources = new HashMap<String, Object>();
     private Map<String, Continuation> locks = new ConcurrentHashMap<String, Continuation>();
     private Map<String, MessageExchange> exchanges = new ConcurrentHashMap<String, MessageExchange>();
     private Object httpContext;
-    
+
     public HttpConsumerEndpoint() {
         super();
     }
@@ -99,7 +98,8 @@
     }
 
     /**
-     * @param locationURI the locationUri to set
+     * @param locationURI
+     *            the locationUri to set
      */
     public void setLocationURI(String locationURI) {
         this.locationURI = locationURI;
@@ -113,7 +113,8 @@
     }
 
     /**
-     * @param timeout the timeout to set
+     * @param timeout
+     *            the timeout to set
      */
     public void setTimeout(long timeout) {
         this.timeout = timeout;
@@ -127,7 +128,8 @@
     }
 
     /**
-     * @param marshaler the marshaler to set
+     * @param marshaler
+     *            the marshaler to set
      */
     public void setMarshaler(HttpConsumerMarshaler marshaler) {
         this.marshaler = marshaler;
@@ -141,7 +143,8 @@
     }
 
     /**
-     * @param authMethod the authMethod to set
+     * @param authMethod
+     *            the authMethod to set
      */
     public void setAuthMethod(String authMethod) {
         this.authMethod = authMethod;
@@ -155,7 +158,8 @@
     }
 
     /**
-     * @param ssl the sslParameters to set
+     * @param ssl
+     *            the sslParameters to set
      */
     public void setSsl(SslParameters ssl) {
         this.ssl = ssl;
@@ -169,7 +173,8 @@
     }
 
     /**
-     * @param defaultMep - defaultMep of the endpoint
+     * @param defaultMep -
+     *            defaultMep of the endpoint
      */
     public void setDefaultMep(URI defaultMep) {
         this.defaultMep = defaultMep;
@@ -224,11 +229,12 @@
                         if (logger.isDebugEnabled()) {
                             logger.debug("Suspending continuation for exchange: " + exchange.getExchangeId());
                         }
-                        long timeout = this.timeout;
-                        if (timeout == 0) {
-                            timeout = ((HttpComponent) getServiceUnit().getComponent()).getConfiguration().getConsumerProcessorSuspendTime();
+                        long to = this.timeout;
+                        if (to == 0) {
+                            to = ((HttpComponent) getServiceUnit().getComponent()).getConfiguration()
+                                            .getConsumerProcessorSuspendTime();
                         }
-                        boolean result = cont.suspend(timeout);
+                        boolean result = cont.suspend(to);
                         if (!result) {
                             locks.remove(exchange.getExchangeId());
                             throw new Exception("Exchange timed out");
@@ -242,7 +248,7 @@
                 locks.remove(id);
                 exchange = exchanges.remove(id);
                 request.removeAttribute(MessageExchange.class.getName());
-                boolean result = cont.suspend(0); 
+                boolean result = cont.suspend(0);
                 // Check if this is a timeout
                 if (exchange == null) {
                     throw new IllegalStateException("Exchange not found");
@@ -289,17 +295,20 @@
     protected void loadStaticResources() {
         // TODO: load wsdl
     }
-    
+
     /**
      * Handle static resources
      * 
-     * @param request the http request
-     * @param response the http response
+     * @param request
+     *            the http request
+     * @param response
+     *            the http response
      * @return <code>true</code> if the request has been handled
      * @throws IOException
      * @throws ServletException
      */
-    protected boolean handleStaticResource(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
+    protected boolean handleStaticResource(HttpServletRequest request, HttpServletResponse response)
+        throws IOException, ServletException {
         if (!"GET".equals(request.getMethod())) {
             return false;
         }
@@ -325,7 +334,8 @@
             response.setStatus(200);
             response.setContentType("text/xml");
             try {
-                new SourceTransformer().toResult(new DOMSource((Node) res), new StreamResult(response.getOutputStream()));
+                new SourceTransformer().toResult(new DOMSource((Node) res),
+                                new StreamResult(response.getOutputStream()));
             } catch (TransformerException e) {
                 throw new ServletException("Error while sending xml resource", e);
             }
@@ -341,13 +351,13 @@
     protected Object getResource(String path) {
         return resources.get(path);
     }
-    
+
     protected void addResource(String path, Object resource) {
         resources.put(path, resource);
     }
 
     protected ContextManager getServerManager() {
-        HttpComponent comp =  (HttpComponent) getServiceUnit().getComponent();
+        HttpComponent comp = (HttpComponent) getServiceUnit().getComponent();
         return comp.getServer();
     }
 
@@ -363,26 +373,30 @@
         return me;
     }
 
-    public void sendAccepted(MessageExchange exchange, HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public void sendAccepted(MessageExchange exchange, HttpServletRequest request, HttpServletResponse response)
+        throws Exception {
         marshaler.sendAccepted(exchange, request, response);
     }
 
-    public void sendError(MessageExchange exchange, Exception error, HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public void sendError(MessageExchange exchange, Exception error, HttpServletRequest request,
+        HttpServletResponse response) throws Exception {
         marshaler.sendError(exchange, error, request, response);
     }
 
-    public void sendFault(MessageExchange exchange, Fault fault, HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public void sendFault(MessageExchange exchange, Fault fault, HttpServletRequest request,
+        HttpServletResponse response) throws Exception {
         marshaler.sendFault(exchange, fault, request, response);
     }
 
-    public void sendOut(MessageExchange exchange, NormalizedMessage outMsg, HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public void sendOut(MessageExchange exchange, NormalizedMessage outMsg, HttpServletRequest request,
+        HttpServletResponse response) throws Exception {
         marshaler.sendOut(exchange, outMsg, request, response);
     }
 
     public void validate() throws DeploymentException {
         super.validate();
         if (marshaler instanceof DefaultHttpConsumerMarshaler) {
-            ((DefaultHttpConsumerMarshaler)marshaler).setDefaultMep(getDefaultMep());
+            ((DefaultHttpConsumerMarshaler) marshaler).setDefaultMep(getDefaultMep());
         }
     }
 }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerMarshaler.java Fri Apr 27 05:23:20 2007
@@ -30,26 +30,18 @@
  */
 public interface HttpConsumerMarshaler {
 
-    MessageExchange createExchange(HttpServletRequest request, 
-                                   ComponentContext context) throws Exception;
+    MessageExchange createExchange(HttpServletRequest request, ComponentContext context) throws Exception;
 
-    void sendOut(MessageExchange exchange, 
-                 NormalizedMessage outMsg, 
-                 HttpServletRequest request, 
-                 HttpServletResponse response) throws Exception;
+    void sendOut(MessageExchange exchange, NormalizedMessage outMsg, HttpServletRequest request,
+        HttpServletResponse response) throws Exception;
 
-    void sendFault(MessageExchange exchange, 
-                   Fault fault, 
-                   HttpServletRequest request, 
-                   HttpServletResponse response) throws Exception;
+    void sendFault(MessageExchange exchange, Fault fault, HttpServletRequest request, HttpServletResponse response)
+        throws Exception;
 
-    void sendError(MessageExchange exchange, 
-                   Exception error, 
-                   HttpServletRequest request, 
-                   HttpServletResponse response) throws Exception;
+    void sendError(MessageExchange exchange, Exception error, HttpServletRequest request, HttpServletResponse response)
+        throws Exception;
 
-    void sendAccepted(MessageExchange exchange, 
-                      HttpServletRequest request, 
-                      HttpServletResponse response) throws Exception;
+    void sendAccepted(MessageExchange exchange, HttpServletRequest request, HttpServletResponse response)
+        throws Exception;
 
 }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderEndpoint.java Fri Apr 27 05:23:20 2007
@@ -16,46 +16,24 @@
  */
 package org.apache.servicemix.http.endpoints;
 
-import java.util.Iterator;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import javax.jbi.messaging.ExchangeStatus;
-import javax.jbi.messaging.Fault;
-import javax.jbi.messaging.InOnly;
-import javax.jbi.messaging.InOptionalOut;
-import javax.jbi.messaging.InOut;
 import javax.jbi.messaging.MessageExchange;
 import javax.jbi.messaging.NormalizedMessage;
 import javax.jbi.servicedesc.ServiceEndpoint;
 import javax.xml.namespace.QName;
 
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.HostConfiguration;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpHost;
 import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.httpclient.URI;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.commons.httpclient.methods.RequestEntity;
-import org.apache.commons.httpclient.protocol.Protocol;
-import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
-import org.apache.servicemix.JbiConstants;
 import org.apache.servicemix.common.DefaultComponent;
 import org.apache.servicemix.common.ExchangeProcessor;
 import org.apache.servicemix.common.ServiceUnit;
 import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 import org.apache.servicemix.http.BasicAuthCredentials;
-import org.apache.servicemix.http.HttpComponent;
 import org.apache.servicemix.http.HttpEndpointType;
 import org.apache.servicemix.http.SslParameters;
-import org.apache.servicemix.http.processors.CommonsHttpSSLSocketFactory;
-import org.apache.servicemix.http.processors.Constants;
-import org.apache.servicemix.soap.Context;
-import org.apache.servicemix.soap.marshalers.SoapMessage;
-import org.apache.servicemix.soap.marshalers.SoapReader;
-import org.apache.servicemix.soap.marshalers.SoapWriter;
 
 /**
  * 
@@ -98,24 +76,23 @@
     }
 
     public void process(MessageExchange exchange) throws Exception {
-        if (exchange.getStatus() == ExchangeStatus.DONE || 
-            exchange.getStatus() == ExchangeStatus.ERROR) {
-                HttpMethod method = methods.remove(exchange.getExchangeId());
-                if (method != null) {
-                    method.releaseConnection();
-                }
-                return;
-            }
-            boolean txSync = exchange.isTransacted() && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC));
-            NormalizedMessage nm = exchange.getMessage("in");
-            if (nm == null) {
-                throw new IllegalStateException("Exchange has no input message");
+        if (exchange.getStatus() == ExchangeStatus.DONE || exchange.getStatus() == ExchangeStatus.ERROR) {
+            HttpMethod method = methods.remove(exchange.getExchangeId());
+            if (method != null) {
+                method.releaseConnection();
             }
-            String locationUri = marshaler.getDestinationUri(exchange, nm);
-            HttpMethod method = marshaler.createMethod(exchange, nm);
-            method.setURI(new URI(getRelUri(locationUri), false));
-            boolean close = true;
-            try {
+            return;
+        }
+        //boolean txSync = exchange.isTransacted() && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC));
+        NormalizedMessage nm = exchange.getMessage("in");
+        if (nm == null) {
+            throw new IllegalStateException("Exchange has no input message");
+        }
+        String locationUri = marshaler.getDestinationUri(exchange, nm);
+        HttpMethod method = marshaler.createMethod(exchange, nm);
+        method.setURI(new URI(getRelUri(locationUri), false));
+        boolean close = true;
+        try {
                 /*
                 // Uncomment to avoid the http request being sent several times.
                 // Can be useful when debugging
@@ -132,7 +109,7 @@
                 if (response != HttpStatus.SC_OK && response != HttpStatus.SC_ACCEPTED) {
                     if (exchange instanceof InOnly == false) {
                         SoapReader reader = soapHelper.getSoapMarshaler().createReader();
-                        Header contentType = method.getResponseHeader(Constants.HEADER_CONTENT_TYPE);
+                        Header contentType = method.getResponseHeader(AbstractProcessor.HEADER_CONTENT_TYPE);
                         soapMessage = reader.read(method.getResponseBodyAsStream(), 
                                                   contentType != null ? contentType.getValue() : null);
                         context.setFaultMessage(soapMessage);
@@ -156,7 +133,7 @@
                 if (exchange instanceof InOut) {
                     NormalizedMessage msg = exchange.createMessage();
                     SoapReader reader = soapHelper.getSoapMarshaler().createReader();
-                    Header contentType = method.getResponseHeader(Constants.HEADER_CONTENT_TYPE);
+                    Header contentType = method.getResponseHeader(AbstractProcessor.HEADER_CONTENT_TYPE);
                     soapMessage = reader.read(method.getResponseBodyAsStream(), 
                                               contentType != null ? contentType.getValue() : null);
                     context.setOutMessage(soapMessage);
@@ -179,7 +156,7 @@
                         NormalizedMessage msg = exchange.createMessage();
                         SoapReader reader = soapHelper.getSoapMarshaler().createReader();
                         soapMessage = reader.read(method.getResponseBodyAsStream(), 
-                                                  method.getResponseHeader(Constants.HEADER_CONTENT_TYPE).getValue());
+                                                  method.getResponseHeader(AbstractProcessor.HEADER_CONTENT_TYPE).getValue());
                         context.setOutMessage(soapMessage);
                         soapHelper.onAnswer(context);
                         msg.setProperty(JbiConstants.PROTOCOL_HEADERS, getHeaders(method));
@@ -198,11 +175,11 @@
                     channel.send(exchange);
                 }
                 */
-            } finally {
-                if (close) {
-                    method.releaseConnection();
-                }
+        } finally {
+            if (close) {
+                method.releaseConnection();
             }
+        }
     }
 
     private String getRelUri(String locationUri) {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java?view=diff&rev=533074&r1=533073&r2=533074
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpProviderMarshaler.java Fri Apr 27 05:23:20 2007
@@ -23,10 +23,8 @@
 
 public interface HttpProviderMarshaler {
 
-    String getDestinationUri(MessageExchange exchange,
-                             NormalizedMessage inMsg) throws Exception;
-    
-    HttpMethod createMethod(MessageExchange exchange,
-                            NormalizedMessage inMsg) throws Exception;
+    String getDestinationUri(MessageExchange exchange, NormalizedMessage inMsg) throws Exception;
+
+    HttpMethod createMethod(MessageExchange exchange, NormalizedMessage inMsg) throws Exception;
 
 }



Mime
View raw message