Using C# AXL - How to get Associated Devices for Push User?

Version 1
    This document was generated from CDN thread

    Created by: David Latty on 21-10-2009 03:39:11 PM
    I am able to push to phones <CiscoIPPhoneExecute>
     
    I am able to acccess the call manager with the .NET AXLAPIService (AXLAPIService.cs)
     
    My problem is there isnt a lot of accessible info on each method call (including params, comments, etc). I am looking to query to find all devices associated with a specific push user. Can somene show me the code (not just a blurt of theory).
     
    Thanks ~

    Subject: RE: Using C# AXL - How to get Associated Devices for Push User?
    Replied by: David Latty on 21-10-2009 05:36:08 PM
    So I am able to query a user (the push user) and retrieve the phones associated with the following (raw) code
     
     
     
     
     
     
     
     
     
     
     
     
     

    <font size="2">
     
    </font>
     
    GetUserReq uReq = new GetUserReq
    ();<font size="2">
    uReq.userid =
    </font>
     
    "XXX"
    ;<font size="2">
     
    </font>
     
    GetUserRes
    uRes = s.getUser(uReq);<font size="2">
     
    </font>
     
    GetUserResReturn
    uResReturn = uRes.@return;<font size="2">
     
    </font>
     
    XUser
    xUser = uResReturn.user;<font size="2">
     
    </font>
     
    string
    [] devices = xUser.associatedDevices;<font size="2">
     
    </font>
     
    for (int
    i = 0; i < devices.Count(); i++)
    {
    <font size="2">
     
    </font>
     
    Console.WriteLine(string.Format("Device {0}: {1}"
    , i, devices));<font size="2">
     
    </font>
     
    ListPhoneByNameReq pReq = new ListPhoneByNameReq
    ();
    pReq.searchString = devices;
    <font size="2">
     
    </font>
     
    ListPhoneByNameRes
    pRes = s.listPhoneByName(pReq);<font size="2">
     
    </font>
     
    ListPhoneResponsePhone
    [] phones = pRes.@return;<font size="2">
     
    </font>
     
    for (int
    j = 0; j < phones.Count(); j++)
    {
    <font size="2">
     
    </font>
     
    Console.WriteLine(string.Format("Phone {0}: {1}"
    , j, phones.name));


     
    Now I just need to get the device IP from the device name (SEP%%%). I saw something about RisPort. Anyone have any info? I mean really ... do I have to use another API/service other than axl just for a device name?

    Subject: RE: Using C# AXL - How to get Associated Devices for Push User?
    Replied by: David Staudt on 21-10-2009 06:06:54 PM
    Yes, you will need to use the Risport web service API to get real-time information on the device, including registration status and IP address.
     
    Serviceability SOAP docs: http://developer.cisco.com/web/sxml/docs
    Samples: http://developer.cisco.com/web/sxml/wikidocs?src=/wiki/display/SXML/Howto+Articles