cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
121
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Chuck Brier on 11-11-2009 05:28:13 PM
I¿m in the process of writing some extraction java classes to export phones in a CCM V4.2(3) Sr4b with the goal of adding these phones to a UCM V7.1.3. I downloaded the axltoolskit from the UCM V7 servers and built the java classes using AXIS 1.4. I built sepraate libraries for Callmanager V4 and V7. I cleared the errors in all the classes per the axl programming guide. I am able to get a list of phones by executing the ListPhoneByDescription method to get a list of device names. I then try to execute a getPhone  method passing a string representing a device name to the V4.2(3) Call Manager. I receive java exception stating ¿Invalid element in com.cisco.www.AXL.API._1_0.XIPPhone ¿ commonProfileName¿.

I run this same code against a UCM 7 server using the classes generated by 7.1 schemas and the code works. I try this same code built off the 7.1 schema to the 4.2(3). I get the same exception ¿Invalid element in com.cisco.www.AXL.API._7_1.XIPPhone - commonProfileName. ¿ gust a diffrent scheme reference.
I searched the AXLAPI.wsdl and axl.xsd files(schemas 1 & 7) for a reference to commonProfileName and find no references in the schemas. I took a look at the wsdl and xsd files on call manager 4.2(3) in c:\ciscowebs\api\axl\v1. I search the axl.xsd and do find a reference to commonProfileName. I tried to build a new classes based off these files; however, the wsdl and xsd files are not valid. I took files off other call manager 4.2(3) servers with the same results.
 

How do I resolve this issue with 4.2(3)?


Code:

 
import java.net.MalformedURLException;
import java.rmi.RemoteException;
import java.security.Security;
 
import javax.xml.rpc.Call;
import javax.xml.rpc.ServiceException;
 
import org.apache.axis.client.Stub;
import org.apache.axis.types.UnsignedLong;
 
import com.cisco.www.AXL.API._7_1.*;
import com.cisco.www.AXLAPIService.AXLAPIService;
import com.cisco.www.AXLAPIService.AXLAPIServiceLocator;
import com.cisco.www.AXLAPIService.AXLPort;
 
public class GetPhoneAttributesV4 {
     
      public static void main (String Args[]){
           
 
            String cluster = "CM";
            String axlURL = "https://CM-A/CCMApi/axl/v1/SOAPISAPI.dll";
            String axlUserName = "username";
            String axlPassword = "password";
            String deviceName = "SEP001795B134BA"; //Cm2
            GetPhoneAttributesV4 getPhone = new GetPhoneAttributesV4();
           
            try{
                 
            // Install the all-trusting trust manager
            Security.addProvider( new NilProvider() );
            Security.setProperty(
               "ssl.TrustManagerFactory.algorithm",
               "TrustAllCertificates");
           
           
                  System.out.println("Trying AXL Request");
                  AXLAPIService service = new AXLAPIServiceLocator();
                  System.out.println("Trying AXL Port - get bindng to url");
                  //Get the binding for RisPort
                  AXLPort axlport = service.getAXLPort(new java.net.URL(axlURL));
                 
                  System.out.println("Trying Setting Username & Passowrd");
                  ((Stub)axlport)._setProperty(Call.USERNAME_PROPERTY,axlUserName);
                  ((Stub)axlport)._setProperty(Call.PASSWORD_PROPERTY, axlPassword);
                 
                  getPhone.getSinglePhone(deviceName,axlport);
                 
            } catch (ServiceException e) {
                  System.err.println("Error connection to host: "+ e.getMessage());
                  return;
            } catch (MalformedURLException e) {
                  // TODO Auto-generated catch block
                  System.err.println("Error URL is Bad:"+ e.getMessage());
                  e.printStackTrace();
            }
           
           
      }
 
      public void getSinglePhone(String name,AXLPort axlport){
           
           
            try{
                 
                  GetPhoneReq getPhoneReq =  new GetPhoneReq();
                 
                  getPhoneReq.setPhoneName(name);
                 
                  System.out.println("getphone via axl port");
                 
                  GetPhoneResReturn value = axlport.getPhone(getPhoneReq).get_return();
                 
                  System.out.println("Move to local variable for XIPPhone");
                 
                  XIPPhone phone = value.getDevice();
                 
                  System.out.println("Moveed.. to local variable for XIPPhone");
                 
                  System.out.println(phone.toString()+
                              "\n Model:       "+phone.getModel()+
                              "\n CSS:         "+phone.getCallingSearchSpace()+
                              "\n CSS Name:    "+phone.getCallingSearchSpaceName()+
                              "\n DEVICE POOL: "+phone.getDevicePoolName());
            } catch (RemoteException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
           
                             
                             
            }
           
      }
}
 
 

Exception

Trying AXL Request
Trying AXL Port - get bindng to url
Trying Setting Username & Passowrd
- Exception:
org.xml.sax.SAXException: Invalid element in com.cisco.www.AXL.API._1_0.XIPPhone - commonProfileName
      at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
      at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
      at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
      at org.apache.axis.client.Call.invoke(Call.java:2467)
      at org.apache.axis.client.Call.invoke(Call.java:2366)
      at org.apache.axis.client.Call.invoke(Call.java:1812)
      at com.cisco.www.AXLAPIService.AXLAPIBindingStub.getPhone(AXLAPIBindingStub.java:11441)
      at com.britek.ucm.realtime.GetPhoneAttributesV4.getSinglePhone(GetPhoneAttributesV4.java:65)
      at com.britek.ucm.realtime.GetPhoneAttributesV4.main(GetPhoneAttributesV4.java:41)
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXException: Invalid element in com.cisco.www.AXL.API._1_0.XIPPhone - commonProfileName
 faultActor:
 faultNode:
 faultDetail:
      {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Invalid element in com.cisco.www.AXL.API._1_0.XIPPhone - commonProfileName
      at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
      at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
      at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
      at org.apache.axis.client.Call.invoke(Call.java:2467)
      at org.apache.axis.client.Call.invoke(Call.java:2366)
      at org.apache.axis.client.Call.invoke(Call.java:1812)
      at com.cisco.www.AXLAPIService.AXLAPIBindingStub.getPhone(AXLAPIBindingStub.java:11441)
      at com.britek.ucm.realtime.GetPhoneAttributesV4.getSinglePhone(GetPhoneAttributesV4.java:65)
      at com.britek.ucm.realtime.GetPhoneAttributesV4.main(GetPhoneAttributesV4.java:41)
 
      {http://xml.apache.org/axis/}hostname:britek-hplp
 
org.xml.sax.SAXException: Invalid element in com.cisco.www.AXL.API._1_0.XIPPhone - commonProfileName
      at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
      at org.apache.axis.client.Call.invoke(Call.java:2470)
      at org.apache.axis.client.Call.invoke(Call.java:2366)
      at org.apache.axis.client.Call.invoke(Call.java:1812)
      at com.cisco.www.AXLAPIService.AXLAPIBindingStub.getPhone(AXLAPIBindingStub.java:11441)
      at com.britek.ucm.realtime.GetPhoneAttributesV4.getSinglePhone(GetPhoneAttributesV4.java:65)
      at com.britek.ucm.realtime.GetPhoneAttributesV4.main(GetPhoneAttributesV4.java:41)
Caused by: org.xml.sax.SAXException: Invalid element in com.cisco.www.AXL.API._1_0.XIPPhone - commonProfileName
      at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
      at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
      at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
      at org.apache.axis.client.Call.invoke(Call.java:2467)
      ... 5 more
 
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:

Quick Links