NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Software Development Kit (SDK) and API Discussions

.NET API does wrong serialization? cDOT (ontap-8-2-2.dll, ontap-8-3.dll)

Ricardo2F06FA
3,083 Views

Hello,

 

i have a problem to filter the resultset with the .NET implementation of the API.

 

when i try to filter the QTree result with:

NaFiler filer = new NaFiler("Server");

filer.Protocol = ServerProtocol.HTTPS;

filer.Credentials = new System.Net.NetworkCredential(@"…");

filer.ForceUseUnsecure = true;

var rObj = (new NetApp.Filer.Cluster.Qtree.QtreeListIter() { Query = new NetApp.Filer.Cluster.Qtree.QtreeInfo() { Volume = "server_prj01" } }).Invoke(filer);

 

 

i get all qtrees from all volumes because the .NET API does a wrong serialization.

 

this is what the .NET API sent to the Server: (missing <qtree-info> tag)

<qtree-list-iter>
  <query>
    <id p3:nil="true" xmlns:p3="http://www.w3.org/2001/XMLSchema-instance" />
    <volume>server_prj01</volume>
  </query>
</qtree-list-iter>

 

but the API must send something like this:  (this works as expected with zapi explorer)

<qtree-list-iter>
  <query>
    <qtree-info>
      <volume>server_prj01</volume>
    </qtree-info>
  </query>
</qtree-list-iter>

 

is this a known problem? is there a workaround or update planed?

 

thank you

1 REPLY 1

rtoubali
2,956 Views

Hi there,

 

how does the header llook like? I would like to understand which libraries you are using.

 

e.g.:

 

using System;
using System.Text;
using System.Collections.Generic;

using NetApp.Manage;

[...]

 

 

###

or e.g.

 

using NetApp;
using NetApp.Filer;
using NetApp.Filer.System;

 

Thank you,

Rabé

 

Public