« Back to Administration XML Questions

updatePhone returning Cannot insert a null into column (devicenumplanmap.fk

Combination View Flat View Tree View
Threads [ Previous | Next ]
When I run updatephone I'm getting a strange error back...

Cannot insert a null into column (devicenumplanmap.fknumplan)

Can you see any issues?

Thanks!
-Alex


-----
      • XML SENT ---

-----
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">


<soap:Body>
<updatePhone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cisco.com/AXL/API/1.0">
<name xmlns="">
SEP00120101024A
</name>
<userLocale xsi:nil="true" xmlns="" />
<networkLocale xsi:nil="true" xmlns="" />
<description xsi:type="xsd:string">
Alex Arwine
</description>
<callingSearchSpaceName xsi:type="xsd:string">
LosAngeles-USA
</callingSearchSpaceName>
<devicePoolName xsi:type="xsd:string">
SP_DP
</devicePoolName>
<locationName xsi:type="xsd:string">
Los Angeles
</locationName>
<lines>
<line xsi:type="SOAP-ENC:Struct">
<lineIdentifier xsi:type="SOAP-ENC:Struct">
<directoryNumber xsi:type="xsd:string">
5150
</directoryNumber>
<routePartitionName xsi:type="xsd:string">
LosAngelesDID
</routePartitionName>
</lineIdentifier>
</line>
<line xsi:type="SOAP-ENC:Struct">
<lineIdentifier xsi:type="SOAP-ENC:Struct">
<directoryNumber xsi:type="xsd:string">
5150
</directoryNumber>
<routePartitionName xsi:type="xsd:string">
LosAngelesVirtual
</routePartitionName>
</lineIdentifier>
</line>
</lines>
<mediaResourceListName xsi:type="xsd:string">
Los Angeles Office
</mediaResourceListName>
<phoneTemplateName xsi:type="xsd:string">
2-Line 7940
</phoneTemplateName>
<userLocale xsi:type="xsd:string">
English, United States
</userLocale>
<networkLocale xsi:type="xsd:string">
United States
</networkLocale>
<softkeyTemplateName xsi:type="xsd:string">
Standard user
</softkeyTemplateName>
</updatePhone>
</soap:Body>
</soap:Envelope>



-----

-----
XML RETURNED ----

-----
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>
SOAP-ENV:Client
</faultcode>
<faultstring>
Cannot insert a null into column (devicenumplanmap.fknumplan).
</faultstring>
<detail>
<axl:Error xmlns:axl="http://www.cisco.com/AXL/API/1.0">
<axl:code>
-391
</axl:code>
<axl:message>
Cannot insert a null into column (devicenumplanmap.fknumplan).
</axl:message>
<request>
updatePhone
</request>
</axl:Error>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

It appears that it has to do with the <lines> tag.

How is this supposed to look to add multiple lines to the phone?

My guess would be that one of the lines does not exist. The lines must exist first (i.e. addLine) before they can be used in updatePhone.

You're mixing the two ways to specify a line.

Either you use

<lines>
<line index="1"><label>......</line>
<line index="2"><label>....</line>
</lines>

or

<lines>
<lineIdentifier><directoryNumber>1234</directoryNumber><routePartition>myPartition</routePartition></lineIdentifier>
<lineIdentifier>....</lineIdentifier>
</lines>

Since you're using <lines><line> axl expects that you specify the index to tell it at which position to place the line. Even though the schema makes it look optional, it's a mandatory piece of information and you get exactly the error you're describing if you leave it out (if you check the schema it says that index corresponds to devicenumplanmap.numplanindex..)

Sure enough - Thanks!