【发布时间】:2014-05-27 15:30:49
【问题描述】:
好的。所以我正在查看来自 TMForum Group 的 MTOSI 标准,并在 sourceforge 上找到了 reference implementation 标准。现在这个实现包含很多 WSDL 文件,我想看看标准支持什么样的操作。我不擅长阅读 WSDL 文件,所以想到了使用 Apache CXF 将一些 WSDL 文件编译成 Java 文件,希望能让我更容易阅读。
不幸的是,Wsdl2Java 编译器抛出了一个我无法理解的错误。因此,我希望在这里对错误有所了解。
下面我发布了 Wsdl 文件的内容。我得到的错误是:
Fault Message ProcessingFailureException 有多个 WSDL 规范不允许的部分。
据我了解,有 3 个 WSDL 文件和 2 个 XSD 文件,如下所示:
FaultServiceSOAP_HTTP.wsdl
<wsdl:operation name="getActiveAlarmsCount">
<wsdl:input>
<soap12:header message="tmf854WS:getActiveAlarmsCount" part="mtosiHeader" use="literal" />
<soap12:body parts="mtosiBody" use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:header message="tmf854WS:getActiveAlarmsCountResponse" part="mtosiHeader" use="literal" />
<soap12:body parts="mtosiBody" use="literal" />
</wsdl:output>
<soap12:fault name="ProcessingFailureException">
<soap12:fault name="ProcessingFailureException" use="literal" />
</soap12:fault>
</wsdl:operation>
<wsdl:operation name="getActiveAlarms">
<wsdl:input>
<soap12:header message="tmf854WS:getActiveAlarms" part="mtosiHeader" use="literal" />
<soap12:body parts="mtosiBody" use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:header message="tmf854WS:getActiveAlarmsResponse" part="mtosiHeader" use="literal" />
<soap12:body parts="mtosiBody" use="literal" />
</wsdl:output>
<soap12:fault name="ProcessingFailureException">
<soap12:fault name="ProcessingFailureException" use="literal" />
</soap12:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AlarmRetrieval">
<wsdl:port name="AlarmRetrieval" binding="tmf854WS:AlarmRetrievalSoapHTTPBinding">
<soap12:address location="http://aserver/mtosi/v1/AlarmRetrieval" />
</wsdl:port>
</wsdl:service>
FaultService.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<!-- TMF854 Version 1.0 - Copyright TeleManagement Forum 2005 -->
<wsdl:definitions name="TMF854-FaultService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="tmf854.v1.ws" xmlns:tmf854XSD="tmf854.v1" xmlns:tmf854WS="tmf854.v1.ws" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!-- ===================== Import Type Definitions ============= -->
<wsdl:types>
<xsd:schema targetNamespace="tmf854.v1.ws">
<xsd:import namespace="tmf854.v1" schemaLocation="../../xsd/interfaces/AlarmRetrieval.xsd"/>
</xsd:schema>
</wsdl:types>
<!-- ===================== Import Exception Definitions ============= -->
<wsdl:import location="Exceptions.wsdl" namespace="tmf854.v1.ws"/>
<!-- ===================== Definition of getActiveAlarmsCount Request/Response Messages ========= -->
<wsdl:message name="getActiveAlarmsCount">
<wsdl:documentation>
The getActiveAlarmsCount request message.
</wsdl:documentation>
<wsdl:part name="mtosiHeader" element="tmf854XSD:header"/>
<wsdl:part name="mtosiBody" element="tmf854XSD:getActiveAlarmsCount"/>
</wsdl:message>
<wsdl:message name="getActiveAlarmsCountResponse">
<wsdl:documentation>
The getActiveAlarmsCount response message.
</wsdl:documentation>
<wsdl:part name="mtosiHeader" element="tmf854XSD:header"/>
<wsdl:part name="mtosiBody" element="tmf854XSD:getActiveAlarmsCountResponse"/>
</wsdl:message>
<!-- ===================== Definition of getActiveAlarms Request/Response Messages ========= -->
<wsdl:message name="getActiveAlarms">
<wsdl:documentation>
The getActiveAlarms request message.
</wsdl:documentation>
<wsdl:part name="mtosiHeader" element="tmf854XSD:header"/>
<wsdl:part name="mtosiBody" element="tmf854XSD:getActiveAlarms"/>
</wsdl:message>
<wsdl:message name="getActiveAlarmsResponse">
<wsdl:documentation>
The getActiveAlarms response message.
</wsdl:documentation>
<wsdl:part name="mtosiHeader" element="tmf854XSD:header"/>
<wsdl:part name="mtosiBody" element="tmf854XSD:getActiveAlarmsResponse"/>
</wsdl:message>
<!-- ===================== Port Type Definitions ====================== -->
<!-- ===================== AlarmRetrieval Port Type ===================== -->
<wsdl:portType name="AlarmRetrieval">
<wsdl:documentation>
The MTOSI AlarmRetrievalServer porttype
</wsdl:documentation>
<wsdl:operation name="getActiveAlarmsCount">
<wsdl:documentation>
This is the getActiveAlarmsCount request/response operation
</wsdl:documentation>
<wsdl:input message="tmf854WS:getActiveAlarmsCount"/>
<wsdl:output message="tmf854WS:getActiveAlarmsCountResponse"/>
<wsdl:fault name="ProcessingFailureException" message="tmf854WS:ProcessingFailureException"/>
</wsdl:operation>
<wsdl:operation name="getActiveAlarms">
<wsdl:documentation>
This is the getActiveAlarms request/response operation
</wsdl:documentation>
<wsdl:input message="tmf854WS:getActiveAlarms"/>
<wsdl:output message="tmf854WS:getActiveAlarmsResponse"/>
<wsdl:fault name="ProcessingFailureException" message="tmf854WS:ProcessingFailureException"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
Exceptions.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<!-- TMF854 Version 1.0 - Copyright TeleManagement Forum 2005 -->
<wsdl:definitions name="TMF854-Exceptions" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="tmf854.v1.ws" xmlns:tmf854XSD="tmf854.v1" xmlns:tmf854WS="tmf854.v1.ws" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<!-- ===================== Include (same namespace) Type Definitions ============= -->
<wsdl:types>
<xsd:schema targetNamespace="tmf854.v1.ws">
<xsd:import namespace="tmf854.v1" schemaLocation="../../xsd/interfaces/Exceptions.xsd"/>
</xsd:schema>
</wsdl:types>
<!-- ===================== Definition of Exception Message ====================== -->
<wsdl:message name="ProcessingFailureException">
<wsdl:documentation>
The generic exception message.
</wsdl:documentation>
<wsdl:part name="mtosiHeader" element="tmf854XSD:header"/>
<wsdl:part name="ProcessingFailureException" element="tmf854XSD:ProcessingFailureException"/>
</wsdl:message>
</wsdl:definitions>
AlarmRetrieval.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!-- TMF854 Version 1.0 - Copyright TeleManagement Forum 2005 -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="tmf854.v1" targetNamespace="tmf854.v1" attributeFormDefault="unqualified" elementFormDefault="qualified">
<!-- ===================== Includes ========= -->
<xsd:include schemaLocation="../common/header.xsd"/>
<xsd:include schemaLocation="../networkResources/notifications.xsd"/>
<!-- ===================== Element Declarations ========= -->
<xsd:element name="getActiveAlarmsCount" type="getActiveAlarmsCount_T"/>
<xsd:element name="getActiveAlarmsCountResponse" type="getActiveAlarmsCountResponse_T"/>
<xsd:element name="getActiveAlarms" type="getActiveAlarms_T"/>
<xsd:element name="getActiveAlarmsResponse" type="getActiveAlarmsResponse_T"/>
<!-- ===================== Type Definitions ========= -->
<xsd:simpleType name="AlarmSource_T">
<xsd:annotation>
<xsd:documentation>
The source of the alarm with respect to the OS receiving this request. This is one of the active alarm filter criteria.
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="INTERNAL"/>
<xsd:enumeration value="EXTERNAL"/>
</xsd:restriction>
</xsd:simpleType>
<!-- ================= -->
<xsd:complexType name="ActiveAlarmFilter_T">
<xsd:annotation>
<xsd:documentation>
The active alarm filter data structure.
Default interpretation (filter criteria is missing or is an empty list) indicates that it is not relevant to the query. All the filter criteria possible enumerations are applicable.
Examples:
#1: All filter criteria missing -> Retrieve all alarms associated with all MEs and this OS
#2: source=internal, all other criteria missing -> Retrieve all alarms associated with this OS only
#3: source=external, all other criteria missing -> Retrieve all alarms associated with the MEs only
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="source" type="AlarmSource_T" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
This attribute filters the alarms based on their source (with respect to the OS receiving this request). Possible values are INTERNAL, EXTERNAL, NOT_APPLICABLE. The value NOT_APPLICABLE means there is no filtering on the alarm source; i.e., internal and external alarms are in the scope.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="scope" type="NamingAttributesList_T" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
This attribute filters the alarms based on a list of managed elements. The listed managed elements are in the scope.
If no managed element is provided, alarms from all managed elements are in scope.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="perceivedSeverityList" type="PerceivedSeverityList_T" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
This attribute filters the alarms based on a list of severities (see ITU-T X.733 definitions). The listed severities are in the scope.
If no severity is provided, alarms with any severity are in scope.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="probableCauseList" type="ProbableCauseList_T" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
This attribute filters the alarms based on a list of probable causes (for details refer to the supporting document: ProbableCauses). The listed probable causes are in the scope. If no probable cause is provided, alarms with any probable cause are in scope.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="acknowledgeIndication" type="AcknowledgeIndication_T" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
This attribute filters the alarms based on its acknowledge indication. Possible values are EVENT_ACKNOWLEDGED, EVENT_UNACKNOWLEDGED, and NOT_APPLICABLE. The value NOT_APPLICABLE indicates that alarms with any acknowledge indication are in scope.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="extVersion" type="xsd:string" use="optional"/>
<xsd:attribute name="extAuthor" type="xsd:string" use="optional"/>
<xsd:attribute name="tmf854Version" type="TMF854_Version_T" use="optional"/>
</xsd:complexType>
<!-- ===================== getActiveAlarmsCount Request/Response Messages ========= -->
<xsd:complexType name="getActiveAlarmsCount_T">
<xsd:annotation>
<xsd:documentation>
This operation asks the target top-level OS to count the number of active alarms as restricted by the provided filter. The target OS sends the result to the requesting OS.
The operation can only be directed to a top-level OS and not to a subordinate OS.
Raises ProcessingFailureException
EXCPT_NOT_IMPLEMENTED - Raised when the OS does not support this operation
EXCPT_INTERNAL_ERROR - Raised in case of non-specific OS internal failure
EXCPT_INVALID_INPUT - Raised when an invalid input parameter is provided
EXCPT_COMM_FAILURE - Raised when communication to an entity (needed to help fulfill the request) is lost
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="filter" type="ActiveAlarmFilter_T">
<xsd:annotation>
<xsd:documentation>
Defines the subset of the set of active alarms known to the target OS that are to be counted
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="extVersion" type="xsd:string" use="optional"/>
<xsd:attribute name="extAuthor" type="xsd:string" use="optional"/>
<xsd:attribute name="tmf854Version" type="TMF854_Version_T" use="optional"/>
</xsd:complexType>
<xsd:complexType name="getActiveAlarmsCountResponse_T">
<xsd:annotation>
<xsd:documentation>
This is the response of the getActiveAlarmsCount operation. See also getActiveAlarmsCount_T.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="activeAlarmCount" type="xsd:unsignedInt">
<xsd:annotation>
<xsd:documentation>
The number of active alarms that pass the filter conditions.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="extVersion" type="xsd:string" use="optional"/>
<xsd:attribute name="extAuthor" type="xsd:string" use="optional"/>
<xsd:attribute name="tmf854Version" type="TMF854_Version_T" use="optional"/>
</xsd:complexType>
<!-- ===================== getActiveAlarms Request/Response Messages ========= -->
<xsd:complexType name="getActiveAlarms_T">
<xsd:annotation>
<xsd:documentation>
This operation returns (to the requesting OS) a specified subset of the active alarms known to the target OS. The target OS returns all alarms satisfying the filter constraints of the requesting OS.
This operation can only be directed to a top-level OS and not to a subordinate OS.
Refer to the TMF 854 XML Solution Set document for details on the Message Exchange Pattern controls (multiple batch response).
Raises ProcessingFailureException
EXCPT_UNSUPPORTED_COMPRESSION_FORMAT - Raised when the specified file compression format is not supported
EXCPT_UNSUPPORTED_PACKING_FORMAT - Raised when the specified file packing format is not supported
EXCPT_NOT_IMPLEMENTED - Raised when the OS does not support this operation
EXCPT_INTERNAL_ERROR - Raised in case of non-specific OS internal failure
EXCPT_INVALID_INPUT - Raised when an invalid input parameter is provided
EXCPT_COMM_FAILURE - Raised when communication to an entity (needed to help fulfill the request) is lost
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="filter" type="ActiveAlarmFilter_T" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Defines the subset of the set of active alarms known to the target OS that are to be returned to the requesting OS
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="extVersion" type="xsd:string" use="optional"/>
<xsd:attribute name="extAuthor" type="xsd:string" use="optional"/>
<xsd:attribute name="tmf854Version" type="TMF854_Version_T" use="optional"/>
</xsd:complexType>
<xsd:complexType name="getActiveAlarmsResponse_T">
<xsd:annotation>
<xsd:documentation>
This is the response of the getActiveAlarms operation. See also getActiveAlarms_T.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="activeAlarmList" minOccurs="0">
<xsd:annotation>
<xsd:documentation>List of active alarms based on the provided filter.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="activeAlarm" type="Alarm_T" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>An Active alarm</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="extVersion" type="xsd:string" use="optional"/>
<xsd:attribute name="extAuthor" type="xsd:string" use="optional"/>
<xsd:attribute name="tmf854Version" type="TMF854_Version_T" use="optional"/>
</xsd:complexType>
</xsd:schema>
Exceptions.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!-- TMF854 Version 1.0 - Copyright TeleManagement Forum 2005 -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="tmf854.v1" targetNamespace="tmf854.v1" attributeFormDefault="unqualified" elementFormDefault="qualified">
<!-- =========== Includes ========= -->
<xsd:include schemaLocation="../common/header.xsd"/>
<xsd:include schemaLocation="vendorExtensions.xsd"/>
<!-- =========== Element Declarations ========= -->
<xsd:element name="ProcessingFailureException" type="ProcessingFailureException_T"/>
<!-- =========== Type Definitions ========= -->
<xsd:simpleType name="ExceptionType_T">
<xsd:annotation>
<xsd:documentation>
The type of exception returned by failed invokation of an MTOSI message request.
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="EXCPT_NOT_IMPLEMENTED"/>
<xsd:enumeration value="EXCPT_INTERNAL_ERROR"/>
<xsd:enumeration value="EXCPT_INVALID_INPUT"/>
<xsd:enumeration value="EXCPT_OBJECT_IN_USE"/>
<xsd:enumeration value="EXCPT_TP_INVALID_ENDPOINT"/>
<xsd:enumeration value="EXCPT_ENTITY_NOT_FOUND"/>
<xsd:enumeration value="EXCPT_TIMESLOT_IN_USE"/>
<xsd:enumeration value="EXCPT_PROTECTION_EFFORT_NOT_MET"/>
<xsd:enumeration value="EXCPT_NOT_IN_VALID_STATE"/>
<xsd:enumeration value="EXCPT_UNABLE_TO_COMPLY"/>
<xsd:enumeration value="EXCPT_CAPACITY_EXCEEDED"/>
<xsd:enumeration value="EXCPT_ACCESS_DENIED"/>
<xsd:enumeration value="EXCPT_UNSUPPORTED_ROUTING_CONSTRAINTS"/>
<xsd:enumeration value="EXCPT_USERLABEL_IN_USE"/>
<xsd:enumeration value="EXCPT_COMM_FAILURE"/>
<xsd:enumeration value="EXCPT_UNSUPPORTED_COMPRESSION_FORMAT"/>
<xsd:enumeration value="EXCPT_UNSUPPORTED_PACKING_FORMAT"/>
<xsd:enumeration value="EXCPT_INVALID_FILTER_DEFINITION"/>
<xsd:enumeration value="EXCPT_INVALID_TOPIC"/>
<xsd:enumeration value="EXCPT_NOTIFICATION_SERVICE_PROBLEM"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="ProcessingFailureException_T">
<xsd:annotation>
<xsd:documentation>
A coarse grain approach is adopted for capturing exceptions as well. This has the advantage of making the catching of exceptions fairly generic. This is similar to the TMF 814 Corba interface. In the future, each interface operation could implement a specific set of the exceptions.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="exception" type="ExceptionType_T">
<xsd:annotation>
<xsd:documentation>The exception type based on the enumeration
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="reason" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>A string indicating further details about the exception. It is a free format string filled by the OS.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="vendorExtensions" type="ExceptionVendorExtensions_T" minOccurs="0">
<xsd:annotation>
<xsd:documentation>A string indicating further details about the exception. It is a free format string filled by the OS.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="extVersion" type="xsd:string" use="optional"/>
<xsd:attribute name="extAuthor" type="xsd:string" use="optional"/>
<xsd:attribute name="tmf854Version" type="TMF854_Version_T" use="optional"/>
</xsd:complexType>
</xsd:schema>
我试图在网上找到错误的详细原因,但直到现在都没有成功。如果这里有人可以提供帮助将不胜感激。提前感谢大家。
P.S.:如果需要更多信息,请告诉我。
【问题讨论】:
标签: web-services wsdl cxf