I downloaded the apache-cxf-2.7.14-src and try to run ws_discovery example - one service and one client. 1. Output for the service: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\afrosa\Desktop\work\tmp\apache-cxf-2.7.14-src\distribution\src\main\rel ease\samples\ws_discovery>mvn -Pservice [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building WS-Discovery Sample 2.7.14 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- cxf-codegen-plugin:2.7.14:wsdl2java (generate-sources) @ cxf-samples- wsdiscovery --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cxf-sample s-wsdiscovery --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ cxf-samples-wsd iscovery --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cx f-samples-wsdiscovery --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users\afrosa\Desktop\work\tmp\apac he-cxf-2.7.14-src\distribution\src\main\release\samples\ws_discovery\src\test\re sources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ cxf-sam ples-wsdiscovery --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ cxf-samples-wsdisc overy --- [INFO] No tests to run. [INFO] [INFO] >>> exec-maven-plugin:1.2:java (default) > validate @ cxf-samples-wsdisco very >>> [INFO] [INFO] <<< exec-maven-plugin:1.2:java (default) < validate @ cxf-samples-wsdisco very <<< [INFO] [INFO] --- exec-maven-plugin:1.2:java (default) @ cxf-samples-wsdiscovery --- Publishing on http://localhost:58281/Greeter Jan 13, 2015 2:56:55 PM org.apache.cxf.service.factory.ReflectionServiceFactoryB ean buildServiceFromWSDL INFO: Creating Service {http://cxf.apache.org/hello_world/discovery}GreeterServi ce from WSDL: classpath:/org/apache/cxf/hello_world/discovery/hello_world.wsdl Jan 13, 2015 2:56:58 PM org.apache.cxf.endpoint.ServerImpl initDestination INFO: Setting the server's publish address to be http://localhost:58281/Greeter Jan 13, 2015 2:56:58 PM org.eclipse.jetty.server.Server doStart INFO: jetty-8.1.15.v20140411 Jan 13, 2015 2:56:58 PM org.eclipse.jetty.server.AbstractConnector doStart INFO: Started SelectChannelConnector@localhost:58281 Jan 13, 2015 2:56:59 PM org.apache.cxf.service.factory.ReflectionServiceFactoryB ean buildServiceFromWSDL INFO: Creating Service {http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Di scovery from WSDL: classpath:/org/apache/cxf/ws/discovery/wsdl/wsdd-discovery-1. 1-wsdl-os.wsdl Jan 13, 2015 2:56:59 PM org.apache.cxf.endpoint.ServerImpl initDestination INFO: Setting the server's publish address to be soap.udp://239.255.255.250:3702 Jan 13, 2015 2:57:00 PM org.apache.cxf.service.factory.ReflectionServiceFactoryB ean buildServiceFromClass INFO: Creating Service {http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Di scoveryProxy from class org.apache.cxf.jaxws.support.DummyImpl 2. Output for the client from the separate command wnd: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\afrosa\Desktop\work\tmp\apache-cxf-2.7.14-src\distribution\src\main\rel ease\samples\ws_discovery>mvn -Pclient [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building WS-Discovery Sample 2.7.14 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- cxf-codegen-plugin:2.7.14:wsdl2java (generate-sources) @ cxf-samples- wsdiscovery --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cxf-sample s-wsdiscovery --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ cxf-samples-wsd iscovery --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cx f-samples-wsdiscovery --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users\afrosa\Desktop\work\tmp\apac he-cxf-2.7.14-src\distribution\src\main\release\samples\ws_discovery\src\test\re sources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ cxf-sam ples-wsdiscovery --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ cxf-samples-wsdisc overy --- [INFO] No tests to run. [INFO] [INFO] >>> exec-maven-plugin:1.2:java (default) > validate @ cxf-samples-wsdisco very >>> [INFO] [INFO] <<< exec-maven-plugin:1.2:java (default) < validate @ cxf-samples-wsdisco very <<< [INFO] [INFO] --- exec-maven-plugin:1.2:java (default) @ cxf-samples-wsdiscovery --- Jan 13, 2015 2:58:01 PM org.apache.cxf.service.factory.ReflectionServiceFactoryB ean buildServiceFromClass INFO: Creating Service {http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Di scoveryProxy from class org.apache.cxf.jaxws.support.DummyImpl Jan 13, 2015 2:58:03 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogg ing WARNING: Interceptor for {http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01} DiscoveryProxy#{http://cxf.apache.org/jaxws/dispatch}Invoke has thrown exception , unwinding now org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndi ngInterceptor.handleMessage(MessageSenderInterceptor.java:64) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept orChain.java:272) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:572) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:452) at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:445) at org.apache.cxf.jaxws.DispatchImpl.invokeAsync(DispatchImpl.java:451) at org.apache.cxf.ws.discovery.WSDiscoveryClient.probe(WSDiscoveryClient .java:379) at org.apache.cxf.ws.discovery.WSDiscoveryClient.probe(WSDiscoveryClient .java:328) at org.apache.cxf.samples.discovery.Client.main(Client.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:291) at java.lang.Thread.run(Thread.java:722) Caused by: java.net.SocketTimeoutException: Receive timed out at java.net.TwoStacksPlainDatagramSocketImpl.receive0(Native Method) at java.net.TwoStacksPlainDatagramSocketImpl.receive(TwoStacksPlainDatag ramSocketImpl.java:90) at java.net.DatagramSocket.receive(DatagramSocket.java:786) at org.apache.cxf.transport.udp.UDPConduit$UDPBroadcastOutputStream.clos e(UDPConduit.java:308) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:5 6) at org.apache.cxf.transport.udp.UDPConduit.close(UDPConduit.java:137) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndi ngInterceptor.handleMessage(MessageSenderInterceptor.java:62) ... 15 more [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ cxf-samples-wsdiscovery --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ cxf-samples-wsdi scovery --- [INFO] Installing C:\Users\afrosa\Desktop\work\tmp\apache-cxf-2.7.14-src\distrib ution\src\main\release\samples\ws_discovery\target\cxf-samples-wsdiscovery-2.7.1 4.jar to C:\Users\afrosa\.m2\repository\org\apache\cxf\samples\wsdiscovery\cxf-s amples-wsdiscovery\2.7.14\cxf-samples-wsdiscovery-2.7.14.jar [INFO] Installing C:\Users\afrosa\Desktop\work\tmp\apache-cxf-2.7.14-src\distrib ution\src\main\release\samples\ws_discovery\pom.xml to C:\Users\afrosa\.m2\repos itory\org\apache\cxf\samples\wsdiscovery\cxf-samples-wsdiscovery\2.7.14\cxf-samp les-wsdiscovery-2.7.14.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.681 s [INFO] Finished at: 2015-01-13T14:58:04-05:00 [INFO] Final Memory: 23M/290M [INFO] ------------------------------------------------------------------------ 3. As you can see the client throws exception. 4. The command windows for both processes can not be closed or killed using the Windows Task Manager 5. I tried to use the java-ws-discovery <https://code.google.com/p/java-ws-discovery/> client to print all WS-Discovery services WsDiscoveryFinder finder = new WsDiscoveryFinder(); /** * Search for any service */ { System.out.println("Searching for all services (2 sec)."); IWsDiscoveryServiceCollection result = finder.findAll(2000); // Display the results. System.out.println("** Discovered services: **"); for (WsDiscoveryService service : result) { // Print service info System.out.println(service.toString()); System.out.println("---"); } } // Stop finder finder.done(); It found many services BUT NOT the service I created with mvn -Pservice command see part 1. Thanks in advance AlexA -- View this message in context: http://cxf.547215.n5.nabble.com/ws-discovery-example-does-not-work-tp5753038.html Sent from the cxf-user mailing list archive at Nabble.com.
