2

我在调用从 Cisco WSDL 文件生成的代码时遇到以下错误,希望有人能发现我哪里出错了。

我已经在这里查看了类似问题的答案,但我显然仍然遗漏了一些东西。

“不期望类型 UpdateHuntListReq。使用 XmlInclude 或 SoapInclude 属性指定静态未知的类型。”

这是我得到错误的地方:

    <System.Web.Services.Protocols.SoapDocumentMethodAttribute("CUCM:DB ver=8.0 updateHuntList", _
Use:=System.Web.Services.Description.SoapBindingUse.Literal, _
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Bare)> _
        Public Function updateHuntList(<System.Xml.Serialization.XmlElementAttribute("updateHuntList", [Namespace]:="http://www.cisco.com/AXL/API/8.0", [Type]:=GetType(NameAndGUIDRequest))> ByVal updateHuntList1 As UpdateHuntListReq) As <System.Xml.Serialization.XmlElementAttribute("updateHuntListResponse", [Namespace]:="http://www.cisco.com/AXL/API/8.0")> StandardResponse
            Dim results() As Object = Me.Invoke("updateHuntList", New Object() {updateHuntList1})
            Return CType(results(0), StandardResponse)
        End Function

这是 UpdateHuntListReq 类的顶部:

 <System.SerializableAttribute(), _
System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://www.cisco.com/AXL/API/8.0"), _
XmlInclude(GetType(NameAndGUIDRequest))> _
Partial Public Class UpdateHuntListReq
        Inherits NameAndGUIDRequest

        Private newNameField As String
        Private descriptionField As String
        Private callManagerGroupNameField As XFkType
        Private routeListEnabledField As String
        Private voiceMailUsageField As String
        Private itemsField() As XCommonMembersExtension

    .... Rest of the class

谢谢你的帮助

麦克风

4

0 回答 0