mushaofeng / java-ws-discovery

Automatically exported from code.google.com/p/java-ws-discovery
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Unicast socket does not receive messages #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using netcat to send a message to the local host in 3702 port, the receiver
unicast socket ignores the message

What steps will reproduce the problem?
1. Launch a discovery server
2. Place breakpoint in SOAPReceiverThread:118
3. Send a message to localhost:3702 --> nc -u localhost 3702
4. It does not stop in breakpoint. 

What is the expected output? What do you see instead?

The message is not even discarded (but it should, since local messages are
discarded) because unicast socket does not receive the message. 

What version of the product are you using? On what operating system?
Ubuntu 9.10
Eclipse 3.5
Java 1.6.0_15-b03

Please provide any additional information below.

Original issue reported on code.google.com by amup...@gmail.com on 25 Nov 2009 at 9:04

GoogleCodeExporter commented 9 years ago
The socket bound to port 3702 only listens for multicast messages sent to 
239.255.255.250. When the 
transport layer is initialized  it opens a second unicast port, which should be 
randomly assigned by the 
operating system. The unicast port is displayed by the logger if you set the 
loglevel to FINEST 
(WsDiscoveryConstants.loggerLevel), but it is unfortunately not possible to 
retrieve the unicast port 
automatically. This has been fixed in SVN, where WsDiscoveryServer has three 
new methods: getMulticastAddress(), getMulticastPort() and getUnicastPort(). 
The code in the repository should be fairly 
stable and has support for the new WS-Discovery 1.1 standard as well.

If you are having other network problems you should make sure that 
WsDiscoveryServer is binding to the 
right network interface. In "discovery_using_server.java" there is an example 
of how you can specify the 
multicast interface.

Original comment by mmag...@gmail.com on 25 Nov 2009 at 10:36

GoogleCodeExporter commented 9 years ago

Original comment by mmag...@gmail.com on 30 Nov 2009 at 11:53