APPENDIXA This appendix describes the WSDL and XSD 1 (XML Schema Definition) definitions for MWTM 6.1.4 Northbound API (NBAPI): InventoryAPI.wsdl, page A-1 EventAPI.wsdl, page A-10 ProvisionAPI.wsdl, page A-14 MWTM.xsd, page A-15 Common.xsd, page A-15 Inventory.xsd, page A-16 Event.xsd, page A-18 Provision.xsd, page A-19 Note MWTM 6.1.4 NBAPI WSDL and XSD definitions can also be obtained at the following locations: ${MWTM_INSTALL_BASEDIR}/tomcat/webapp/nbapi/WEB-INF/wsdl/InventoryAPI.wsdl ${MWTM_INSTALL_BASEDIR}/tomcat/webapp/nbapi/WEB-INF/wsdl/EventAPI.wsdl ${MWTM_INSTALL_BASEDIR}/tomcat/webapp/nbapi/WEB-INF/wsdl/ProvisionAPI.wsdl ${MWTM_INSTALL_BASEDIR}/tomcat/webapp/nbapi/WEB-INF/wsdl/MWTM.xsd ${MWTM_INSTALL_BASEDIR}/tomcat/webapp/nbapi/WEB-INF/wsdl/Common.xsd ${MWTM_INSTALL_BASEDIR}/tomcat/webapp/nbapi/WEB-INF/wsdl/Inventory.xsd ${MWTM_INSTALL_BASEDIR}/tomcat/webapp/nbapi/WEB-INF/wsdl/Event.xsd ${MWTM_INSTALL_BASEDIR}/tomcat/webapp/nbapi/WEB-INF/wsdl/Provision.xsd InventoryAPI.wsdl <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved. --> <definitions targetnamespace="http://cisco.com/mwtm" name="inventoryapiservice" xmlns:tns="http://cisco.com/mwtm" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> 1. The XML Schema language (see http://www.w3.org/xml/schema). A-1
InventoryAPI.wsdl Appendix A <xsd:schema> <xsd:import namespace="http://cisco.com/mwtm" schemalocation="mwtm.xsd"/> </xsd:schema> </types> <message name="apistatus"> <part name="apistatus" element="tns:apistatus"/> <message name="getnerequest"> <message name="getneresponse"> <part name="networkelement" type="tns:networkelement"/> <message name="normalizefqdnrequest"> <message name="normalizefqdnresponse"> <part name="normalizedfqdn" type="xsd:string"/> <message name="haschildrequest"> <message name="haschildresponse"> <part name="haschildflag" type="xsd:boolean"/> <message name="getallnesrequest"> <message name="getallnesresponse"> <message name="getallneswithfeaturerequest"> <part name="featurestr" type="xsd:string"/> <message name="getallneswithfeatureresponse"> <message name="getallnetypesrequest"> <message name="getallnetypesresponse"> <part name="netypelist" type="tns:netypelist"/> <message name="getallnesbytyperequest"> <part name="netype" type="xsd:string"/> <message name="getallnesbytyperesponse"> <message name="getrootnesrequest"> <message name="getrootnesresponse"> <message name="getrootneswithfeaturerequest"> <part name="featurestr" type="xsd:string"/> A-2
Appendix A InventoryAPI.wsdl <message name="getrootneswithfeatureresponse"> <message name="getrootnetypesrequest"> <message name="getrootnetypesresponse"> <part name="netypelist" type="tns:netypelist"/> <message name="getrootnesbytyperequest"> <part name="netype" type="xsd:string"/> <message name="getrootnesbytyperesponse"> <message name="getchildnesrequest"> <message name="getchildnesresponse"> <message name="getchildneswithfeaturerequest"> <part name="featurestr" type="xsd:string"/> <message name="getchildneswithfeatureresponse"> <message name="getchildnetypesrequest"> <message name="getchildnetypesresponse"> <part name="netypelist" type="tns:netypelist"/> <message name="getchildnesbytyperequest"> <part name="netype" type="xsd:string"/> <message name="getchildnesbytyperesponse"> <message name="getdescendantnesrequest"> <message name="getdescendantnesresponse"> <message name="getdescendantneswithfeaturerequest"> <part name="featurestr" type="xsd:string"/> <message name="getdescendantneswithfeatureresponse"> <message name="getdescendantnetypesrequest"> A-3
InventoryAPI.wsdl Appendix A <message name="getdescendantnetypesresponse"> <part name="netypelist" type="tns:netypelist"/> <message name="getdescendantnesbytyperequest"> <part name="netype" type="xsd:string"/> <message name="getdescendantnesbytyperesponse"> <message name="getnoterequest"> <message name="getnoteresponse"> <part name="note" type="xsd:string"/> <message name="setnoterequest"> <part name="userid" type="xsd:string"/> <part name="note" type="xsd:string"/> <message name="setnoteresponse"> <message name="appendnoterequest"> <part name="userid" type="xsd:string"/> <part name="note" type="xsd:string"/> <message name="appendnoteresponse"> <porttype name="inventoryapi"> <operation name="getne"> <input message="tns:getnerequest"/> <output message="tns:getneresponse"/> <operation name="normalizefqdn"> <input message="tns:normalizefqdnrequest"/> <output message="tns:normalizefqdnresponse"/> <operation name="haschild"> <input message="tns:haschildrequest"/> <output message="tns:haschildresponse"/> <operation name="getallnes"> <input message="tns:getallnesrequest"/> <output message="tns:getallnesresponse"/> <operation name="getallneswithfeature"> <input message="tns:getallneswithfeaturerequest"/> <output message="tns:getallneswithfeatureresponse"/> <operation name="getallnetypes"> <input message="tns:getallnetypesrequest"/> <output message="tns:getallnetypesresponse"/> A-4
Appendix A InventoryAPI.wsdl <operation name="getallnesbytype"> <input message="tns:getallnesbytyperequest"/> <output message="tns:getallnesbytyperesponse"/> <operation name="getrootnes"> <input message="tns:getrootnesrequest"/> <output message="tns:getrootnesresponse"/> <operation name="getrootneswithfeature"> <input message="tns:getrootneswithfeaturerequest"/> <output message="tns:getrootneswithfeatureresponse"/> <operation name="getrootnetypes"> <input message="tns:getrootnetypesrequest"/> <output message="tns:getrootnetypesresponse"/> <operation name="getrootnesbytype"> <input message="tns:getrootnesbytyperequest"/> <output message="tns:getrootnesbytyperesponse"/> <operation name="getchildnes"> <input message="tns:getchildnesrequest"/> <output message="tns:getchildnesresponse"/> <operation name="getchildneswithfeature"> <input message="tns:getchildneswithfeaturerequest"/> <output message="tns:getchildneswithfeatureresponse"/> <operation name="getchildnetypes"> <input message="tns:getchildnetypesrequest"/> <output message="tns:getchildnetypesresponse"/> <operation name="getchildnesbytype"> <input message="tns:getchildnesbytyperequest"/> <output message="tns:getchildnesbytyperesponse"/> <operation name="getdescendantnes"> <input message="tns:getdescendantnesrequest"/> <output message="tns:getdescendantnesresponse"/> <operation name="getdescendantneswithfeature"> <input message="tns:getdescendantneswithfeaturerequest"/> <output message="tns:getdescendantneswithfeatureresponse"/> <operation name="getdescendantnetypes"> <input message="tns:getdescendantnetypesrequest"/> <output message="tns:getdescendantnetypesresponse"/> <operation name="getdescendantnesbytype"> <input message="tns:getdescendantnesbytyperequest"/> <output message="tns:getdescendantnesbytyperesponse"/> A-5
InventoryAPI.wsdl Appendix A <operation name="getnote"> <input message="tns:getnoterequest"/> <output message="tns:getnoteresponse"/> <operation name="setnote"> <input message="tns:setnoterequest"/> <output message="tns:setnoteresponse"/> <operation name="appendnote"> <input message="tns:appendnoterequest"/> <output message="tns:appendnoteresponse"/> </porttype> <binding name="inventoryapiportbinding" type="tns:inventoryapi"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <operation name="getne"> <operation name="normalizefqdn"> <operation name="haschild"> <operation name="getallnes"> A-6
Appendix A InventoryAPI.wsdl <operation name="getallneswithfeature"> <operation name="getallnetypes"> <operation name="getallnesbytype"> <operation name="getrootnes"> <operation name="getrootneswithfeature"> A-7
InventoryAPI.wsdl Appendix A <operation name="getrootnetypes"> <operation name="getrootnesbytype"> <operation name="getchildnes"> <operation name="getchildneswithfeature"> <operation name="getchildnetypes"> <operation name="getchildnesbytype"> A-8
Appendix A InventoryAPI.wsdl <operation name="getdescendantnes"> <operation name="getdescendantneswithfeature"> <operation name="getdescendantnetypes"> <operation name="getdescendantnesbytype"> <operation name="getnote"> A-9
EventAPI.wsdl Appendix A <operation name="setnote"> <operation name="appendnote"> </binding> <service name="inventoryapiservice"> <port name="inventoryapiport" binding="tns:inventoryapiportbinding"> <soap:address location="replace_with_actual_url"/> </port> </service> </definitions> EventAPI.wsdl <?xml version="1.0" encoding="utf-8" standalone="yes"?> <definitions targetnamespace="http://cisco.com/mwtm" name="eventapiservice" xmlns:tns="http://cisco.com/mwtm" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <xsd:schema> <xsd:import namespace="http://cisco.com/mwtm" schemalocation="mwtm.xsd"/> </xsd:schema> </types> <message name="apistatus"> <part name="apistatus" element="tns:apistatus"/> <message name="getalleventsastrapsrequest"> <part name="target" type="tns:traptarget"/> <message name="getalleventsastrapsresponse"> <part name="eventcount" type="xsd:int"/> A-10
Appendix A EventAPI.wsdl <message name="getfilteredeventsastrapsrequest"> <part name="target" type="tns:traptarget"/> <part name="filter" type="tns:eventfilter"/> <message name="getfilteredeventsastrapsresponse"> <part name="eventcount" type="xsd:int"/> <message name="cleareventsrequest"> <part name="eventlist" type="tns:eventidlist"/> <part name="userid" type="xsd:string"/> <part name="note" type="xsd:string"/> <message name="cleareventsresponse"> <message name="acknowledgeeventsrequest"> <part name="eventlist" type="tns:eventidlist"/> <part name="userid" type="xsd:string"/> <part name="note" type="xsd:string"/> <message name="acknowledgeeventsresponse"> <message name="deleteeventsrequest"> <part name="eventlist" type="tns:eventidlist"/> <message name="deleteeventsresponse"> <message name="changeseveritiesrequest"> <part name="eventlist" type="tns:eventidlist"/> <part name="severity" type="xsd:string"/> <part name="userid" type="xsd:string"/> <part name="note" type="xsd:string"/> <message name="changeseveritiesresponse"> <message name="getnoterequest"> <part name="eventid" type="xsd:long"/> <message name="getnoteresponse"> <part name="note" type="xsd:string"/> <message name="setnoterequest"> <part name="eventid" type="xsd:long"/> <part name="userid" type="xsd:string"/> <part name="note" type="xsd:string"/> <message name="setnoteresponse"> <message name="appendnoterequest"> <part name="eventid" type="xsd:long"/> <part name="userid" type="xsd:string"/> <part name="note" type="xsd:string"/> <message name="appendnoteresponse"> <porttype name="eventapi"> <operation name="getalleventsastraps"> <input message="tns:getalleventsastrapsrequest"/> <output message="tns:getalleventsastrapsresponse"/> <operation name="getfilteredeventsastraps"> <input message="tns:getfilteredeventsastrapsrequest"/> A-11
EventAPI.wsdl Appendix A <output message="tns:getfilteredeventsastrapsresponse"/> <operation name="clearevents"> <input message="tns:cleareventsrequest"/> <output message="tns:cleareventsresponse"/> <operation name="acknowledgeevents"> <input message="tns:acknowledgeeventsrequest"/> <output message="tns:acknowledgeeventsresponse"/> <operation name="deleteevents"> <input message="tns:deleteeventsrequest"/> <output message="tns:deleteeventsresponse"/> <operation name="changeseverities"> <input message="tns:changeseveritiesrequest"/> <output message="tns:changeseveritiesresponse"/> <operation name="getnote"> <input message="tns:getnoterequest"/> <output message="tns:getnoteresponse"/> <operation name="setnote"> <input message="tns:setnoterequest"/> <output message="tns:setnoteresponse"/> <operation name="appendnote"> <input message="tns:appendnoterequest"/> <output message="tns:appendnoteresponse"/> </porttype> <binding name="eventapiportbinding" type="tns:eventapi"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <operation name="getalleventsastraps"> <operation name="getfilteredeventsastraps"> A-12
Appendix A EventAPI.wsdl <operation name="clearevents"> <operation name="acknowledgeevents"> <operation name="deleteevents"> <operation name="changeseverities"> <operation name="getnote"> <operation name="setnote"> A-13
ProvisionAPI.wsdl Appendix A <operation name="appendnote"> </binding> <service name="eventapiservice"> <port name="eventapiport" binding="tns:eventapiportbinding"> <soap:address location="replace_with_actual_url"/> </port> </service> </definitions> ProvisionAPI.wsdl <?xml version="1.0" encoding="utf-8" standalone="yes"?> <definitions targetnamespace="http://cisco.com/mwtm" name="provisionapiservice" xmlns:tns="http://cisco.com/mwtm" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <xsd:schema> <xsd:import namespace="http://cisco.com/mwtm" schemalocation="mwtm.xsd"/> </xsd:schema> </types> <message name="apistatus"> <part name="apistatus" element="tns:apistatus"/> <message name="provisionrequest"> <part name="request" type="tns:provisionrequest"/> <message name="provisionresponse"> <porttype name="provisionapi"> <operation name="provision"> <input message="tns:provisionrequest"/> <output message="tns:provisionresponse"/> A-14
Appendix A MWTM.xsd </porttype> <binding name="provisionapiportbinding" type="tns:provisionapi"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <operation name="provision"> </binding> <service name="provisionapiservice"> <port name="provisionapiport" binding="tns:provisionapiportbinding"> <soap:address location="replace_with_actual_url"/> </port> </service> </definitions> MWTM.xsd <?xml version="1.0" encoding="utf-8" standalone="yes"?> <xs:schema version="1.0" targetnamespace="http://cisco.com/mwtm" xmlns:tns="http://cisco.com/mwtm" xmlns:xs="http://www.w3.org/2001/xmlschema"> <xs:include schemalocation="common.xsd"/> <xs:include schemalocation="event.xsd"/> <xs:include schemalocation="inventory.xsd"/> <xs:include schemalocation="provision.xsd"/> </xs:schema> Common.xsd <?xml version="1.0" encoding="utf-8" standalone="yes"?> <xs:schema version="1.0" targetnamespace="http://cisco.com/mwtm" xmlns:tns="http://cisco.com/mwtm" xmlns:xs="http://www.w3.org/2001/xmlschema"> <!-- APIStatus contains StatusCode and Message when error occurs --> <xs:complextype name="apistatus"> A-15
Inventory.xsd Appendix A <xs:element name="statuscode" type="xs:int"/> <xs:element name="message" type="xs:string"/> <xs:element name="apistatus" type="tns:apistatus"/> <!-- inventory attribute types: Config, Monitor and All --> <xs:simpletype name="inventorytype"> <xs:restriction base="xs:string"> <xs:enumeration value="config"/> <xs:enumeration value="monitor"/> <xs:enumeration value="all"/> </xs:restriction> </xs:simpletype> <!-- provisioning operation types: Add, Modify, Delete --> <xs:simpletype name="operationtype"> <xs:restriction base="xs:string"> <xs:enumeration value="add"/> <xs:enumeration value="modify"/> <xs:enumeration value="delete"/> </xs:restriction> </xs:simpletype> </xs:schema> Inventory.xsd <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved. --> <xs:schema version="1.0" targetnamespace="http://cisco.com/mwtm" xmlns:tns="http://cisco.com/mwtm" xmlns:xs="http://www.w3.org/2001/xmlschema"> <!-- Attribute is a name/value pair --> <xs:complextype name="attribute"> <xs:simplecontent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="array" type="xs:boolean" default="false"/> </xs:extension> </xs:simplecontent> <!-- AttributeList is the base type for NetworkElement, AttributeGroup and Feature. It contains elements of Attributes, and/or AttributeGroups --> <xs:complextype name="attributelist"> <xs:choice minoccurs="0" maxoccurs="unbounded"> <xs:element name="attribute" type="tns:attribute"/> <xs:element name="attributegroup" type="tns:attributegroup"/> </xs:choice> <!-- AttributeGroup is a heterogeneous grouping of attributes --> A-16
Appendix A Inventory.xsd <xs:complextype name="attributegroup"> <xs:complexcontent> <xs:extension base="tns:attributelist"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="array" type="xs:boolean" default="false"/> <xs:attribute name="arraykey" type="xs:string"/> </xs:extension> </xs:complexcontent> <!-- Feature is a AttributeList with a feature name --> <!-- A Feature can optionally have a operation type for provisioning --> <xs:complextype name="feature"> <xs:complexcontent> <xs:extension base="tns:attributelist"> <xs:attribute name="name" type="xs:string" use="required"/> </xs:extension> </xs:complexcontent> <!-- NetworkElement is an AttributeList with a list of Features --> <!-- NetworkElement has type/subtype and FQDN for object identifier --> <xs:complextype name="networkelement"> <xs:complexcontent> <xs:extension base="tns:attributelist"> <xs:element name="feature" type="tns:feature" minoccurs="0" maxoccurs="unbounded"/> <xs:attribute name="parentfqdn" type="xs:string" use="required"/> <xs:attribute name="type" type="xs:string" use="required"/> <xs:attribute name="subtype" type="xs:string"/> <xs:attribute name="provisionable" type="xs:boolean" default="true"/> </xs:extension> </xs:complexcontent> <xs:element name="networkelement" type="tns:networkelement"/> <!-- NetworkElementList is a List of NetworkElement --> <xs:complextype name="networkelementlist"> <xs:element name="networkelement" type="tns:networkelement" minoccurs="0" maxoccurs="unbounded"/> <xs:element name="networkelementlist" type="tns:networkelementlist"/> <xs:complextype name="netypelist"> <xs:element name="netype" type="xs:string" minoccurs="0" maxoccurs="unbounded"/> <xs:element name="netypelist" type="tns:netypelist"/> </xs:schema> A-17
Event.xsd Appendix A Event.xsd <?xml version="1.0" encoding="utf-8" standalone="yes"?> <xs:schema version="1.0" targetnamespace="http://cisco.com/mwtm" xmlns:tns="http://cisco.com/mwtm" xmlns:xs="http://www.w3.org/2001/xmlschema"> <!-- A list of event IDs --> <xs:complextype name="eventidlist"> <xs:element name="id" type="xs:long" maxoccurs="unbounded"/> <xs:element name="eventidlist" type="tns:eventidlist"/> <!-- Trap Target specifies target host/port and SNMP parameters to send SNMP Trap notification to --> <xs:complextype name="traptarget"> <xs:element name="hostname" type="xs:string"/> <xs:element name="port" type="xs:int"/> <xs:element name="community" type="xs:string"/> <xs:element name="snmpversion"> <xs:simpletype> <xs:restriction base="xs:string"> <xs:enumeration value="1"/> <xs:enumeration value="2c"/> </xs:restriction> </xs:simpletype> </xs:element> <xs:element name="mib"> <xs:simpletype> <xs:restriction base="xs:string"> <xs:enumeration value="cisco-epm"/> <xs:enumeration value="cisco-syslog"/> </xs:restriction> </xs:simpletype> </xs:element> <xs:element name="traptarget" type="tns:traptarget"/> <!-- Event Filter --> <!-- If more than one conditions are specified, EventFilter applies "AND" on all specified conditions --> <xs:complextype name="eventfilter"> <xs:element name="eventids" type="tns:eventidlist" minoccurs="0"/> <xs:element name="startdate" type="xs:datetime" minoccurs="0"/> <xs:element name="enddate" type="xs:datetime" minoccurs="0"/> <xs:element name="severity" type="xs:string" minoccurs="0" maxoccurs="unbounded"/> <xs:element name="category" type="xs:string" minoccurs="0" maxoccurs="unbounded"/> <xs:element name="acknowledged" type="xs:boolean" minoccurs="0"/> <xs:element name="cleared" type="xs:boolean" minoccurs="0"/> <!-- filter "text" is based on whether event message contains given text --> <xs:element name="messagetext" type="xs:string" minoccurs="0"/> A-18
Appendix A Provision.xsd <xs:element name="networkelement" type="xs:string" minoccurs="0"/> <xs:element name="forward" type="xs:boolean" minoccurs="0"/> <xs:element name="eventfilter" type="tns:eventfilter"/> </xs:schema> Provision.xsd <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved. --> <xs:schema version="1.0" targetnamespace="http://cisco.com/mwtm" xmlns:tns="http://cisco.com/mwtm" xmlns:xs="http://www.w3.org/2001/xmlschema"> <xs:include schemalocation="common.xsd"/> <xs:include schemalocation="inventory.xsd"/> <xs:complextype name="devicecredential"> <xs:element name="username" type="xs:string"/> <xs:element name="password" type="xs:string"/> <xs:element name="enableusername" type="xs:string"/> <xs:element name="enablepassword" type="xs:string"/> <!-- a ProvisionOperation is an operation on NetworkElement --> <xs:complextype name="provisionoperation"> <xs:complexcontent> <xs:extension base="tns:networkelement"> <xs:element name="devicecredential" type="tns:devicecredential" minoccurs="0"/> <xs:attribute name="operation" type="tns:operationtype" use="required"/> <xs:attribute name="ioswritetostartup" type="xs:boolean" default="false"/> </xs:extension> </xs:complexcontent> <xs:element name="provisionoperation" type="tns:provisionoperation"/> <xs:complextype name="ioswritetostartup"> <xs:element name="devicecredential" type="tns:devicecredential" minoccurs="0"/> <xs:attribute name="fqdn" type="xs:string"/> <xs:complextype name="syncfromdevice"> <xs:attribute name="fqdn" type="xs:string"/> <!-- A ProvisionRequest contains a list of ProvisionOperation --> <xs:complextype name="provisionrequest"> A-19
Provision.xsd Appendix A <xs:choice minoccurs="0" maxoccurs="unbounded"> <xs:element name="provisionoperation" type="tns:provisionoperation"/> <xs:element name="ioswritetostartup" type="tns:ioswritetostartup"/> <xs:element name="syncfromdevice" type="tns:syncfromdevice"/> </xs:choice> <xs:element name="provisionrequest" type="tns:provisionrequest"/> </xs:schema> A-20