- if self.interface_options.aggregate and \
- self.interface_options.slicemgr and \
- self.interface_options.registry:
+ if (self.interface_options.aggregate and
+ self.interface_options.registry):
if (not self.interface_options.lite or (argname!="cred")):
if (argname.find('(') != -1):
# The name has documentation in it :-/
if (not self.interface_options.lite or (argname!="cred")):
if (argname.find('(') != -1):
# The name has documentation in it :-/
self.num_types += 1
type_name = "Type%d"%self.num_types
complex_type = types_section.appendChild(self.types.createElement("xsd:complexType"))
self.num_types += 1
type_name = "Type%d"%self.num_types
complex_type = types_section.appendChild(self.types.createElement("xsd:complexType"))
elif (isinstance(arg, Parameter)):
return (self.name_simple_type(arg.type))
elif type(arg) in ( ListType , TupleType ):
elif (isinstance(arg, Parameter)):
return (self.name_simple_type(arg.type))
elif type(arg) in ( ListType , TupleType ):
self.num_types=self.num_types+1
type_name = "Type%d"%self.num_types
complex_type = types_section.appendChild(self.types.createElement("xsd:complexType"))
self.num_types=self.num_types+1
type_name = "Type%d"%self.num_types
complex_type = types_section.appendChild(self.types.createElement("xsd:complexType"))
type_name = self.filter_argname(type_name)
complex_type.setAttribute("name", type_name)
complex_content = complex_type.appendChild(self.types.createElement("xsd:sequence"))
type_name = self.filter_argname(type_name)
complex_type.setAttribute("name", type_name)
complex_content = complex_type.appendChild(self.types.createElement("xsd:sequence"))
element=complex_content.appendChild(self.types.createElement("xsd:element"))
element.setAttribute("name",k)
element.setAttribute("type",inner_type)
element=complex_content.appendChild(self.types.createElement("xsd:element"))
element.setAttribute("name",k)
element.setAttribute("type",inner_type)
in_el = self.wsdl.lastChild.appendChild(self.wsdl.createElement("message"))
in_el.setAttribute("name", method + "_in")
in_el = self.wsdl.lastChild.appendChild(self.wsdl.createElement("message"))
in_el.setAttribute("name", method + "_in")
arg_part = in_el.appendChild(self.wsdl.createElement("part"))
arg_part.setAttribute("name", argname)
arg_part.setAttribute("type", self.param_type(argtype))
arg_part = in_el.appendChild(self.wsdl.createElement("part"))
arg_part.setAttribute("name", argname)
arg_part.setAttribute("type", self.param_type(argtype))
return_type = function.returns
out_el = self.wsdl.lastChild.appendChild(self.wsdl.createElement("message"))
out_el.setAttribute("name", method + "_out")
return_type = function.returns
out_el = self.wsdl.lastChild.appendChild(self.wsdl.createElement("message"))
out_el.setAttribute("name", method + "_out")
port_el = self.wsdl.lastChild.appendChild(self.wsdl.createElement("portType"))
port_el.setAttribute("name", method + "_port")
port_el = self.wsdl.lastChild.appendChild(self.wsdl.createElement("portType"))
port_el.setAttribute("name", method + "_port")
op_el = port_el.appendChild(self.wsdl.createElement("operation"))
op_el.setAttribute("name", method)
inp_el=self.wsdl.createElement("input")
op_el = port_el.appendChild(self.wsdl.createElement("operation"))
op_el.setAttribute("name", method)
inp_el=self.wsdl.createElement("input")
bind_el = self.wsdl.lastChild.appendChild(self.wsdl.createElement("binding"))
bind_el.setAttribute("name", method + "_binding")
bind_el.setAttribute("type", "tns:" + method + "_port")
bind_el = self.wsdl.lastChild.appendChild(self.wsdl.createElement("binding"))
bind_el.setAttribute("name", method + "_binding")
bind_el.setAttribute("type", "tns:" + method + "_port")
soap_bind = bind_el.appendChild(self.wsdl.createElement("soap:binding"))
soap_bind.setAttribute("style", "rpc")
soap_bind.setAttribute("transport","http://schemas.xmlsoap.org/soap/http")
soap_bind = bind_el.appendChild(self.wsdl.createElement("soap:binding"))
soap_bind.setAttribute("style", "rpc")
soap_bind.setAttribute("transport","http://schemas.xmlsoap.org/soap/http")
wsdl_op = bind_el.appendChild(self.wsdl.createElement("operation"))
wsdl_op.setAttribute("name", method)
wsdl_op.appendChild(self.wsdl.createElement("soap:operation")).setAttribute("soapAction",
"urn:" + method)
wsdl_op = bind_el.appendChild(self.wsdl.createElement("operation"))
wsdl_op.setAttribute("name", method)
wsdl_op.appendChild(self.wsdl.createElement("soap:operation")).setAttribute("soapAction",
"urn:" + method)
wsdl_input = wsdl_op.appendChild(self.wsdl.createElement("input"))
input_soap_body = wsdl_input.appendChild(self.wsdl.createElement("soap:body"))
input_soap_body.setAttribute("use", "encoded")
input_soap_body.setAttribute("namespace", "urn:" + method)
input_soap_body.setAttribute("encodingStyle","http://schemas.xmlsoap.org/soap/encoding/")
wsdl_input = wsdl_op.appendChild(self.wsdl.createElement("input"))
input_soap_body = wsdl_input.appendChild(self.wsdl.createElement("soap:body"))
input_soap_body.setAttribute("use", "encoded")
input_soap_body.setAttribute("namespace", "urn:" + method)
input_soap_body.setAttribute("encodingStyle","http://schemas.xmlsoap.org/soap/encoding/")
wsdl_output = wsdl_op.appendChild(self.wsdl.createElement("output"))
output_soap_body = wsdl_output.appendChild(self.wsdl.createElement("soap:body"))
output_soap_body.setAttribute("use", "encoded")
output_soap_body.setAttribute("namespace", "urn:" + method)
output_soap_body.setAttribute("encodingStyle","http://schemas.xmlsoap.org/soap/encoding/")
wsdl_output = wsdl_op.appendChild(self.wsdl.createElement("output"))
output_soap_body = wsdl_output.appendChild(self.wsdl.createElement("soap:body"))
output_soap_body.setAttribute("use", "encoded")
output_soap_body.setAttribute("namespace", "urn:" + method)
output_soap_body.setAttribute("encodingStyle","http://schemas.xmlsoap.org/soap/encoding/")
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
""" % (self.interface_name(),plc_ns,plc_ns,plc_ns)
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
""" % (self.interface_name(),plc_ns,plc_ns,plc_ns)
</types>
</wsdl:definitions> """ % (self.interface_name(),plc_ns, plc_ns, plc_ns, plc_ns)
self.types = xml.dom.minidom.parseString(wsdl_text_header)
</types>
</wsdl:definitions> """ % (self.interface_name(),plc_ns, plc_ns, plc_ns, plc_ns)
self.types = xml.dom.minidom.parseString(wsdl_text_header)
def add_wsdl_types(self):
wsdl_types = self.wsdl.importNode(self.types.getElementsByTagName("types")[0], True)
def add_wsdl_types(self):
wsdl_types = self.wsdl.importNode(self.types.getElementsByTagName("types")[0], True)
- parser.add_option("-r", "--registry", dest="registry", action="store_true",
+ parser.add_option("-r", "--registry", dest="registry", action="store_true",
- parser.add_option("-s", "--slice-manager",
- action="store_true", dest="slicemgr",
- help="Generate sm.wsdl")
parser.add_option("-a", "--aggregate", action="store_true", dest="aggregate",
help="Generate am.wsdl")
parser.add_option("-a", "--aggregate", action="store_true", dest="aggregate",
help="Generate am.wsdl")
parser.add_option("-g", "--geni-aggregate", action="store_true", dest="geni_am",
help="Generate gm.wsdl")
parser.add_option("-l", "--lite", action="store_true", dest="lite",
parser.add_option("-g", "--geni-aggregate", action="store_true", dest="geni_am",
help="Generate gm.wsdl")
parser.add_option("-l", "--lite", action="store_true", dest="lite",