NicTool API - get_zone_records XML error

Started by jeffp, April 28, 2014, 03:45:50 PM

Previous topic - Next topic



I am attempting to use the NicTool API to get a list of zone records using the "get_zone_records" method as described at However, the N_* parameters are causing me some trouble as they seem to generate invalid XML tags (as per  I am able to use any function that does not employ the N_* format, e.g. login, validate_session, get_group_zones, etc.; this leads me to believe the issue is not the same as in marax's thread at,1047.0.html. After looking through the NicTool source on github, it seems the N_* format is required in order to properly include the search queries (see  NicToolServer::get_advanced_search_conditions()).

Am I generating the XML query incorrectly or is this a bug with the API? Any advice on solving this issue would be greatly appreciated.


<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:ns1="http://NICToolServer-api/NicToolServer/SOAP" xmlns:xsd="" xmlns:xsi="" xmlns:SOAP-ENC="" SOAP-ENV:encodingStyle="">
            <l13e86451a3d8f8f58ce74a227c83dac xsi:type="SOAP-ENC:Struct">
                <nt_zone_id xsi:type="xsd:int">1234</nt_zone_id>
                <page xsi:nil="true"/>
                <start xsi:nil="true"/>
                <limit xsi:nil="true"/>
                <Sort xsi:nil="true"/>
                <search_query xsi:type="xsd:string">address = '192'</search_query>
                <Search xsi:type="xsd:string">Search</Search>
                <quick_search xsi:nil="true"/>
                <search_value xsi:nil="true"/>
                <nt_user_session xsi:type="xsd:string">user_session_removed</nt_user_session>
                <nt_protocol_version xsi:type="xsd:string">1.0</nt_protocol_version>
                <1_option xsi:type="xsd:string">equals</1_option>
                <1_value xsi:type="xsd:string"></1_value>
                <1_field xsi:type="xsd:string">address</1_field>


<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="" xmlns:soapenc="" xmlns:xsd="" soap:encodingStyle="" xmlns:soap="">
        <faultstring>Application failed during request deserialization: not well-formed (invalid token) at line 2, column 916, byte 955 at /usr/local/lib/perl5/site_perl/5.8.8/mach/XML/ line 187</faultstring>


I believe that's a "bug," but it was a necessary one at the time NicTool was written, as there was no other way to do that in SOAP::Lite.  (Maybe that's true. It's dredged up from very, very distant memories).

There is no intent to fix this issue, as the next version of the NicTool API will use JSON for the serialization.


Thank you. I will be looking forward to the next version of the API.