palaniyappanBala / python-ws-discovery

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

============================================== WSDiscovery - WS-Discovery in Python

Author:

L.A. Fernando <lafernando@gmail.com>

Usage

A sample use of the module is shown below,

from WSDiscovery import WSDiscovery

wsd = WSDiscovery()
wsd.start()

ttype = QName("abc", "def")

ttype1 = QName("namespace", "myTestService")
scope1 = Scope("http://myscope")
ttype2 = QName("namespace", "myOtherTestService_type1")
scope2 = Scope("http://other_scope")

xAddr = "localhost:8080/abc"
wsd.publishService(types=[ttype], scopes=[scope2], xAddrs=[xAddr])

#ret = wsd.searchServices(scopes=[scope1], timeout=10)
ret = wsd.searchServices()

for service in ret:
    print service.getEPR() + ":" + service.getXAddrs()[0]

wsd.stop()

TODO