Web21C SDK: do less achieve more

Please see our important announcement.

Cheap as chips

A guide on how to get the Web21C SDK working with freely available software, no not Mono (at least for now), but Visual C# 2005 Express Edition because not everyone has Visual Studio 2005!

So this isn't the easiest way to use the SDK, but it sure is the cheapest

What you need:

  • Windows XP SP2
  • Visual C# Express 2005
  • .NET Framework 2.0 SDK
  • Web Services Enhancements (WSE) 3.0
  • The Web21C SDK from http://web21c.bt.com
  • An Internet Connection
  • A cup of tea or coffee as this will take a bit of time.
  1. From your copy of Windows XP download the setup for Visual C# Express 2005 and run it, this should download and install the .NET Framework 2.0 if you don't already have it and install the C# Express IDE and run it at least once.
  2. Install the .NET Framework 2.0 SDK (if you don't already have it), because the Web21C SDK needs to use the .NET SDK certificate manager - certmgr.exe (you just need to install the tools, not the documents or the samples)
  3. Install the Web Services Enhancements (WSE) 3.0; select the Visual Studio Developer option.
  4. Have a cup of tea
  5. Download the Web21 SDK from the http://web21c.bt.com website and extract it from it's zip file and run the executable. This is where the fun starts.
  6. When you get a prompt saying that you haven't run visual studio yet, just press OK. The toolbox installer should run v.quickly as it isn't doing anything (I reckon this will be fixed in a later release of the SDK)
  7. The setup should say it's complete except that you might get a warning saying the certificates you need haven't been installed. At this point just press ok. complete the installation and close the BT SDK Home application (for now).
  8. From the start menu navigate to 'All Programs -> BT -> SDK' and run the BT SDK Certificate Viewer, if you have any missing certificates then you need to install them, if you get an alert saying the application cannot find certmgr.exe then make sure the .NET SDK has been installed correctly.
  9. Now you can run the BT SDK Home application (it's also in 'All Programs -> BT -> SDK' on your start menu) and register an application at the web21c.bt.com website, register your application certificate and generate your wse3policyCache.config (or follow the registration application instructions on the Web21C website)
  10. Now you nearly have everything setup, have another cup of tea
  11. Nearly there ... now you should generate your own app.config as all the Visual Express 2005 editions don't have any Add-in support and therefore don't have WSE 3.0 Support built in. So it's just easier to generate your own app.config like this (I'm assuming you're just creating a winform application):
            <?xml version='1.0' encoding='utf-8'?>
            <configuration>
              <configSections>
                <section name='microsoft.web.services3'
                  type='Microsoft.Web.Services3.Configuration.WebServicesConfiguration,
                  Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
                  PublicKeyToken=31bf3856ad364e35' />
              </configSections>
              <microsoft.web.services3>
                <policy fileName='wse3policyCache.config' />
                <security>
                  <x509 storeLocation='CurrentUser' />
                </security>
              </microsoft.web.services3>
            <configuration>
    
  12. Start Visual C# Express 2005 (at last!), now all you need to do is to add the components to the toolbox. Create a new Windows Application, go into design view and have a look at the toolbox. Right click on an empty spot and create a new tab called 'Web21C SDK'. Now right click within that tab and choose add items, a dialog box should appear and you need to browse to the location of the btsdkcomponents.dll (it should be in the bin directory of where you installed the SDK usually C:\Program Files\BT\BT SDK Release 1.0.2\Bin. Select one of the highlighted Web21C components and all of them should be selected. If you click on OK now they *should* appear on the Toolbox. (I think this step will be completed at install time in future version of the SDK on Express editions of Visual Studio)
  13. Drag a component onto the design view (I picked VoiceCall) and you should see the SDK components being added as references to your project. You also need to add the WSE3 library as a reference (i.e. Microsoft.Web.Services3).
  14. Copy and paste your wse3policyCache.config (set this file to always be part of the project output!) and app.config to your project, write some code like this and make some phones ring.
    namespace WindowsApplication1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
              InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
              voiceCall1.StartCall('44xxxxxxxx', '44xxxxxxxx');
            }
      }
    }

Once you're at this step you could just use this project as a template for all future projects. I'm going to try and get Visual Web Developer working tomorrow wish me good luck!

Cheap as chips - Part deux

So as promised I played around with Visual Web Developer Express edition to figure out how to use it with the Web21C SDK. It was surprisingly similar to the way I got the SDK working with Visual C# Express, so I won't go into long and dry step by step details bet you're glad about that!

Essentially all the steps are the same apart from step 11, which was creating your own app.config. Web projects use a web.config file rather than an app.config (why they can't have one config to rule them all is beyond me!), but here's what it should look like:

        <?xml version='1.0'?>
        <configuration>
            <configSections>
                <section name='microsoft.web.services3'
                    type='Microsoft.Web.Services3.Configuration.WebServicesConfiguration,
                    Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
                    PublicKeyToken=31bf3856ad364e35'/>
            </configSections>
            <system.web>
                <webServices>
                    <soapExtensionImporterTypes>
                    <add type='Microsoft.Web.Services3.Description.WseExtensionImporter,
                        Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
                        PublicKeyToken=31bf3856ad364e35'/>
                    </soapExtensionImporterTypes>
                </webServices>
                <compilation>
                    <assemblies>
                        <add assembly='Microsoft.Web.Services3,
                            Version=3.0.0.0, Culture=neutral,
                            PublicKeyToken=31BF3856AD364E35'/>
                        <add assembly='System.Windows.Forms, Version=2.0.0.0,
                            Culture=neutral,
                            PublicKeyToken=B77A5C561934E089'/>
                    </assemblies>
                </compilation>
            </system.web>
            <microsoft.web.services3>
                <security>
                    <x509 storeLocation='CurrentUser'/>
                </security>
                <policy fileName='wse3policyCache.config'/>
            </microsoft.web.services3>
        </configuration>

And finally in step 12 copy the web.config you created into your web project rather than the app.config you didn't create this time (I know this is obvious, but for the sake of completeness I thought I better mention it)

Also it's been pointed out to me that the guide I wrote to get Visual C# Express working with the Web21C SDK should equally apply to Visual Basic Express and quite possibly the other express editions of visual studio. I haven't tried them myself, but if you do get them working with the SDK then i'd love to know!