Update Line in cucm 8 C#

Version 1
    This document was generated from CDN thread

    Created by: Sergey Knyazev on 16-01-2012 02:54:44 PM
    i'm trying to update line in CUCM 8 using this code:
     
    UpdateLineReq req =new UpdateLineReq();
                XCallForwardAll fw = new XCallForwardAll();
                fw.destination = frwNumber;
                
                XFkType partition=new XFkType();
                partition.Value="Local_PT";
                fw.callingSearchSpaceName = partition;
                XDirn dirn=new XDirn();
                XPhoneLine upd=new XPhoneLine();
                XPhoneLine[] upds=new XPhoneLine[1];
                dirn.pattern="2223";
                dirn.routePartitionName=partition;
                upd.dirn=dirn;
                upds[0]=new XPhoneLine();
                upds[0]=upd;
                req.Items = upds;
                req.callForwardAll = fw;
                axl.updateLine(req);
     
    but all the time get same error
    "There was an error generating the XML document"
    anyone can help me in this issue?
    Thanks for any help.

    Subject: RE: Update Line in cucm 8 C#
    Replied by: AARON ARCHAMBAULT on 18-01-2012 11:54:12 AM
    fw.callingSearchSpaceName = partition;

    This line is incorrect as the CSS will not be the partition name, maybe this is causing the error.

    Subject: Re: New Message from AARON ARCHAMBAULT in Administration XML (AXL) - Admini
    Replied by: Simon Granger on 18-01-2012 11:59:29 AM
    I pasted the wrong axlsend function, the correct one does read ....db
    ver=8.0

    I think I need to check and update post tomorrow.

    Simon

    On 18 Jan 2012, at 16:54, "Cisco Developer Community Forums" <cdicuser@developer.cisco.com
    > wrote:

    > AARON ARCHAMBAULT has created a new message in the forum
    > "Administration XML Questions":
    >
    > --------------------------------------------------------------
    > fw.callingSearchSpaceName = partition;
    >
    > This line is incorrect as the CSS will not be the partition name,
    > maybe this is causing the error.
    > --
    > To respond to this post, please click the following link:
    >
    > <http://developer.cisco.com/web/axl/forums/-/message_boards/view_message/5024306
    > >
    >
    > or simply reply to this email.

    Registered No. 755780 England
    Registered Office: FM Insurance Company Limited
    1 Windsor Dials, Windsor,
    Berkshire, UK, SL4 1RS
    Regulated by the Financial Services Authority.
    VAT No. G.B.: 792 4276 02

    Subject: RE: Update Line in cucm 8 C#
    Replied by: Sergey Knyazev on 18-01-2012 02:04:48 PM
    Forgot to add :
    XFkType Css = new XFkType();
    Css.Value = "Local_CSS";
    fw.callingSearchSpaceName = Css;

    but anyway this is not a problem.
    because error in css name will be response like this "css not exists"

    and i get
    "There was an error generating the XML document"
    this tell about problem in request objects.

    Subject: RE: Update Line in cucm 8 C#
    Replied by: Sergey Knyazev on 18-01-2012 04:46:01 PM
    Code Fixed

                ItemsChoiceType14[] ic = new ItemsChoiceType14[2];
                ic[0] = ItemsChoiceType14.routePartitionName;
                ic[1] = ItemsChoiceType14.pattern;
               

                XFkType part = new XFkType();
                part.Value = "Local_PT";
                req1.Items = new object[2];
                req1.Items[0] = part;
                req1.Items[1] = "2223";
                req1.ItemsElementName = ic;
                req1.alertingName = "hi";
                axl.updateLine(req1);

    Anyway thanks for help.