Author: dkulp
Date: Mon Aug 20 18:05:21 2012
New Revision: 1375153

URL: http://svn.apache.org/viewvc?rev=1375153&view=rev
Log:
Fix checkstyle issues, remove a println

Modified:
    
cxf/trunk/distribution/src/main/release/samples/ws-discovery/client/src/main/java/org/apache/cxf/samples/discovery/Client.java
    
cxf/trunk/distribution/src/main/release/samples/ws-discovery/service/src/main/java/org/apache/cxf/samples/discovery/Main.java
    
cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java

Modified: 
cxf/trunk/distribution/src/main/release/samples/ws-discovery/client/src/main/java/org/apache/cxf/samples/discovery/Client.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws-discovery/client/src/main/java/org/apache/cxf/samples/discovery/Client.java?rev=1375153&r1=1375152&r2=1375153&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/ws-discovery/client/src/main/java/org/apache/cxf/samples/discovery/Client.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/ws-discovery/client/src/main/java/org/apache/cxf/samples/discovery/Client.java
 Mon Aug 20 18:05:21 2012
@@ -28,28 +28,21 @@ import org.apache.cxf.hello_world.discov
 import org.apache.cxf.hello_world.discovery.GreeterService;
 import org.apache.cxf.ws.discovery.WSDiscoveryClient;
 
-/**
- * 
- */
 public final class Client {
 
-    /**
-     * 
-     */
-    public Client() {
-        // TODO Auto-generated constructor stub
+    private Client() {
     }
 
-    /**
-     * @param args
-     */
     public static void main(String[] args) throws Exception {
-        
+
+        //USe ws-discovery to find references to services that implement the 
Greeter portType
         WSDiscoveryClient client = new WSDiscoveryClient();
-        List<EndpointReference> references = client.probe(new 
QName("http://cxf.apache.org/hello_world/discovery";, "Greeter", "tp"));
+        List<EndpointReference> references 
+            = client.probe(new 
QName("http://cxf.apache.org/hello_world/discovery";, "Greeter"));
         client.close();
         
         GreeterService service = new GreeterService();
+        //loop through all of them and have them greet me.
         for (EndpointReference ref : references) {
             Greeter g = service.getPort(ref, Greeter.class);
             System.out.println(g.greetMe("World"));

Modified: 
cxf/trunk/distribution/src/main/release/samples/ws-discovery/service/src/main/java/org/apache/cxf/samples/discovery/Main.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws-discovery/service/src/main/java/org/apache/cxf/samples/discovery/Main.java?rev=1375153&r1=1375152&r2=1375153&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/ws-discovery/service/src/main/java/org/apache/cxf/samples/discovery/Main.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/ws-discovery/service/src/main/java/org/apache/cxf/samples/discovery/Main.java
 Mon Aug 20 18:05:21 2012
@@ -25,17 +25,16 @@ import java.net.ServerSocket;
 
 import javax.xml.ws.Endpoint;
 
-/**
- * 
- */
-public class Main {
+public final class Main {
 
-    public Main() {
-        // TODO Auto-generated constructor stub
+    private Main() {
     }
 
     public static void main(String[] args) throws Exception {
-        //find a randomish port to use
+        //find a randomish port to use.   The clients will
+        //use WS-Discovery to find these services so 
+        //it really doesn't matter what port we publish them
+        //on (or what URL or anything like that)
         ServerSocket sock = new ServerSocket();
         InetSocketAddress s = new 
InetSocketAddress(InetAddress.getLocalHost(), 0);
         sock.bind(s);

Modified: 
cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java?rev=1375153&r1=1375152&r2=1375153&view=diff
==============================================================================
--- 
cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java
 (original)
+++ 
cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java
 Mon Aug 20 18:05:21 2012
@@ -42,7 +42,6 @@ public class WSDiscoveryServerListener i
 
     public void startServer(Server server) {
         QName sn = 
server.getEndpoint().getEndpointInfo().getInterface().getName();
-        System.out.println(sn);
         if 
("http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01".equals(sn.getNamespaceURI()))
 {
             return;
         }


Reply via email to