cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1962
Views
0
Helpful
9
Replies

few get APIs respond with error

snikamvyopta
Level 1
Level 1

What do we actually specify for a name or uuid values under SerachCriteria in the API request? (where "name"  had application user name)

Is there any documentation which explains what are required things in SearchCriteria for each API?

I have only schema link reference- which does not explain it clearly. (https://developer.cisco.com/media/axl-schema-10-0/AXLSoap.html)

Following is a response I am getting for getDialPlan, getGeoLocation, getLicenseCapabilities, getPhysicalLocation.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>soapenv:Server</faultcode>

         <faultstring>Item not valid: The specified vyopta was not found</faultstring>

         <detail>

            <axlError>

               <axlcode>5007</axlcode>

               <axlmessage>Item not valid: The specified vyopta was not found</axlmessage>

               <request>getDialPlan</request>

            </axlError>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

9 Replies 9

npetrele
Cisco Employee
Cisco Employee

Try listDialPlan, etc. to see samples of what getDialPlan, etc. expects.  For example the following listDialPlan (the % in the search criteria for name is a wild card and will return all dial plans):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.0">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:listDialPlan>

         <searchCriteria>

            <name>%</name>

         </searchCriteria>

         <returnedTags>

            <name></name>

            <description></description>

         </returnedTags>

      </ns:listDialPlan>

   </soapenv:Body>

</soapenv:Envelope>

Returns something like this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

   <soap:Body>

      <ns2:listDialPlanResponse xmlns:ns2="http://www.cisco.com/AXL/API/10.0">

         <return>

            <dialPlan uuid="{some-uuid-number-goes-here}">

               <name>DialPlanName</name>

               <description>DialPlanDescription</description>

            </dialPlan>

         </return>

      </ns2:listDialPlanResponse>

   </soap:Body>

</soap:Envelope>

Nicholas,

For ListDialPlan, your solution worked.

But when I tried using listGeoLocation, listLicenseCapabilities, listPhysicalLocation instead of getGeoLocation, getLicenseCapabilities, getPhysicalLocation.

I am still getting following response for all of the above:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>soapenv:Server</faultcode>

         <faultstring>Invalid integer value:</faultstring>

         <detail>

            <axlError>

               <axlcode>-1</axlcode>

               <axlmessage>Invalid integer value:</axlmessage>

               <request>listGeoLocation</request>

            </axlError>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

You might check that you are not including '?' or something else invalid in the 'sequence' attribute.  I seem to recall that the listXXX requests may be more strict in checking for an invalid sequence value, while other requests (like getXXX) complain...

This listGeoLocation worked fine for me...

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:listGeoLocation>

         <searchCriteria>

            <name>%</name>

         </searchCriteria>

         <returnedTags>

            <name></name>

            <country></country>

            <description></description>

            <nationalSubDivision></nationalSubDivision>

            <district></district>

            <communityName></communityName>

            <cityDivision></cityDivision>

            <neighbourhood></neighbourhood>

            <street></street>

            <leadingStreetDirection></leadingStreetDirection>

            <trailingStreetSuffix></trailingStreetSuffix>

            <streetSuffix></streetSuffix>

            <houseNumber></houseNumber>

            <houseNumberSuffix></houseNumberSuffix>

            <landmark></landmark>

            <location></location>

            <floor></floor>

            <occupantName></occupantName>

            <postalCode></postalCode>

         </returnedTags>

      </ns:listGeoLocation>

   </soapenv:Body>

</soapenv:Envelope>

Why don't you post some of your AXL requests that are failing?  Perhaps we can detect a syntax problem or something. 

Hi Nicholas,

Following is a request for listGeoLocation that did not work and was throwing -1 error code in response:

The reason I found is that, it does not like empty <skip/> and <first/> tags  after <returnedTags /> in the request. When I removed those 2 tags completely, I get a success response.

I am using SoapUI tool, and the wsdl file I have included for 9.1 schema has these two tags mentioned above, for almost every API request template.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/9.1">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:listGeoLocation>

         <searchCriteria>

         <!--Optional:-->

            <name>%</name>

         </searchCriteria>

         <returnedTags>

            <!--Optional:-->

            <name/>

            <!--Optional:-->

            <country/>

            <!--Optional:-->

            <description/>

            <!--Optional:-->

            <nationalSubDivision/>

            <!--Optional:-->

            <district/>

            <!--Optional:-->

            <communityName/>

            <!--Optional:-->

            <cityDivision/>

            <!--Optional:-->

            <neighbourhood/>

            <!--Optional:-->

            <street/>

            <!--Optional:-->

            <leadingStreetDirection/>

            <!--Optional:-->

            <trailingStreetSuffix/>

            <!--Optional:-->

            <streetSuffix/>

            <!--Optional:-->

            <houseNumber/>

            <!--Optional:-->

            <houseNumberSuffix/>

            <!--Optional:-->

            <landmark/>

            <!--Optional:-->

            <location/>

            <!--Optional:-->

            <floor/>

            <!--Optional:-->

            <occupantName/>

            <!--Optional:-->

            <postalCode/>

         </returnedTags>

         <!--Optional:-->

         <skip></skip>

         <!--Optional:-->

         <first></first>

      </ns:listGeoLocation>

   </soapenv:Body>

</soapenv:Envelope>

At the risk of sounding snarky, if it doesn't work with skip and first, then don't use skip and first! 

Seriously, skip and first are optional, but skip and first will work if you give them values.  Skip = how many matches you want to skip before returning data, First = return the first X matches after skipping. 

For example, the following modification to your example works fine.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/9.1">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:listGeoLocation>

         <searchCriteria>

            <name>%</name>

         </searchCriteria>

         <returnedTags>

            <name/>

            <country/>

            <description/>

            <nationalSubDivision/>

            <district/>

            <communityName/>

            <cityDivision/>

            <neighbourhood/>

            <street/>

            <leadingStreetDirection/>

            <trailingStreetSuffix/>

            <streetSuffix/>

            <houseNumber/>

            <houseNumberSuffix/>

            <landmark/>

            <location/>

            <floor/>

            <occupantName/>

            <postalCode/>

         </returnedTags>

         <skip>0</skip>

         <first>1</first>

      </ns:listGeoLocation>

   </soapenv:Body>

</soapenv:Envelope>

Hi Nicholas,

Sure, I can simply skip those 2 tags, I believe getting all the records in our case won't cause much overhead on response.

However, we might need it as controlling parameters for big queries.

"However, we might need it as controlling parameters for big queries."


That's when you can use the skip and first tags to limit what's returned.  Just make sure they're not empty. 



Of course!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: