Copy Device, RPHONE TO XPHONE

Version 1
    This document was generated from CDN thread

    Created by: Fouad Mouffok on 14-12-2012 10:44:57 AM
    Hi, The idea is to create a new device by copying another one, just changing some properties like DN, MAC, ... Using C# and the Proxy class, I'm unable to fill my new device (XPhone) with the properties of the device template which I got from an AXL Getphone Request(RPhone). Explicit and Implicit Casting isn't working between XPhone and RPhone. :-( E.g: Xphone.Xbusylampfieds=RPhone.Xbusylampfields or Xphone.lines=RPhone.lines How are you handling this in your code? Maybe it's not best way to do this, any advise? any example is welcome Regards, ./WM

    Subject: RE: Copy Device, RPHONE TO XPHONE
    Replied by: David Staudt on 14-12-2012 01:49:59 PM
    The AXL API in 8.0 - in an effort to make the interface easier to understand and use (naturally) - did away with much of the 'object re-use' concept, whereby XML patterns were used in both read/write operations, or re-used across various requests.  As many of the fields needed for addXXX requests were inappropriate or unused for corresponding getXXX requests (and vice versa), work was done to clean these up, and ensure that only the needed fields were present in the schema for read vs. write requests.

    This of course has the side effect of making it somewhat more difficult to directly use the results of a read as the basis for a write, if you are used to re-using the objects created by a WSDL code framework (e.g. .NET).  I believe you will need to create the needed new write object and make assignements on a field by field basis to accomplish what you are after.