AXL AddPhoneRequest on CUCM 8.6 fails with null pointer exception

Version 1
    This document was generated from CDN thread

    Created by: Jonas Hoffmann on 01-12-2011 09:09:53 AM
    Hi,
     
    I am desperately trying to add a phone on a CUCM (version 8.6.2.20000-2) via AXL
    using schema 8.5 (AXLSoap.xsd and AXLAPI.wsdl).

    When I use the 7.1 wsdl and xsd and do an AddPhoneRequest on the same server,
    everything works fine, but as soon as I change it to an 8.5 (or 8.0) schema,
    the request fails with an NPE (see attached logs).

    I tried including and excluding various attributes, tried without setting a line, CSS, etc.
    Read the specification forth and back, but all requests fail just like that.

    It seems to me as if the request is parsed fine as I can even see the DB INSERT in
    the log and whenever I change attributes in the request to invalid values, I get
    the according errors complaining about it. I also dobule-checked that
    the required entries in the other tables (device pool, location, directory number, etc.)
    all exist.

    An AddDeviceProfileReq works fine by the way.

    Has this behaviour occured to any of you? Who can supply me with an XML log of a
    succesful AddPhoneReq using the 8.5 (or 8.0) schema? Or does someone see any obvious
    errors in my requests?

    Thanks a lot for any help,
    Jonas Hoffmann


    --- Java code snippet that creates the requests ---

            XPhone xp = new XPhone();
            xp.setName("SEP112233445566");
            xp.setDescription("Test");
            xp.setProduct("Cisco 6941");
            xp.setClazz("Phone");
            xp.setProtocol("SCCP");
            xp.setProtocolSide("User");

            XFkType devicePoolXFk = new XFkType();
            devicePoolXFk.setValue("Default");
            xp.setDevicePoolName(devicePoolXFk);

            XFkType commonPhoneConfigXFk = new XFkType();
            commonPhoneConfigXFk.setValue("Standard Common Phone Profile");
            xp.setCommonPhoneConfigName(commonPhoneConfigXFk);

            XFkType locationName = new XFkType();
            locationName.setValue("Hub_None");
            xp.setLocationName(locationName);

            xp.setUseTrustedRelayPoint("Default");

            XPhoneLine line = new XPhoneLine();
            line.setIndex("5");
            line.setDisplay("Line1");
            XDirn dirn = new XDirn();
            dirn.setPattern("77777");
            XFkType rpnxfk = new XFkType();
            rpnxfk.setValue("Internal");
            dirn.setRoutePartitionName(rpnxfk);
            line.setDirn(dirn);
            XPhone.Lines lines = new XPhone.Lines();
            lines.getLine().add(0, line);
            xp.setLines(lines);

            AddPhoneReq addPhoneReq = new AddPhoneReq();
            addPhoneReq.setPhone(xp);
            StandardResponse response = this.getPort().addPhone(addPhoneReq);
    ---

    --- log output taken from Cisco RTMT with SQL debug ---
    2011-11-18
    16:51:12,081 INFO  [http-8443-20] servletRouters.AXLFilter - Received
    request 1320659898151 from ccm-xyz at IP xx.xx.xx.xx
    2011-11-18 16:51:12,083 INFO  [http-8443-20] servletRouters.AXLFilter - AXL REQUEST :

    <?xml version="1.0" ?>
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
            <S:Body>
                    <ns2:addPhone xmlns:ns2="http://www.cisco.com/AXL/API/8.5">
                            <phone>
                                    <name>SEP112233445566</name>
                                    <description>Test</description>
                                    <product>Cisco 6941</product>
                                    <class>Phone</class>
                                    <protocol>SCCP</protocol>
                                    <protocolSide>User</protocolSide>
                                    <callingSearchSpaceName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <devicePoolName>Default</devicePoolName>
                                    <commonDeviceConfigName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <commonPhoneConfigName>Standard Common Phone Profile
                                    </commonPhoneConfigName>
                                    <locationName>Hub_None</locationName>
                                    <mediaResourceListName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <networkHoldMohAudioSourceId
                                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
                                    <userHoldMohAudioSourceId
                                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
                                    <automatedAlternateRoutingCssName
                                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
                                    <aarNeighborhoodName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <loadInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <versionStamp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <mlppDomainId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <useTrustedRelayPoint>Default</useTrustedRelayPoint>
                                    <securityProfileName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <sipProfileName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <cgpnTransformationCssName
                                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
                                    <geoLocationName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <geoLocationFilterName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <lines>
                                            <line>
                                                    <index>5</index>
                                                    <display>Line1</display>
                                                    <dirn>
                                                            <pattern>77777</pattern>
                                                            <routePartitionName>Internal</routePartitionName>
                                                    </dirn>
                                                    <consecutiveRingSetting
                                                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
                                                    <ringSettingIdlePickupAlert
                                                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
                                                    <ringSettingActivePickupAlert
                                                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
                                                    <e164Mask xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                                            xsi:nil="true" />
                                                    <recordingProfileName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                                            xsi:nil="true" />
                                                    <monitoringCssName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                                            xsi:nil="true" />
                                                    <speedDial xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                                            xsi:nil="true" />
                                            </line>
                                    </lines>
                                    <phoneTemplateName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <primaryPhoneName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <userlocale xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <networkLocale xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <idleTimeout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <softkeyTemplateName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <defaultProfileName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <ownerUserName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <packetCaptureDuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <subscribeCallingSearchSpaceName
                                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
                                    <rerouteCallingSearchSpaceName
                                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
                                    <dndRingSetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <mobilityUserIdName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <mobileSmartClientProfileName
                                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
                                    <dialRulesName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                                    <featureControlPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                            xsi:nil="true" />
                            </phone>
                    </ns2:addPhone>
            </S:Body>
    </S:Envelope>

    2011-11-18 16:51:12,087 DEBUG [http-8443-20] servletRouters.AXLFilter - DBLCNQueue Count: 0
    2011-11-18 16:51:12,087 DEBUG [http-8443-20] servletRouters.AXLFilter - Successfully set the value of counter: 4 value: 0
    2011-11-18 16:51:12,087 INFO  [http-8443-20] servletRouters.AXLAlpha - SOAPAction : "CUCMB ver=8.5 addPhone"
    2011-11-18 16:51:12,088 INFO  [http-8443-20] servletRouters.AXLAlpha - Going to axis--->
    2011-11-18 16:51:12,093 DEBUG [http-8443-20] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-11-18 16:51:12,095 DEBUG [http-8443-20] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-11-18 16:51:12,095 DEBUG [http-8443-20] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-11-18 16:51:12,096 DEBUG [http-8443-20] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-11-18
    16:51:12,097 DEBUG [http-8443-20] axlapiservice.AddPhoneHandler -
    select tkModel from TypeProduct where typeproduct.enum='383'
    2011-11-18
    16:51:12,098 DEBUG [http-8443-20] axlapiservice.Handler -
    fkCallingSearchSpace  IS Being assigned a null value in addfkdataaxis
    2011-11-18
    16:51:12,099 DEBUG [http-8443-20] axlapiservice.Handler - getPkid Query
    is :select pkid from DevicePool where my_lower(name )
    =my_lower('Default' )
    2011-11-18 16:51:12,117 DEBUG [http-8443-20]
    axlapiservice.Handler - fkFeatureControlPolicy  IS Being assigned a null
    value in addfkdataaxis
    2011-11-18 16:51:12,118 DEBUG [http-8443-20]
    axlapiservice.Handler - select tksupportsfeature,
    tkdeviceprotocol,param from ProductSupportsFeature where tkproduct='383'
      and tkdeviceprotocol in ('0',99)
    2011-11-18 16:51:12,122 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 supports feature 104
    2011-11-18
    16:51:12,122 DEBUG [http-8443-20] axlapiservice.Handler -
    fkCommonDeviceConfig  IS Being assigned a null value in addfkdataaxis
    2011-11-18
    16:51:12,122 DEBUG [http-8443-20] axlapiservice.Handler - getPkid Query
    is :select pkid from CommonPhoneConfig where my_lower(name )
    =my_lower('Standard Common Phone Profile' )
    2011-11-18 16:51:12,125
    DEBUG [http-8443-20] axlapiservice.Handler - getPkid Query is :select
    pkid from Location where my_lower(name ) =my_lower('Hub_None' )
    2011-11-18
    16:51:12,127 DEBUG [http-8443-20] axlapiservice.Handler -
    fkMediaResourceList  IS Being assigned a null value in addfkdataaxis
    2011-11-18
    16:51:12,127 DEBUG [http-8443-20] axlapiservice.Handler -
    fkCallingSearchSpace_AAR  IS Being assigned a null value in
    addfkdataaxis
    2011-11-18 16:51:12,128 DEBUG [http-8443-20]
    axlapiservice.Handler - fkAARNeighborhood  IS Being assigned a null
    value in addfkdataaxis
    2011-11-18 16:51:12,128 DEBUG [http-8443-20]
    axlapiservice.Handler - fkFeatureControlPolicy  IS Being assigned a null
    value in addfkdataaxis
    2011-11-18 16:51:12,128 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 supports feature 34
    2011-11-18 16:51:12,129 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 supports feature 35
    2011-11-18 16:51:12,129 DEBUG [http-8443-20] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-11-18
    16:51:12,130 DEBUG [http-8443-20] axlapiservice.AddPhoneHandler -
    select pkid from securityprofile where tkmodel = '496' and
    tkdeviceprotocol = '0' and securityprofile.isStandard = 't' and
    securityprofile.tkDeviceSecurityMode = '1'
    2011-11-18 16:51:12,133
    DEBUG [http-8443-20] axlapiservice.Handler - fkPhoneTemplate  IS Being
    assigned a null value in addfkdataaxis
    2011-11-18 16:51:12,135 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 supports feature 18
    2011-11-18
    16:51:12,135 DEBUG [http-8443-20] axlapiservice.Handler -
    fkSoftkeyTemplate  IS Being assigned a null value in addfkdataaxis
    2011-11-18
    16:51:12,136 DEBUG [http-8443-20] axlapiservice.Handler -
    ikDevice_defaultProfile  IS Being assigned a null value in addfkdataaxis

    2011-11-18 16:51:12,136 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 does not support feature 79
    2011-11-18 16:51:12,136 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 does not support feature 78
    2011-11-18 16:51:12,137 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 supports feature 53
    2011-11-18
    16:51:12,137 DEBUG [http-8443-20] axlapiservice.Handler -
    fkCallingSearchspace_restrict  IS Being assigned a null value in
    addfkdataaxis
    2011-11-18 16:51:12,138 DEBUG [http-8443-20]
    axlapiservice.Handler - fkCallingSearchspace_reroute  IS Being assigned a
    null value in addfkdataaxis
    2011-11-18 16:51:12,138 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 does not support feature 76
    2011-11-18 16:51:12,138 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 does not support feature 76
    2011-11-18 16:51:12,139 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 supports feature 72
    2011-11-18 16:51:12,139 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 does not support feature 76
    2011-11-18 16:51:12,140 DEBUG [http-8443-20] axlapiservice.Handler - Product 383 supports feature 63
    2011-11-18
    16:51:12,140 DEBUG [http-8443-20] axlapiservice.Handler - fkDialRules 
    IS Being assigned a null value in addfkdataaxis
    2011-11-18
    16:51:12,140 DEBUG [http-8443-20] axlapiservice.Handler -
    fkcallingsearchspace_cgpntransform  IS Being assigned a null value in
    addfkdataaxis
    2011-11-18 16:51:12,141 DEBUG [http-8443-20]
    axlapiservice.Handler - insert into Device (
    tkDeviceProtocol,fkCallingSearchspace_restrict,SpecialLoadInformation,tkStatus_MLPPIndicationStatus,tkProtocolSide,fkDevicePool,fkPhoneTemplate,fkCallingSearchSpace,fkCallingSearchspace_reroute,isprotected,fkSoftkeyTemplate,fkDialRules,Description,fkAARNeighborhood,fkCommonDeviceConfig,ikDevice_defaultProfile,fkcallingsearchspace_cgpntransform,fkMediaResourceList,fkLocation,Name,tkClass,fkCommonPhoneConfig,tkdndoption,pkid,fkCallingSearchSpace_AAR,fkFeatureControlPolicy,fkSecurityProfile,tkStatus_UseTrustedRelayPoint,tkProduct
    ) values (
    '0',null,null,'2','1','1b1b9eb6-7803-11d3-bdf0-00108302ead1','268d80c1-d8b6-42ce-9379-f808613ada49',null,null,'f',null,null,'Test',null,null,null,null,null,'29c5c1c4-8871-4d1e-8394-0b9181e8c54d','SEP112233445566','1','ac243d17-98b4-4118-8feb-5ff2e1b781ac','2','49dc23c5-d67c-c7be-642f-86e73943225e',null,null,'70d267c5-3b10-41d1-a4bd-de2bb36222ba','2','38!

    3' )
    2011-11-18 16:51:12,492 DEBUG [http-8443-20]
    axlapiservice.Handler - fkcallingsearchspace_cgpntransform  IS Being
    assigned a null value in addfkdataaxis
    2011-11-18 16:51:12,493 ERROR
    [http-8443-20] axlapiservice.AXLAPIServiceSkeleton -
    com.cisco.www.axlapiservice.AXLAPIServiceSkeleton  16adc5
    java.lang.NullPointerException
            at com.cisco.www.axlapiservice.AddPhoneHandler.doAdd(AddPhoneHandler.java:931)
            at com.cisco.www.axlapiservice.AXLAPIServiceSkeleton.addPhone(AXLAPIServiceSkeleton.java:13345)

            at
    com.cisco.www.axlapiservice.AXLAPIServiceMessageReceiverInOut.invokeBusinessLogic(AXLAPIServiceMessageReceiverInOut.java:7446)

            at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
            at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
            at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
            at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
            at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at sun.reflect.GeneratedMethodAccessor334.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
            at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:65)
            at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:80)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:294)
            at com.cisco.www.servletRouters.AXLAlpha.doPost(Unknown Source)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at sun.reflect.GeneratedMethodAccessor334.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
            at com.cisco.www.servletRouters.AXLFilter.doFilter(Unknown Source)
            at sun.reflect.GeneratedMethodAccessor376.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
            at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
            at java.lang.Thread.run(Thread.java:662)
    2011-11-18 16:51:12,495 DEBUG [http-8443-20] axlapiservice.AXLCallFlow - In AXL CAll Flow
    2011-11-18 16:51:12,496 DEBUG [http-8443-20] axlapiservice.AXLCallFlow - In AXL CAll Flow errorCodeStringnull
    2011-11-18 16:51:12,496 DEBUG [http-8443-20] axlapiservice.AXLCallFlow - Setting soap fault
    2011-11-18 16:51:12,496 DEBUG [http-8443-20] axlapiservice.AXLCallFlow - Setting soap fault2
    2011-11-18 16:51:12,497 INFO  [http-8443-20] servletRouters.AXLAlpha - Request processed by AXIS
    2011-11-18
    16:51:12,498 INFO  [http-8443-20] servletRouters.AXLFilter - <?xml
    version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring></faultstring><detail><axlError><axlcode>-1</axlcode><axlmessage></axlmessage><request>addPhone</request></axlError></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

    2011-11-18 16:51:12,498 INFO  [http-8443-20] servletRouters.AXLFilter - Request 1320659898151 was process in 417ms
    ---

    --
    Jonas Hoffmann

    Subject: RE: AXL AddPhoneRequest on CUCM 8.6 fails with null pointer exception
    Replied by: Dan-Anders Hook on 01-12-2011 07:36:06 PM
    Hi,

    I'm getting the same error, but in my case I don't see the sql in the trace. I'm running the same version. Tried to add all tags in the request but with no luck. Fetched a phone with getPhone and copied the values into my request but still no luck. Clearly a bug since it throws an NPE. I took the sql from your log and inserted it successfully into my cucm, so it seems that part is correct. The NPE occurs in axl but the logs tells us to little.

    Kind regards,

    //Dan

    2011-12-02 01:09:10,648 INFO  [http-8443-10] servletRouters.AXLFilter - Received request 1322732960402 from administrator at IP 172.28.0.51
    2011-12-02 01:09:10,650 INFO  [http-8443-10] servletRouters.AXLFilter - AXL REQUEST :

    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><addPhone xmlns="http://www.cisco.com/AXL/API/8.5"><phone xmlns=""><name>SEP112233445566</name><description>Test</description><product>Cisco 6941</product><class_>Phone</class_><protocol>SCCP</protocol><protocolSide>User</protocolSide><callingSearchSpaceName>CSS_Test</callingSearchSpaceName><devicePoolName uuid="{1B1B9EB6-7803-11D3-BDF0-00108302EAD1}"></devicePoolName><commonPhoneConfigName uuid="{AC243D17-98B4-4118-8FEB-5FF2E1B781AC}"></commonPhoneConfigName><networkLocation>Use System Default</networkLocation><locationName uuid="{29C5C1C4-8871-4D1E-8394-0B9181E8C54D}"></locationName><loadInformation>SCCP69xx.9-2-1-0</loadInformation><traceFlag>false</traceFlag><mlppDomainId>000000</mlppDomainId><mlppIndicationStatus>Default</mlppIndicationStatus><preemption>Default</preemption><useTrustedRelayPoint>Default</useTrustedRelayPoint><retryVideoCallAsAudio>true</retryVideoCallAsAudio><securityProfileName uuid="{70D267C5-3B10-41D1-A4BD-DE2BB36222BA}"></securityProfileName><useDevicePoolCgpnTransformCss>true</useDevicePoolCgpnTransformCss><sendGeoLocation>true</sendGeoLocation><phoneTemplateName uuid="{268D80C1-D8B6-42CE-9379-F808613ADA49}"></phoneTemplateName><primaryPhoneName></primaryPhoneName><ringSettingIdleBlfAudibleAlert>Default</ringSettingIdleBlfAudibleAlert><ringSettingBusyBlfAudibleAlert>Default</ringSettingBusyBlfAudibleAlert><enableExtensionMobility>false</enableExtensionMobility><singleButtonBarge>Off</singleButtonBarge><joinAcrossLines>Off</joinAcrossLines><builtInBridgeStatus>Default</builtInBridgeStatus><callInfoPrivacyStatus>Default</callInfoPrivacyStatus><hlogStatus>On</hlogStatus><ignorePresentationIndicators>false</ignorePresentationIndicators><packetCaptureMode>None</packetCaptureMode><packetCaptureDuration>0</packetCaptureDuration><allowCtiControlFlag>true</allowCtiControlFlag><presenceGroupName uuid="{AD243D17-98B4-4118-8FEB-5FF2E1B781AC}">Standard Presence group</presenceGroupName><unattendedPort>false</unattendedPort><requireDtmfReception>false</requireDtmfReception><rfc2833Disabled>false</rfc2833Disabled><certificateOperation>No Pending Operation</certificateOperation><deviceMobilityMode>Default</deviceMobilityMode><remoteDevice>false</remoteDevice><dndOption>Use Common Phone Profile Setting</dndOption><phoneSuite>Default</phoneSuite><phoneServiceDisplay>Default</phoneServiceDisplay><mobileSmartClientProfileName></mobileSmartClientProfileName><outboundCallRollover>No Rollover</outboundCallRollover><alwaysUsePrimeLine>Default</alwaysUsePrimeLine><alwaysUsePrimeLineForVoiceMessage>Default</alwaysUsePrimeLineForVoiceMessage><deviceTrustMode>Not Trusted</deviceTrustMode></phone></addPhone></SOAP-ENV:Body></SOAP-ENV:Envelope>


    2011-12-02 01:09:10,773 DEBUG [http-8443-10] servletRouters.AXLFilter - DBLCNQueue Count: 0
    2011-12-02 01:09:10,774 DEBUG [http-8443-10] servletRouters.AXLFilter - Successfully set the value of counter: 4 value: 0
    2011-12-02 01:09:10,774 INFO  [http-8443-10] servletRouters.AXLAlpha - SOAPAction : "CUCMB ver=8.5"
    2011-12-02 01:09:11,301 DEBUG [http-8443-10] servletRouters.AXLAlpha - addToCache("administrator")
    2011-12-02 01:09:11,301 INFO  [http-8443-10] servletRouters.AXLAlpha - Going to axis--->
    2011-12-02 01:09:11,327 DEBUG [http-8443-10] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-12-02 01:09:11,328 DEBUG [http-8443-10] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-12-02 01:09:11,329 DEBUG [http-8443-10] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-12-02 01:09:11,330 DEBUG [http-8443-10] axlapiservice.AddPhoneHandler - select tkModel from TypeProduct where typeproduct.enum='383'
    2011-12-02 01:09:11,332 DEBUG [http-8443-10] axlapiservice.Handler - getPkid Query is :select pkid from CallingSearchSpace where my_lower(name ) =my_lower('CSS_Test' )
    2011-12-02 01:09:11,335 DEBUG [http-8443-10] axlapiservice.Handler - select tksupportsfeature, tkdeviceprotocol,param from ProductSupportsFeature where tkproduct='383'  and tkdeviceprotocol in ('0',99)
    2011-12-02 01:09:11,339 DEBUG [http-8443-10] axlapiservice.Handler - Product 383 supports feature 104
    2011-12-02 01:09:11,339 DEBUG [http-8443-10] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-12-02 01:09:11,341 DEBUG [http-8443-10] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-12-02 01:09:11,342 DEBUG [http-8443-10] axlapiservice.Handler - select pkid from MlppDomain where my_lower(ID)=my_lower('000000')
    2011-12-02 01:09:11,345 DEBUG [http-8443-10] axlapiservice.Handler -  found a pkid of c80cafe0-af65-43d6-a1f1-225ad998bd26 for mlppDomain 000000
    2011-12-02 01:09:11,345 DEBUG [http-8443-10] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-12-02 01:09:11,346 DEBUG [http-8443-10] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-12-02 01:09:11,347 DEBUG [http-8443-10] axlapiservice.Handler - Inside addTkdataAXIS utils part
    2011-12-02 01:09:11,348 ERROR [http-8443-10] axlapiservice.AXLAPIServiceSkeleton - com.cisco.www.axlapiservice.AXLAPIServiceSkeleton@c4740
    java.lang.NullPointerException
    at com.cisco.www.axlapiservice.AddPhoneHandler.doAdd(AddPhoneHandler.java:226)
    at com.cisco.www.axlapiservice.AXLAPIServiceSkeleton.addPhone(AXLAPIServiceSkeleton.java:13345)
    at com.cisco.www.axlapiservice.AXLAPIServiceMessageReceiverInOut.invokeBusinessLogic(AXLAPIServiceMessageReceiverInOut.java:7446)
    at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
    at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:65)
    at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:80)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:294)
    at com.cisco.www.servletRouters.AXLAlpha.doPost(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
    at com.cisco.www.servletRouters.AXLFilter.doFilter(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor283.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    2011-12-02 01:09:11,350 DEBUG [http-8443-10] axlapiservice.AXLCallFlow - In AXL CAll Flow
    2011-12-02 01:09:11,350 DEBUG [http-8443-10] axlapiservice.AXLCallFlow - In AXL CAll Flow errorCodeStringnull
    2011-12-02 01:09:11,350 DEBUG [http-8443-10] axlapiservice.AXLCallFlow - Setting soap fault
    2011-12-02 01:09:11,351 DEBUG [http-8443-10] axlapiservice.AXLCallFlow - Setting soap fault2
    2011-12-02 01:09:11,352 INFO  [http-8443-10] servletRouters.AXLAlpha - Request processed by AXIS
    2011-12-02 01:09:11,352 INFO  [http-8443-10] servletRouters.AXLFilter - <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring></faultstring><detail><axlError><axlcode>-1</axlcode><axlmessage></axlmessage><request>addPhone</request></axlError></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
    2011-12-02 01:09:11,354 INFO  [http-8443-10] servletRouters.AXLFilter - Request 1322732960402 was process in 706ms

    Subject: RE: AXL AddPhoneRequest on CUCM 8.6 fails with null pointer exception
    Replied by: Dan-Anders Hook on 01-12-2011 07:54:46 PM
    Thanks for pointing that out! Just have to figure out why, "class" is reserved so it's renamed in the IDE, but there is a translation in place that has worked previously. Just upgraded my IDE as well, so it could be a bug... (Running Delphi, of all languages)

    Kind regards,

    //Dan

    Subject: RE: AXL AddPhoneRequest on CUCM 8.6 fails with null pointer exception
    Replied by: Dan-Anders Hook on 01-12-2011 08:13:06 PM
    Yes, it was that "_" that costed me a few hours... I should have read my xml instead of just adding tags... Thanks again Sascha for pointing that out.

    This xml works, although there is to many items in it now. I'll cut it down to the bare minimum and post a new.

    (still thinks a NPE is a bug though...) :-)

    Cheers,

    //Dan

    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
        <addPhone xmlns="http://www.cisco.com/AXL/API/8.5">
          <phone xmlns="">
            <name>SEP112233445566</name>
            <description>Test</description>
            <product>Cisco 6941</product>
            <class>Phone</class>
            <protocol>SCCP</protocol>
            <protocolSide>User</protocolSide>
            <callingSearchSpaceName>CSS_Test</callingSearchSpaceName>
            <devicePoolName uuid="{1B1B9EB6-7803-11D3-BDF0-00108302EAD1}"></devicePoolName>
            <commonPhoneConfigName uuid="{AC243D17-98B4-4118-8FEB-5FF2E1B781AC}"></commonPhoneConfigName>
            <networkLocation>Use System Default</networkLocation>
            <locationName uuid="{29C5C1C4-8871-4D1E-8394-0B9181E8C54D}"></locationName>
            <loadInformation special="true">SCCP69xx.9-2-1-0</loadInformation>
            <vendorConfig/>
            <traceFlag>false</traceFlag>
            <mlppDomainId>000000</mlppDomainId>
            <mlppIndicationStatus>Default</mlppIndicationStatus>
            <preemption>Default</preemption>
            <useTrustedRelayPoint>Default</useTrustedRelayPoint>
            <retryVideoCallAsAudio>true</retryVideoCallAsAudio>
            <securityProfileName uuid="{70D267C5-3B10-41D1-A4BD-DE2BB36222BA}"></securityProfileName>
            <useDevicePoolCgpnTransformCss>true</useDevicePoolCgpnTransformCss>
            <sendGeoLocation>true</sendGeoLocation>
            <phoneTemplateName uuid="{268D80C1-D8B6-42CE-9379-F808613ADA49}"></phoneTemplateName>
            <primaryPhoneName></primaryPhoneName>
            <ringSettingIdleBlfAudibleAlert>Default</ringSettingIdleBlfAudibleAlert>
            <ringSettingBusyBlfAudibleAlert>Default</ringSettingBusyBlfAudibleAlert>
            <enableExtensionMobility>false</enableExtensionMobility>
            <singleButtonBarge>Off</singleButtonBarge>
            <joinAcrossLines>Off</joinAcrossLines>
            <builtInBridgeStatus>Default</builtInBridgeStatus>
            <callInfoPrivacyStatus>Default</callInfoPrivacyStatus>
            <hlogStatus>On</hlogStatus>
            <ignorePresentationIndicators>false</ignorePresentationIndicators>
            <packetCaptureMode>None</packetCaptureMode>
            <packetCaptureDuration>0</packetCaptureDuration>
            <allowCtiControlFlag>true</allowCtiControlFlag>
            <presenceGroupName uuid="{AD243D17-98B4-4118-8FEB-5FF2E1B781AC}">Standard Presence group</presenceGroupName>
            <unattendedPort>false</unattendedPort>
            <requireDtmfReception>false</requireDtmfReception>
            <rfc2833Disabled>false</rfc2833Disabled>
            <certificateOperation>No Pending Operation</certificateOperation>
            <deviceMobilityMode>Default</deviceMobilityMode>
            <remoteDevice>false</remoteDevice>
            <dndOption>Use Common Phone Profile Setting</dndOption>
            <isActive>true</isActive>
            <phoneSuite>Default</phoneSuite>
            <phoneServiceDisplay>Default</phoneServiceDisplay>
            <mobileSmartClientProfileName></mobileSmartClientProfileName>
            <outboundCallRollover>No Rollover</outboundCallRollover>
            <alwaysUsePrimeLine>Default</alwaysUsePrimeLine>
            <alwaysUsePrimeLineForVoiceMessage>Default</alwaysUsePrimeLineForVoiceMessage>
            <deviceTrustMode>Not Trusted</deviceTrustMode>
          </phone>
        </addPhone>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Subject: RE: AXL AddPhoneRequest on CUCM 8.6 fails with null pointer exception
    Replied by: Dan-Anders Hook on 01-12-2011 08:24:30 PM
    Last post for me, I think :-)

    This XML successfully created a phone. I think your problem could be the namespaces, or possibly if some mandatory tag is missing. I was surprised that this xml worked, since I've left out tags that I thought was mandatory (according to the schema).

    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
        <addPhone xmlns="http://www.cisco.com/AXL/API/8.5">
          <phone xmlns="">
            <name>SEP123433445566</name>
            <description>Test</description>
            <product>Cisco 6941</product>
            <class>Phone</class>
            <protocol>SCCP</protocol>
            <protocolSide>User</protocolSide>
            <devicePoolName>Default</devicePoolName>
            <commonPhoneConfigName xsi:nil="true"/>
            <locationName>Hub_None</locationName>
            <useTrustedRelayPoint></useTrustedRelayPoint>
            <phoneTemplateName xsi:nil="true"/>
            <primaryPhoneName xsi:nil="true"/>
            <builtInBridgeStatus></builtInBridgeStatus>
            <packetCaptureMode></packetCaptureMode>
            <certificateOperation></certificateOperation>
            <deviceMobilityMode></deviceMobilityMode>
            <mobileSmartClientProfileName xsi:nil="true"/>
          </phone>
        </addPhone>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>


    Hope this helps!

    //Dan

    Subject: Re: New Message from Dan-Anders Hook in Administration XML (AXL) - Administ
    Replied by: Sascha Monteiro on 01-12-2011 08:27:55 PM
    that is good to hear!
    Yes, sometime the exception catching and error messaging is not as we hope, not sure if it ever will,
    I have been using the AXL API for over 10 years now, but it has gotten better!

    here is an example to add a 7912 without lines, almost to the bare minimum

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <axl:addPhone xmlns:axl="http://www.cisco.com/AXL/API/8.5"  xsi:schemaLocation="http://www.cisco.com/AXL/API/8.5 http://ccmserver/schema/axlsoap.xsd" xsi:type="XRequest" sequence="1234">
    <phone>
    <name>SEPDEADBEEF0105</name>
    <description>Demo User105</description>
    <product>Cisco 7912</product>
    <model>Cisco 7912</model>
    <class>Phone</class>
    <protocol>SCCP</protocol>
    <protocolSide>User</protocolSide>
    <devicePoolName>Melbourne</devicePoolName>
    <commonPhoneConfigName>Standard Common Phone Profile</commonPhoneConfigName>
    <locationName>LOC_MEL</locationName>
    <securityProfileName>Cisco 7912 - Standard SCCP Non-Secure Profile</securityProfileName>
    <phoneTemplateName>Standard 7912 SCCP</phoneTemplateName>
    </phone>
    </axl:addPhone>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Subject: Re: New Message from Dan-Anders Hook in Administration XML (AXL) - Administ
    Replied by: Sascha Monteiro on 01-12-2011 07:42:55 PM
    one thing I notice is that you have an element <class_> but should be <class> instead..

    Subject: RE: AXL AddPhoneRequest on CUCM 8.6 fails with null pointer exception
    Replied by: Jonas Hoffmann on 02-12-2011 09:58:13 AM
    OK, thank you for your help! I think I figured it out now.

    I used a simple perl-client to debug the soap-request that I had previously captured and to my surprise it turned out the request is completely fine!

    The only difference was in the header. I could narrow it down to the Soapaction-field in the header sent from the JAX-WS-client:

    Soapaction: "CUCM: DB ver=8.5 addPhone"

    If I remove this line from the header or set it to an empty string the phone is added without any errors.
    It seems you can set this property in Java using something like:

    ((BindingProvider)this.getPort()).getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, "");

    But this will change this attribute also for other requests in the same context, which does not seem to be a good idea.
    I ended up changing this line in the AXLAPI.wsdl:

    --
    -      <soap:operation soapAction="CUCM: DB ver=8.5 addPhone" style="document"/>
    +     <soap:operation soapAction="" style="document"/>
    --

    The exact impacts of not setting the SoapAction are not clear to me though.

    And I totally agree that this seems like a bug in the AXL service, it should certainly not lead to a NullPointerException.

    Thanks again for your helpful examples.

    Regards,
    Jonas

    Subject: RE: AXL AddPhoneRequest on CUCM 8.6 fails with null pointer exception
    Replied by: Dan-Anders Hook on 03-12-2011 07:06:57 AM
    Hi,

    Glad to hear that :-)

    When the soapAction header is not set, you are connecting to the oldest available AXL schema in the CUCM release you are running. Chances are that your code won't work in the next release, since Cisco says that in some version CUCM will reject AXL requests with an invalid soapAction. Take a look at the chapter about AXL Versioning Support in the XML developers guide for more info. With a soapAction of CUCM: DB ver 8.5 you are connecting to the 8.5 schema, and that schema is more picky about namespaces than previous schemas so it might be something in your xml that the 8.5 schema does'nt like.

    Kind regards,

    //Dan

    Subject: RE: AXL AddPhoneRequest on CUCM 8.6 fails with null pointer exception
    Replied by: Jonas Hoffmann on 05-12-2011 06:10:04 AM
    Hi,
     

    When the soapAction header is not set, you are connecting to the oldest available AXL schema in the CUCM release you are running.


    Ugh, thanks, I didn't think of that.
    As I really wanted to use the new 8.5 schema, I re-enabled the "Soapaction" header and fiddled around with the attributes in the failing request, it turns out the following attribute is problematic:
     
    <mobilityUserIdName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
     
    I added the following Java Code to set this to an empty string:
     
            XFkType mobilityUserXfk = new XFkType();
            mobilityUserXfk.setValue("");
            xp.setMobilityUserIdName(mobilityUserXfk);
     
    now the requests contains this field:
     
    <mobilityUserIdName></mobilityUserIdName>
     
    and is successful! So it seems to me that despite of the documentation and .xsd saying otherwise this attribute is not nullable.
     
    Regards,
    Jonas

    Subject: RE: Re: New Message from Dan-Anders Hook in Administration XML (AXL) - Admi
    Replied by: Nate Kleven on 09-03-2013 02:44:54 PM
    I just verified this also fixes 9.0 schema.   I also spent hours trying to track this down.  I'm glad I found your post or I would probably still be troubleshooting this.
     
    Thanks!

    Subject: RE: New Message from Nate Kleven in Administration XML (AXL) - Administrati
    Replied by: Dennis Heim on 10-03-2013 08:19:58 AM
    What is “this”?

    Dennis Heim | Sr. Unified Collaboration Team Lead
    World Wide Technology | 314.212.1814 | dennis.heim@wwt.com<mailto:dennis.heim@wwt.com>
    “Creating Impact, Ignition & Scalability”

    From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
    Sent: Saturday, March 09, 2013 3:45 PM
    To: cdicuser@developer.cisco.com
    Subject: New Message from Nate Kleven in Administration XML (AXL) - Administration XML Questions: RE: Re: New Message from Dan-Anders Hook in Administration XML (AXL) - Admi

    Nate Kleven has created a new message in the forum "Administration XML Questions": -------------------------------------------------------------- I just verified this also fixes 9.0 schema.   I also spent hours trying to track this down.  I'm glad I found your post or I would probably still be troubleshooting this.

    Thanks!
    --
    To respond to this post, please click the following link: http://developer.cisco.com/web/axl/forums/-/message_boards/view_message/12829943 or simply reply to this email.

    Subject: RE: AXL AddPhoneRequest on CUCM 8.6 fails with null pointer exception
    Replied by: Nate Kleven on 11-03-2013 03:23:15 PM
    Sorry, specifically passing a blank MobilityUserID fixed my issue:
     
    XFkType mobilityUserXfk = new XFkType();
    mobilityUserXfk.setValue("");
    xp.setMobilityUserIdName(mobilityUserXfk);