Latest post Wed, Feb 27 2013 12:51 PM by HastaProd. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • Mon, Feb 25 2013 1:44 PM

    • HastaProd
    • Not Ranked
    • Joined on Mon, Feb 25 2013
    • Posts 18
    • Points 180

    Using Avid Interplay Web Services to checkin media

    Does someone has an example of .NET code to checkin an asset (for example a mxf with 1 video and 8 audios) into an avid interplay via the web services?

    Thanks.

  • Mon, Feb 25 2013 7:57 PM In reply to

    • rgonsalv
    • Not Ranked
    • Joined on Thu, Aug 30 2012
    • Posts 2
    • Points 15

    Re: Using Avid Interplay Web Services to checkin media

    HastaProd,

    I'm asking around here and will let you know what I find...

    - RobG

  • Mon, Feb 25 2013 10:07 PM In reply to

    • robg
    • Top 500 Contributor
    • Joined on Fri, Nov 4 2005
    • Tewksbury, MA
    • Posts 494
    • Points 5,605
    • Avid Developer Moderator
      Avid Employee

    Re: Using Avid Interplay Web Services to checkin media

     

    HastaProd,

    Below is some sample code for VS2010 that checks an AAF masterclip into Interplay Production using Web Services.

    BTW: What version of Visual Studio are you using?

    Note that the essence file is referred to by the AAF file (i.e. the actual .mxf media lives on an ISIS storage system).

    // create the port object
    AssetsPortTypeClient port = new AssetsPortTypeClient();

    // setup the crendentials
    UserCredentialsType credentials = new UserCredentialsType();
    credentials.Username = "administrator";
    credentials.Password = "admin";

    // create the aaf object
    CheckInAAFType aaf = new CheckInAAFType();

    // read in the AAF file
    byte[] bytes = File.ReadAllBytes("c:\\folder\\test.aaf");
    aaf.AAF = bytes;

    // specify the folder
    aaf.InterplayURI = "interplay://AVIDWG/Incoming Media/"; 

    // check in the sequence
    CheckInAAFResponseType response = port.CheckInAAF(credentials, aaf);

    // print out the response
    if (response.Errors != null && response.Errors.Length>0)
      Console.WriteLine("error: " + response.Errors[0].Message +
      ", " + response.Errors[0].Details);
    else
      Console.WriteLine("InterplayURI: " + response.InterplayURI);

    The full source code is attached (rename to InterplayWSSampleCode.zip) and unzip.

    - Rob

     

     

  • Mon, Feb 25 2013 10:44 PM In reply to

    • HastaProd
    • Not Ranked
    • Joined on Mon, Feb 25 2013
    • Posts 18
    • Points 180

    Re: Using Avid Interplay Web Services to checkin media

    Thanks for your help. I was close to the solution, your help is really helpfull but now the problem is how to make the AAF file...

    http://community.avid.com/forums/p/117303/676739.aspx#676739

    I'm on VS 2012 for couple of days

  • Tue, Feb 26 2013 9:22 AM In reply to

    • HastaProd
    • Not Ranked
    • Joined on Mon, Feb 25 2013
    • Posts 18
    • Points 180

    Re: Using Avid Interplay Web Services to checkin media

    Back after some testing : even with the WS wsdl imported in the project, AssetsPortTypeClient does not exist into the Avid Interplay Web Services....

  • Tue, Feb 26 2013 9:28 AM In reply to

    • HastaProd
    • Not Ranked
    • Joined on Mon, Feb 25 2013
    • Posts 18
    • Points 180

    Re: Using Avid Interplay Web Services to checkin media

    This seems to be ok, but without AAF I can't tell if it really works :

     

    // create the port object
    
    {
    	InterplayWS.Assets port = new InterplayWS.Assets();
    
    	// setup the crendentials
    	InterplayWS.UserCredentialsType credentials = new InterplayWS.UserCredentialsType();
    	credentials.Username = "administrators";
    	credentials.Password = "Avid123!";
    
    	port.UserCredentials = credentials;
    
    	// create the aaf object
    	InterplayWS.CheckInAAFType aaf = new InterplayWS.CheckInAAFType();
    
    	// read in the AAF file
    	byte[] bytes = System.IO.File.ReadAllBytes("c:\\folder\\test.aaf");
    	aaf.AAF = bytes;
    
    	// specify the folder
    	aaf.InterplayURI = "interplay://AVIDWG/Incoming Media/";
    
    	// check in the sequence
    	InterplayWS.CheckInAAFResponseType response = port.CheckInAAF(aaf);
    
    	// print out the response
    	if (response.Errors != null && response.Errors.Length > 0) {
    		Console.WriteLine(("error: " + response.Errors(0).Message + ", ") + response.Errors(0).Details);
    	} else {
    		Console.WriteLine("InterplayURI: " + response.InterplayURI);
    	}
    }
  • Tue, Feb 26 2013 10:48 PM In reply to

    • robg
    • Top 500 Contributor
    • Joined on Fri, Nov 4 2005
    • Tewksbury, MA
    • Posts 494
    • Points 5,605
    • Avid Developer Moderator
      Avid Employee

    Re: Using Avid Interplay Web Services to checkin media

    HastaProd,

    I tracked down the difference between our two source samples. The difference is due to the way the Web Reference is added to the project.

    Method 1: Right-click on the project, choose Add Service Reference, type in the URL to the WSDL, add the namespace, click OK.

    Method 2: Right-click on the project, choose Add Service Reference, click on Advanced, click Add Web Reference, type in the URL to the WSDL, add the namespace, click OK.

    Note that these methods produce different syntax. For example

    Method 1AssetsPortTypeClient port = new AssetsPortTypeClient();

    Method 2: InterplayWS.Assets port = new InterplayWS.Assets();

    I used Method 1 to create the reference. Did you use Method 2?

    - Rob

     

  • Wed, Feb 27 2013 12:51 PM In reply to

    • HastaProd
    • Not Ranked
    • Joined on Mon, Feb 25 2013
    • Posts 18
    • Points 180

    Re: Using Avid Interplay Web Services to checkin media

    Indeed, I used method 2, as described in MS_DotNET_Interplay_WS_Client.pdf.

    Thanks for making it more precise.

Page 1 of 1 (8 items)

© Copyright 2011 Avid Technology, Inc.  Terms of Use |  Privacy Policy |  Site Map |  Find a Reseller