/usr/bin/pyxbwsdl is in python-pyxb 1.2.3+dfsg-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #! /usr/bin/python
# Sample URIs:
# http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl
# http://services.aonaware.com/DictService/DictService.asmx?WSDL
# http://soap.amazon.com/schemas2/AmazonWebServices.wsdl
# http://api.google.com/GoogleSearch.wsdl
import sys
import xml.dom.minidom
import urllib2
import logging
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
import pyxb.bundles.wssplat.wsdl11 as wsdl
for uri in sys.argv[1:]:
uri_src = urllib2.urlopen(uri)
doc = xml.dom.minidom.parseString(uri_src.read())
spec = wsdl.definitions.createFromDOM(doc.documentElement, process_schema=True)
for s in spec.service:
print 'Service: %s' % (s.name,)
if s.documentation:
print s.documentation
for p in s.port:
b = p.bindingReference
prot = b.protocolBinding
assert p.addressReference, 'No reference for %s wildcards: %s' % (p.name, p.wildcardElements()) # Usually fails when generated bindings import raw module
print ' Port %s at %s' % (p.name, p.addressReference.location)
ptr = b.portTypeReference
for op in b.operation:
pt_op = ptr.operationMap()[op.name]
if op.operationReference is not None:
print ' %s (at %s)' % (op.name, op.operationReference.locationInformation)
else:
print ' %s' % (op.name,)
if pt_op.documentation is not None:
print ' %s' % (pt_op.documentation,)
if pt_op.input is not None:
print ' Input: %s' % (pt_op.input.message,)
if pt_op.output is not None:
print ' Output: %s' % (pt_op.output.message,)
|