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

Scopes should be optional #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

If a Hello is sent without any Scopes, the service will NPE:

java.lang.NullPointerException
    at com.ms.wsdiscovery.standard11.WsDiscoveryS11Utilities.createWsDiscoveryScopesObject(WsDiscoveryS11Utilities.java:201)
    at com.ms.wsdiscovery.standard11.WsDiscoveryS11Utilities.createWsDiscoveryService(WsDiscoveryS11Utilities.java:85)
    at com.ms.wsdiscovery.standard11.WsDiscoveryS11Utilities.storeJAXBObject(WsDiscoveryS11Utilities.java:293)
    at com.ms.wsdiscovery.standard11.WsDiscoveryS11DispatchThread.recvHello(WsDiscoveryS11DispatchThread.java:262)
    at com.ms.wsdiscovery.standard11.WsDiscoveryS11DispatchThread.dispatch(WsDiscoveryS11DispatchThread.java:737)
    at com.ms.wsdiscovery.common.WsDiscoveryDispatchThread.run(WsDiscoveryDispatchThread.java:296)

The schema states that scopes are minOccurs=0 and thus it should be acceptable 
for there to not be any scopes present.

Original issue reported on code.google.com by dan.k...@gmail.com on 16 Aug 2012 at 7:21