Forum Discussion

jvet_48281's avatar
jvet_48281
Icon for Nimbostratus rankNimbostratus
Apr 06, 2018

Serialization error calling get_statistics_by_virtual

Using iControl for .NET v11.3 with LTM 12.1.2, I am attempting to use get_statistics_by_virtual for a Client SSL Profile using the iControl for Microsoft.NET.

Is this a WSDL definition issue for .NET? I am calling a number of methods that take jagged arrays, but this is the only one where I construct the arrays rather than passing in one I received from another iControl method, and the only one defined as String[][].

Note: f5Cp acquired earlier as LocalLBProfileClientSSL
var pArray = new string[1];
var pVsArray = new string[1][];
pArray[0] = pName;
pVsArray[0] = new string[1];
pVsArray[0][0] = vsName;
var profileClientSslStatistics = f5Cp.get_statistics_by_virtual(pArray, pVsArray);

.. stack trace and exception information mostly removed as this site kept identifying that as SPAM

  Message=There is an error in XML document (13, 2).
       Message=The specified type was not recognized: name='Array', namespace='http://schemas.xmlsoap.org/soap/encoding/', at .
  • Here is more of the text of the question I was trying to pose:

    Using iControl for .NET v11.3 with LTM 12.1.2, I am attempting to use get_statistics_by_virtual for a Client SSL Profile using the iControl for Microsoft.NET.

    Is this a WSDL definition issue for .NET? I am calling a number of methods that take jagged arrays, but this is the only one where I construct the arrays rather than passing in one I received from another iControl method, and the only one defined as string[][].

    Note: f5Cp acquired earlier as LocalLBProfileClientSSL
    var pArray = new string[1];
    var pVsArray = new string[1][];
    pArray[0] = pName;
    pVsArray[0] = new string[1];
    pVsArray[0][0] = vsName;
    var profileClientSslStatistics = f5Cp.get_statistics_by_virtual(pArray, pVsArray);
    
    System.InvalidOperationException was unhandled
      Message=There is an error in XML document (13, 2).
      Source=System.Xml
      StackTrace:
           at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
           at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
           at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
           at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
           at iControl.LocalLBProfileClientSSL.get_statistics_by_virtual(String[] profile_names, String[][] virtual_names) in c:\Dev\github\f5-icontrol-library-dotnet\iControl\Interfaces\LocalLB\LocalLBProfileClientSSL.cs:line 1952
    ..remaining stack trace removed..
    
    InnerException: 
           Message=The specified type was not recognized: name='Array', namespace='http://schemas.xmlsoap.org/soap/encoding/', at .
    
  • I am not a .net guy, and I haven't messed with the soap interface in quite some time. But in python, I get this data just fine with this call:

    import bigsuds
    b = bigsuds.BIGIP('ltm3.test.local')
    x = b.LocalLB.ProfileClientSSL.get_statistics_by_virtual(['cssl'],[['testvip']])
    

    The profile is a list of names, the virtuals is a list of lists, which I think in .net is a 2-d array, but you'd know better than I.