UNSOLVED

JTabert

updated

18 years ago

J

JTabert

3 Posts

0

3894

April 30th, 2009 05:00

Error XAM.NET SDK

I'm receiving the an error when I try to create/commit an XSet using the .NET XAM SDK. (same thing with TestHarness .NET example)

1033: "xam/operation not allowed"

Centera

US2 Server 128.221.200.63

PEA-Files tested

us2_profile3_rdqeDcw.pea

xamconnect.pea

what I am doing wrong?

Thanks in advance.

Jürgen

  • mckeown_paul

    409 Posts

    314

    0

    Posted April 30th, 2009 05:00

    Jürgen

    I'm not sure why it's complaining but could you try a few things first

    download the PEA file again and try again

    could you enable SDK logging and let us the log file

    are you just creating an xset then commiting it?  Could you post a code fragment that shows what you are doing?

  • JTabert

    3 Posts

    313

    0

    Posted April 30th, 2009 14:00

    requested information

    connect and authentication seems to be ok

    ...

    string connectString = "snia-xam://centera_vim!128.221.200.63?c:\\peaFiles\\xamconnect.pea";

    XAMLibrary xlib = XAMLibrary.Instance;

    xlib.LogLevel = Constants.LOG_ALL;

    xlib.LogPath = "sdk.log";

    xlib.CreateField("com.emc.centera.application.name", "my application", false);

    xlib.CreateField("com.emc.centera.application.version", "3.5", false);

    using (XSystem xsys = xlib.CreateXSystem(connectString))

    {

    xsys.Authenticate();

    ...

    xset function throws an error on commit

    ...

    XSet xset = inXSystem.CreateXSet();

    xset.CreateField("value1", "this is a test string");

    byte[] vDataArray = new byte[100];

    for (int i = 0; i < vDataArray.Length; i++)

    {

    vDataArray = (byte)(1 + i);

    }

    XStream xstream = xset.CreateXStream("stream1", Constants.DEFAULT_MIME_TYPE);

    xstream.Write(vDataArray, 0, vDataArray.Length);

    xstream.Dispose();

    XUID xuid = xset.Commit(); //THROWS ERROR 1033

    xset.Dispose();

    return xuid;

    ...

    log file data

    Time                   FormattedTime                    LogLevel      PID.Thread        Component       Message

    1241124470500    2009-04-30 20:47:50.500       [none]          2740.3116         [---]                   XAM SDK Logger Version 1.0.83

    *** ERROR **************************************************************************************************************************************************

    1241124477484    2009-04-30 20:47:57.484       [error]           2740.3116         [api_status]      ERROR: xam/operation not allowed (1033)

    ****************************************************************************************************************************************************************

    Thanks

    Jürgen

  • gstuartemc

    2 Intern

    •

    417 Posts

    313

    0

    Posted April 30th, 2009 15:00

    There is a bug in the Test Harness sample code related to Authentication. This has been fixed in the repository but a new release package has not been generated yet.

    xsys.Authenticate();

    will re-authenticate you anonymously as no parameters are given. This leads to loss of write privileges (as the anonymous profile does not have this enabled).

    The code should read

    if (xsys.Authenticated)

         xsys.Authenticate();

    That should fix your problem!

  • JTabert

    3 Posts

    314

    0

    Posted May 5th, 2009 13:00

    Thank you for your advice. That was the problem.

    if (!xsys.Authenticated) xsys.Authenticate();

    Sincerely,

    Jürgen