Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using GetLatestExample.InterplayWS;
- // Example code for the GetLatest() call into Interplay Production Web Services
- //
- // The service reference to the IPWS endpoint needs to be added:
- // 1. Right-click on the project name in the Solution Explorer
- // 2. Choose Add Service Reference
- // 3. Type in the URL to the IPWS Assets WSDL, example: <http://<server>/services/Assets?wsdl
- // 4. Add the namespace InterplayWS
- // 5. Click OK
- //
- // Note that the maxReceivedMessageSize size will need to be increased for AAF files.
- //
- // This can be done by adding a parameter to the binding setting in App.config:
- // <binding name="Assets_AssetsPort" messageEncoding="Mtom" maxReceivedMessageSize = "1000000"/>
- //
- namespace GetLatestExample
- {
- class Program
- {
- static void Main(string[] args)
- {
- // create the port object
- AssetsPortTypeClient port = new AssetsPortTypeClient();
- // setup the credentials
- UserCredentialsType credentials = new UserCredentialsType();
- credentials.Username = "username";
- credentials.Password = "password";
- // create the request object
- GetLatestType request = new GetLatestType();
- // specify the folder
- request.InterplayURI = "interplay://WGC?mobid=060a2b340101010101010f0013-000000-545fc90cdb4e0002-060e2b347f7f-2a80";
- // get the latest
- GetLatestResponseType response = port.GetLatest(credentials, request);
- // print out the response
- if (response.Errors != null && response.Errors.Length > 0)
- Console.WriteLine("error: " + response.Errors[0].Message +
- ", " + response.Errors[0].Details);
- else
- {
- File.WriteAllBytes("c:\\folder\\latest.aaf", response.File);
- Console.WriteLine("Success");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement