You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by da...@apache.org on 2007/03/16 02:48:23 UTC

svn commit: r518833 - in /incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring: HelloWorld.java HelloWorldImpl.java client/Client.java servlet/Server.java

Author: dandiep
Date: Thu Mar 15 18:48:22 2007
New Revision: 518833

URL: http://svn.apache.org/viewvc?view=rev&rev=518833
Log:
Try again to get checkstyle set up correctly.

Modified:
    incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/HelloWorld.java
    incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/HelloWorldImpl.java
    incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/client/Client.java
    incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/servlet/Server.java

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/HelloWorld.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/HelloWorld.java?view=diff&rev=518833&r1=518832&r2=518833
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/HelloWorld.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/HelloWorld.java Thu Mar 15 18:48:22 2007
@@ -1,18 +1,20 @@
 /**
- * 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
- * 
+ * 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.
+ *
+ * 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.
  */
 // START SNIPPET: service
 package demo.spring;
@@ -21,6 +23,6 @@
 
 @WebService
 public interface HelloWorld {
-	String sayHi(String text);
+    String sayHi(String text);
 }
 // END SNIPPET: service

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/HelloWorldImpl.java?view=diff&rev=518833&r1=518832&r2=518833
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/HelloWorldImpl.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/HelloWorldImpl.java Thu Mar 15 18:48:22 2007
@@ -1,18 +1,20 @@
 /**
- * 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
- * 
+ * 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.
+ *
+ * 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.
  */
 // START SNIPPET: service
 package demo.spring;
@@ -22,8 +24,8 @@
 @WebService(endpointInterface = "demo.spring.HelloWorld")
 public class HelloWorldImpl implements HelloWorld {
 
-	public String sayHi(String text) {
-		return "Hello " + text;
-	}
+    public String sayHi(String text) {
+        return "Hello " + text;
+    }
 }
 // END SNIPPET: service

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/client/Client.java?view=diff&rev=518833&r1=518832&r2=518833
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/client/Client.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/client/Client.java Thu Mar 15 18:48:22 2007
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package demo.spring.client;
 
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -25,19 +24,19 @@
 
 public final class Client {
 
-	private Client() {
-	}
+    private Client() {
+    }
 
-	public static void main(String args[]) throws Exception {
-		// START SNIPPET: client
-		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
-				new String[] { "demo/spring/client/client-beans.xml" });
-
-		HelloWorld client = (HelloWorld) context.getBean("client");
-
-		String response = client.sayHi("Joe");
-		System.out.println("Response: " + response);
-		System.exit(0);
-		// END SNIPPET: client
-	}
+    public static void main(String args[]) throws Exception {
+        // START SNIPPET: client
+        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+                                                                                    new String[] {"demo/spring/client/client-beans.xml"});
+
+        HelloWorld client = (HelloWorld)context.getBean("client");
+
+        String response = client.sayHi("Joe");
+        System.out.println("Response: " + response);
+        System.exit(0);
+        // END SNIPPET: client
+    }
 }

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/servlet/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/servlet/Server.java?view=diff&rev=518833&r1=518832&r2=518833
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/servlet/Server.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/src/main/java/demo/spring/servlet/Server.java Thu Mar 15 18:48:22 2007
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package demo.spring.servlet;
 
 import org.mortbay.jetty.Connector;
@@ -28,39 +27,38 @@
 
 public class Server {
 
-	protected Server() throws Exception {
-		System.out.println("Starting Server");
+    protected Server() throws Exception {
+        System.out.println("Starting Server");
 
-		/**
-		 * Important: This code simply starts up a servlet container and adds
-		 * the web application in src/webapp to it. Normally you would be using
-		 * Jetty or Tomcat and have the webapp packaged as a WAR. This is simply
-		 * as a convenience so you do not need to configure your servlet
-		 * container to see CXF in action!
-		 */
-		org.mortbay.jetty.Server server = new org.mortbay.jetty.Server();
-
-		SelectChannelConnector connector = new SelectChannelConnector();
-		connector.setPort(9002);
-		server.setConnectors(new Connector[] { connector });
-
-		WebAppContext webappcontext = new WebAppContext();
-		webappcontext.setContextPath("/");
-
-		webappcontext.setWar("src/webapp");
-
-		HandlerCollection handlers = new HandlerCollection();
-		handlers.setHandlers(new Handler[] { webappcontext,
-				new DefaultHandler() });
-
-		server.setHandler(handlers);
-		server.start();
-		server.join();
-	}
-
-	public static void main(String args[]) throws Exception {
-		new Server();
-		System.out.println("Server ready...");
-	}
+        /**
+         * Important: This code simply starts up a servlet container and adds
+         * the web application in src/webapp to it. Normally you would be using
+         * Jetty or Tomcat and have the webapp packaged as a WAR. This is simply
+         * as a convenience so you do not need to configure your servlet
+         * container to see CXF in action!
+         */
+        org.mortbay.jetty.Server server = new org.mortbay.jetty.Server();
+
+        SelectChannelConnector connector = new SelectChannelConnector();
+        connector.setPort(9002);
+        server.setConnectors(new Connector[] {connector});
+
+        WebAppContext webappcontext = new WebAppContext();
+        webappcontext.setContextPath("/");
+
+        webappcontext.setWar("src/webapp");
+
+        HandlerCollection handlers = new HandlerCollection();
+        handlers.setHandlers(new Handler[] {webappcontext, new DefaultHandler()});
+
+        server.setHandler(handlers);
+        server.start();
+        server.join();
+    }
+
+    public static void main(String args[]) throws Exception {
+        new Server();
+        System.out.println("Server ready...");
+    }
 
 }