Administration XML Developer Forums

« Back to Administration XML Questions

XmlInclude or SoapInclude attribute in .net

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi
 
I'm trying to update a hunt list using the .net API but get the following error
 
"The type XHuntListMembers was not expected. Use
the XmlInclude or SoapInclude attribute to specify types that are not known
statically."
 
I've managed to find out that this is a problem with .net in that you have to specify the type of any derived classes used in the XML using XmlInclude or SoapInclude
 
What I can't work out is where in the autogenerated vb.net file I need to put it.
 
Does anyone know if it goes on the call itself (below) or somewhere else ?

 
    <System.Web.Services.Protocols.SoapDocumentMethodAttribute("CUCMemoticonB 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", :="http://www.cisco.com/AXL/API/8.0")> ByVal updateHuntList1 As UpdateHuntListReq) As <System.Xml.Serialization.XmlElementAttribute("updateHuntListResponse", :="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
 
Really appreciate any pointers
 
Thanks
 
Mike