Cisco Cisco Prime Network Registrar 8.1 Technical References

Page of 316
Available Application Program Interface Matrix 
Cisco Prime Network Registrar IPAM 8.1.1 CLI and API Guide 
     151 
    <returnCode>-14</returnCode> 
   </faultDetail> 
  </soapenv:Fault> 
 </soapenv:Body> 
</soapenv:Envelope> 
Java clients can catch the error as an Exception and access the message. Below is a sample 
code fragment of a client using Java and Axis to retrieve the information in the detail 
element of the XML: 
try { 
 
Invoke web service 

catch (Exception ex) {
 
 
String errMsg = "Line " + inputLine + ": " +ex.getMessage(); 
 
System.err.println("Exception - " + errMsg); 
 
if (ex instanceof AxisFault) { 
 
// Retrieve Axis Fault detail 
 
  AxisFault fault = (AxisFault) ex; 
 
  Element[] elements =fault.getFaultDetails(); 
 
  System.err.println("AxisFault returned:"); 
 
  System.err.println("  faultcode: " + fault.getFaultCode()); 
         System.err.println("  faultstring: "+fault.getFaultString()); 
         System.err.println("  faultdetail tag: "  
             + elements[0].getTagName()); 
         System.err.println("  faultdetail node value: " 
 
 
 
+elements[0].getFirstChild().getNodeValue()); 
 
 
} else { 
 
  ex.printStackTrace(); 
 
}  
Other SOAP toolkits (e.g., .NET and Perl) can parse the XML for the details, or ignore 
those tags if that level of detail about the exception is not required for the application. 
Available Application Program Interface Matrix 
Object 
Import 
Modify 
Delete 
Export 
Address Pool 
 
Aggregate Block 
 
 
Block 
Container 
Device 
Device Interface 
 
 
 
Device RR 
DHCP Server 
 
 
Domain RR 
 
Galaxy Domain