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

时间:2012-08-07 13:51:13

标签: xml vb.net

我在调用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

感谢您的帮助

麦克

0 个答案:

没有答案