cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
942
Views
5
Helpful
2
Replies

updateCSS error

luoht
Level 1
Level 1

I was trying to add an existing partition ("pt1") to an existing CSS ("Intl24HrsEnh-CSS833") and got the following server error.  How shall I solve this problem?

 

Also, where I can find document that explains each AXL API?  The reference guide is pretty much useless.  For example, in updateCSS API, there is "index" element.  What is it used for?  There's "sequence" attribute.  What's it used for?  Thank you!

 

SOAP request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">
    <soapenv:Header/>
    <soapenv:Body>
        <ns:updateCss>
            <name>Intl24HrsEnh-CSS833</name>
            <addMembers><member><routePartitionName>pt1</routePartitionName><index>0</index></member></addMembers></ns:updateCss>
    </soapenv:Body>
</soapenv:Envelope>

 

SOAP response:
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Unique constraint (informix.mx_74_135_137) violated.</faultstring><detail><axlError><axlcode>-268</axlcode><axlmessage>Unique constraint (informix.mx_74_135_137) violated.</axlmessage><request>updateCss</request></axlError></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

2 Replies 2

dcburleigh
Level 1
Level 1

 

The 'index' attribute is the position in the list of partitions. So, if you already have 3 partitions in your CSS, then you want to use an index of 4 (or greater).

 

The error you're seeing is a 'unique constraint' violation, which means you're trying to duplicate something.  My guess is you already have a partition at index 0. Or possibly you have to start at 1.

 

It would be nice if you could tell AXL "add this partition to the end of the list", but I don't know if it works that way.

 

derek.fraser
Level 1
Level 1

+5 dcburleigh. This saved me some time. In case someone stumbles on this in the future the API will react differently depending on the AXL request.  In the past I've used getLineGroup to collect existing members and lineSelectionOrder, then updateLineGroup to append to the end of the list.  Trying to update CSS partitions with the same logic I was running into an issue returning 'unique constraint', turns out getLineGroup (return.lineGroup.members.member.lineSelectionOrder) starts at 0, whereas getCss (return.css.members.member.index) starts at 1.  So I guess the lesson is partitions are indexed in CSS' starting at 1 and make sure you analyze a get request before trying to update...every time I assume with this API it seems to bite me.