05-09-2018 10:31 AM
Hi,
Looks to be a bug in XBusyLampField in 11.5 AXL.
The schema is:
<xsd:complexType name="XBusyLampField">
<xsd:sequence minOccurs="0">
<xsd:element maxOccurs="1" minOccurs="1" name="blfDest" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Either blfDest or the combination of blfDirn and routePartition is to be mentioned in the add/update request, if both are mentioned AXL will read only the blfDest tag and ignore blfDirn and routePartition.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:choice minOccurs="1">
<xsd:sequence minOccurs="1">
<xsd:element maxOccurs="1" minOccurs="0" name="blfDirn" type="axlapi:String255">
<xsd:annotation>
<xsd:documentation>Either blfDest or the combination of blfDirn and routePartition is to be mentioned in the add/update request, if both are mentioned AXL will read only the blfDest tag and ignore blfDirn and routePartition.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="routePartition" type="xsd:string"/>
</xsd:sequence>
</xsd:choice>
<xsd:element maxOccurs="1" minOccurs="0" name="label" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="associatedBlfSdFeatures">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element maxOccurs="unbounded" minOccurs="0" name="feature" type="axlapi:XBLFSDOption"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="index" type="axlapi:XInteger"/>
</xsd:sequence>
</xsd:complexType>
This forces blfDest to be included in a request, such as for addPhone.
It also does not match RBusyLampField:
<xsd:complexType name="RBusyLampField">
<xsd:sequence minOccurs="0">
<xsd:element maxOccurs="1" minOccurs="0" name="blfDest" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Either blfDest or the combination of blfDirn and routePartition is to be mentioned in the add/update request, if both are mentioned AXL will read only the blfDest tag and ignore blfDirn and routePartition.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:choice minOccurs="0">
<xsd:sequence minOccurs="0">
<xsd:element maxOccurs="1" minOccurs="0" name="blfDirn" type="axlapi:String255">
<xsd:annotation>
<xsd:documentation>Either blfDest or the combination of blfDirn and routePartition is to be mentioned in the add/update request, if both are mentioned AXL will read only the blfDest tag and ignore blfDirn and routePartition.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="routePartition" type="xsd:string"/>
</xsd:sequence>
</xsd:choice>
<xsd:element maxOccurs="1" minOccurs="0" name="label" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="associatedBlfSdFeatures">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element maxOccurs="unbounded" minOccurs="0" name="feature" type="axlapi:XBLFSDOption"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="index" type="axlapi:XInteger"/>
</xsd:sequence>
</xsd:complexType>
This means that I can get a response from AXL like this:
('busyLampFields',
OrderedDict([('busyLampField',
[OrderedDict([('blfDest', None),
('blfDirn', '1001'),
('routePartition', None),
('label', 'x1001'),
('associatedBlfSdFeatures', None),
('index', 1)]),
OrderedDict([('blfDest', '+3243543252'),
('blfDirn', None),
('routePartition', None),
('label', 'Mobile'),
('associatedBlfSdFeatures',
OrderedDict([('feature',
['Pickup'])])),
('index', 2)]),
OrderedDict([('blfDest', None),
('blfDirn', '1003'),
('routePartition', None),
('label', 'x1003'),
('associatedBlfSdFeatures', None),
('index', 3)]),
OrderedDict([('blfDest', None),
('blfDirn', '1004'),
('routePartition', None),
('label', 'x1004'),
('associatedBlfSdFeatures', None),
('index', 4)])])])),
However, if I used this structure to try add to a new phone, it fails using python-zeep, as several of the BLFs were configured with Directory Number/Partition, not with a static BLF destination
Workaround seem to be to manually edit the minOccurs and set it to zero. This looks to me to be a bug.
As an aside, this xsd definition does not match other common request choice options in other AXL API calls, where the typically this would be included in the choice, such as for:
<xsd:complexType name="UpdateCallParkReq">
<xsd:complexContent>
<xsd:extension base="axlapi:APIRequest">
<xsd:sequence>
<xsd:choice>
<xsd:element name="uuid" type="axlapi:XUUID"/>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="pattern" nillable="false" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="routePartitionName" nillable="true" type="axlapi:XFkType"/>
</xsd:sequence>
</xsd:choice>
I expect that the definitions for both XBlf and RBlf need to be restructured.