UpdateDeviceProfileReq/lines/line doesnt work

Version 1
    This document was generated from CDN thread

    Created by: Thomas Beck on 27-07-2009 02:03:57 PM
    Hi everybody,
     
    im trying to update the label and display on Device-Profle > Line. My Request looks like

     <soap:Body>
     <updateDeviceProfile xmlns="http://www.cisco.com/AXL/API/1.0">
     <name xsi:type="xsd:string">DeviceProfile for TB</name>
     <lines>
       <line uuid="f6db57cf-a5fe-4c05-7c3e-d4f18ab2034b">
         <label xsi:type="xsd:string">TEST_LABEL</label>
         <display xsi:type="xsd:string">TEST_Display</display>
         <callInfoDisplay>
           <callerName xsi:type="xsd:string">TEST_NAME</callerName>
         </callInfoDisplay>
       </line>
     </lines>
     </updateDeviceProfile>
     </soap:Body>

    But i get an SOAP-ENV:Client Cannot insert a null into column (devicenumplanmap.fknumplan). How can I update these fields?
     
    Thanks
    Thomas

    Subject: RE: UpdateDeviceProfileReq/lines/line doesnt work
    Replied by: David Staudt on 27-07-2009 05:29:08 PM
    I think there may be two main items:
     
    - The lines/dirn element must be provided, with the UUID of the DN you want.  Otherwise it tries to add a 'line appearance' slot without a DN assigned to it, causing your main error
    - Also note that the callerInfoDisplay sequence is a set of boolean fields indicating which piece of data should/shouldn't be displayed...not fields for display data
     
    In my test, I did a getPhone on a device profile, which had this lines section:
     
                   <lines>
                      <line index="1" uuid="{17589B50-D15F-85CE-74D7-5A3ECCB94D3B}">
                         <label/>
                         <asciiLabel/>
                         <display/>
                         <dirn uuid="{6FD78093-CC26-4B4D-1562-9ADBC2F45CBD}"/>
                         <ringSetting>Use System Default</ringSetting>
                         <consecutiveRingSetting>Use System Default</consecutiveRingSetting>
                         <ringSettingIdlePickupAlert>Use System Default</ringSettingIdlePickupAlert>
                         <ringSettingActivePickupAlert>Use System Default</ringSettingActivePickupAlert>
                         <displayASCII/>
                         <e164Mask/>
                         <dialPlanWizardId>0</dialPlanWizardId>
                         <mwlPolicy>Use System Policy</mwlPolicy>
                         <maxNumCalls>4</maxNumCalls>
                         <busyTrigger>2</busyTrigger>
                         <callInfoDisplay>
                            <callerName>true</callerName>
                            <callerNumber>false</callerNumber>
                            <redirectedNumber>false</redirectedNumber>
                            <dialedNumber>true</dialedNumber>
                         </callInfoDisplay>
                         <recordingFlag>Call Recording Disabled</recordingFlag>
                         <audibleMWI>Off</audibleMWI>
                         <speedDial/>
                         <partitionUsage>General</partitionUsage>
                      </line>
                   </lines>
     
    I then copied this section into an updateDeviceProfile request, modifying the label and display elements:
     
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/7.0">
       <soapenv:Header/>
       <soapenv:Body>
          <ns:updateDeviceProfile sequence="?">
             <name>EM_User-IPC</name>
             <lines>
                <line index="1" uuid="{17589B50-D15F-85CE-74D7-5A3ECCB94D3B}">
                   <label>testLabel</label>
                   <asciiLabel/>
                   <display>testDisplay</display>
                   <dirn uuid="{6FD78093-CC26-4B4D-1562-9ADBC2F45CBD}"/>
                   <ringSetting>Use System Default</ringSetting>
                   <consecutiveRingSetting>Use System Default</consecutiveRingSetting>
                   <ringSettingIdlePickupAlert>Use System Default</ringSettingIdlePickupAlert>
                   <ringSettingActivePickupAlert>Use System Default</ringSettingActivePickupAlert>
                   <displayASCII/>
                   <e164Mask/>
                   <dialPlanWizardId>0</dialPlanWizardId>
                   <mwlPolicy>Use System Policy</mwlPolicy>
                   <maxNumCalls>4</maxNumCalls>
                   <busyTrigger>2</busyTrigger>
                   <callInfoDisplay>
                      <callerName>true</callerName>
                      <callerNumber>false</callerNumber>
                      <redirectedNumber>false</redirectedNumber>
                      <dialedNumber>true</dialedNumber>
                   </callInfoDisplay>
                   <recordingFlag>Call Recording Disabled</recordingFlag>
                   <audibleMWI>Off</audibleMWI>
                   <speedDial/>
                   <partitionUsage>General</partitionUsage>
                </line>
             </lines>
          </ns:updateDeviceProfile>
       </soapenv:Body>
    </soapenv:Envelope>

    Subject: RE: UpdateDeviceProfileReq/lines/line doesnt work
    Replied by: Thomas Beck on 28-07-2009 12:55:30 PM
    Thanks, working great!
    Note: Curly Braces around uuid for dirn are needed.
     
    Thomas
     
    <soap:Body>
      <updateDeviceProfile xmlns="http://www.cisco.com/AXL/API/1.0">
        <name xsi:type="xsd:string">My_DeviceProfile</name>
        <lines>
          <line index="1">
            <dirn xsi:type="xsd:string" uuid="{f6db57cf-a5fe-4c05-7c3e-d4f18ab2034b}" />
            <label xsi:type="xsd:string">MyLabel</label>
            <callInfoDisplay>
              <callerName xsi:type="xsd:boolean">true</callerName>
            </callInfoDisplay>
          </line>
        </lines>
      </updateDeviceProfile>
    </soap:Body>