Structure of XML request for addPhone - CUCM 6.1.2

Version 1
    This document was generated from CDN thread

    Created by: MIKE WILCOX on 25-02-2009 11:41:33 PM
    I am trying to add a phone trhough the AXL API. When I submit the request to the server I get back an error 5000, which the docs say is unknown error most likely caused by a bad format of the request.
     
    WHat am I missing or have misformatted in the request below?
     
    Thanks,
     
    Mike
     
    The VARIABLE is replaced by the appropriate data in the actual request.
     
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
     
    <addPhone>
    <newPhone>
     
    <name> VARIABLE </name>
    <description> VARIABLE </description>
    VARIABLE
    <model> VARIABLE </model>
    VARIABLE
    <class> Phone </class>
    VARIABLE
    User
    <callingSearchSpaceName> VARIABLE </callingSearchSpaceName>
    <devicePoolName> VARIABLE </devicePoolName>
    <locationName> VARIABLE </locationName>
    <securityProfileName> VARIABLE </securityProfileName>
    <softkeyTemplateName> VARIABLE </softkeyTemplateName>
    <ownerUserId> VARIABLE </ownerUserId>
    <allowCtiControlFlag> VARIABLE </allowCtiControlFlag>
    <location>.VARIABLE </location>
     
    </newPhone>
    </addPhone>
     
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
     

    Subject: RE: Structure of XML request for addPhone - CUCM 6.1.2
    Replied by: MIKE WILCOX on 26-02-2009 05:17:04 AM
    (Reference: CM6 schema)
     
    There are some immediate things I can see:
     
    - Missing element
    - Missing <class> element
    - Missing element
    - Missing element
    - Make sure you are submitting a UID, not a name, if you are using <location> vs <locationName>


    David,
     
    Which are the missing elements you have listed besides the <class> element?
     
    Thanks!
     
    Mike

    Subject: RE: Structure of XML request for addPhone - CUCM 6.1.2
    Replied by: David Staudt on 26-02-2009 05:13:36 AM
    (Reference: CM6 schema)
     
    There are some immediate things I can see:
     
    - Missing  element
    - Missing <class> element
    - Missing  element
    - Missing  element
    - Make sure you are submitting a UID, not a name, if you are using <location> vs <locationName>

    Subject: RE: Structure of XML request for addPhone - CUCM 6.1.2
    Replied by: David Staudt on 26-02-2009 05:29:46 AM
    product, protocol and protocolSide
     
    If you check the schema you can see the required elements.
     
    Sorry I guess the new forum isn't handling XML encoding correctly yet...

    Subject: RE: Structure of XML request for addPhone - CUCM 6.1.2
    Replied by: Stephan Steiner on 26-02-2009 11:10:19 AM
    If I might make a little suggestion based on personal experience: the schema is hand edited and not autogenerated. Thus, it will not always match what the CCM is doing. So, instead of going to write something from scratch, how about the good old "load something existing first, modify what needs modifying and send it back" approach? For starters that'll tell you what parameters there really are, and all the defaults and required values have already been filled out.
     
    Whenever I need to implement support for a new CCM object, I first implement the get method, then add, delete and finally update and I write myself a little test method that creates the prerequisites and cleans up after itself (sorta like a unit test but a little less advanced) - so that whenever I adapt my code that speaks AXL I can just re-run those test methods and check for failures.

    Subject: RE: Structure of XML request for addPhone - CUCM 6.1.2
    Replied by: MIKE WILCOX on 26-02-2009 10:13:26 PM
    Found an issue both with my perl script and what I was passing in the AXL request. Many thanks for the help and information.
     
    Mike