help with VS2010 - just to get me started

Version 1
    This document was generated from CDN thread

    Created by: MATHEW BEALL on 02-11-2010 03:17:21 PM
    Hi Folks,
     
    Can someone post the code for VS2010 and the 7.1 AXLAPI set?  I am able to load in the wsdl into VS2010 now and will probably just use VB for the coding.
     
    I just need some beginning code that would let me do a getUser("mathew") and display the results.
     
    I am not quite sure how to set the username/password or ip address of the CUCM server.  I read through the readme and tried to add what it said but it didn't quite work and I am not versed enough to figure that out by myself and google is no help.
     
    Once I get a basic function working I am confident I can muddle through the rest. 
     
    Thanks in advance,
     
    Matt

    Subject: RE: help with VS2010 - just to get me started
    Replied by: Kenneth Sinfield on 28-02-2011 10:13:23 AM
    Hi Mathew,

    well I would give up on the 7.1 WSDL.. I just reverted to using 7.0 on a CUCM 7.1.3 and it works fine.

    If you follow the README file doing the following:

    1. Replace the constructor with the one including ip username and password
    2. Add the certificate overload
    3. Add the webget overload

    Then just create a new VS project:

    1. Add the generated .CS file in as an existing item
    2. Add references for System.Web.Services and System.XML.
    3. Start writing code


                AXLAPIService axl = new AXLAPIService("x.x.x.x", "administrator", "xxxxxxx");

                GetPhoneReq req = new GetPhoneReq();

                ListPhoneByNameReq req3 = new ListPhoneByNameReq();
                req3.searchString = "SEPXXXXXXXXXXXX";
                ListPhoneResponsePhone[] phones = axl.listPhoneByName(req3).@return;
               
                foreach (ListPhoneResponsePhone phone in phones)
                {
                    Console.WriteLine(phone.name);
                }