When following the steps outlined in Get started with the BlackBerry Administration API to create the proxy file for use in a C# application, you are left with a proxy.cs file to add to the BlackBerry Administration API application. While this file will allow all present BlackBerry Administration API Web Service types and commands to be referenced for your application, it does introduce some latency issues that will be apparent each time the application is executed. This issue occurs because an XmlSerializer runs on the proxy.cs file and generates serialization code and a serialization assembly every time the code is run. Because the proxy.cs file does not change between executions of the application, only between BlackBerry Administration API versions, it would make sense to generate these serialization files manually once to prevent this latency from occurring for each subsequent execution; this can be achieved by the following steps:
Open a Visual Studio command prompt ex Start > All Programs > Microsoft Visual Studio 2008 > Visual Studio Tools > Visual Studio 2008 Command Prompt Then change directories to the folder housing the wsdl.exe utility. If you are using Microsoft Visual Studio 2008 version you can find the wsdl.exe file in the following bin directory “C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin”
For example, find: public partial class BAAService replace with: [System.Xml.Serialization.XmlSerializerAssemblyAttribute(AssemblyName = "proxy.XmlSerializers")]public partial class BAAService
Regenerate proxy.dll library by calling the following from the existing command prompt:
csc /t:library /out:proxy.dll proxy.cs
Remove existing BlackBerry Administration API client proxy source (proxy.cs) file from the BlackBerry Administration API client application and add a reference to the proxy.dll and proxy.XmlSerializers.dll files.
The application should compile without any code changes
The next time the application is run or debugged there should be some noticeable lag removed.