WSDL2JAVA problems at CUCM8.5

Version 1
    This document was generated from CDN thread

    Created by: Thies van Gunst on 21-03-2012 08:58:38 AM
    I have downloaded axlsqltoolkit.zip from CUCM8.6 (unchanged within 8.6 -> 8.5 schema is used)
     
    When I try to generate Java-Code by wsdl2java as decribed in AXL.SOAP_Java.pdf (axis-1.4) I get the following messages:
     
    {http://www.cisco.com/AXL/API/8.5}XBATFrequency>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBATFunction>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBATJobStatus>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBATResultStatus>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBATTarget>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBATUsage>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBLFSDOption>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBandwidth>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBarge>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBillingserverprotocol>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBitPos>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBoolean>null already exists
    {http://www.cisco.com/AXL/API/8.5}XBriProtocol>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCFACSSActivationPolicy>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCOSRouting>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCOSRoutingClassification>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCSUParam>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCallInfoDisplay>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCallState>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCallTreatmentOnFailure>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCallerFilterMask>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCallerID>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCallingPartySelection>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCertificate>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCertificateOperation>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCertificateService>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCertificateStatus>null already exists
    {http://www.cisco.com/AXL/API/8.5}XClass>null already exists
    {http://www.cisco.com/AXL/API/8.5}XClientAppModel>null already exists
    {http://www.cisco.com/AXL/API/8.5}XClockReference>null already exists
    {http://www.cisco.com/AXL/API/8.5}XConfigInputData>null already exists
    {http://www.cisco.com/AXL/API/8.5}XConfigInputDataGrouping>null already exists
    {http://www.cisco.com/AXL/API/8.5}XConnectedPBX>null already exists
    {http://www.cisco.com/AXL/API/8.5}XConnection>null already exists
    {http://www.cisco.com/AXL/API/8.5}XConnectionUsage>null already exists
    {http://www.cisco.com/AXL/API/8.5}XContact>null already exists
    {http://www.cisco.com/AXL/API/8.5}XContactAddress>null already exists
    {http://www.cisco.com/AXL/API/8.5}XContactFolder>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCountry>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCredential>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCredentialUser>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCubaDevice>null already exists
    {http://www.cisco.com/AXL/API/8.5}XCubaProductDisplayGroup>null already exists
    {http://www.cisco.com/AXL/API/8.5}XDNDOption>null already exists
    {http://www.cisco.com/AXL/API/8.5}XDNUsage>null already exists
    {http://www.cisco.com/AXL/API/8.5}XDPDeviceProtocol>null already exists
    {http://www.cisco.com/AXL/API/8.5}XDPJobFeature>null already exists
    ...
     
    For each warnig occures during generation two classes are generated:
    XBATFrequencyNull.java
    XBATFrequency.java
     
    I do not get this messages if I generate code for 6.1 or 7.0
     
    Can I use the generated classses without problems? What do I have to do to remove the messages at the code generation?
     
    I hava also not the errors descibed within
    http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/devguide/8_6_1/axl.html
    (search for wsdl2java)
     
    When I try to generate code by wsimport, some classes are not generated (AXLAPIBindingStub.java, AXLAPIServiceLocator.java) and the package name of API is \com\cisco\axl\api\_8\
     

    Subject: RE: WSDL2JAVA problems at CUCM8.5
    Replied by: Thies van Gunst on 23-03-2012 08:00:37 AM
    Within the 7.0 and 7.1 within the file axlsqltoolkit.zip have been sub-directories WSDL-AXIS adn WSDL-NET. This sub-dirs are no longer existing for 8.0 and 8.5.
    Is code-generation from wsdl-file using axis still supported? Within axlsqltoolkit.zip we have also schema for 7.0 and 7.1. When I generate java-code from this files everything works fine. CUCM 8.6 still handles this schema so that "listUserByName" and "addUser" worked fine.
     
    Is there missing sometihin inside axlsqltoolkit.zip? Do I have to generate code in an other way?

    Subject: RE: WSDL2JAVA problems at CUCM8.5
    Replied by: David Staudt on 27-03-2012 11:34:56 AM
    The intention is that the same set of WSDL/XSD files works with Axis and .NET (and hopefully others, like SOAP::LITE), obviating the need for separate versions.

    Subject: RE: WSDL2JAVA problems at CUCM8.5
    Replied by: Thies van Gunst on 03-04-2012 09:46:03 AM
    I still have problems with code-generation using axis 1.4. I have to use Java and not .Net. Is it possible that the documentation about WSDL2java using axis is not up-to-date?

    Subject: RE: WSDL2JAVA problems at CUCM8.5
    Replied by: David Staudt on 03-04-2012 11:53:47 AM
    Can you detail the problems?  If it's the 'null already exists' messages as above, I see this also, and the resulting classes appear ok - are you seeing issues?

    Subject: RE: WSDL2JAVA problems at CUCM8.5
    Replied by: Thies van Gunst on 04-04-2012 04:40:04 AM
    compiler errors:

    XInteger.java:

        public XInteger(java.math.BigInteger _value) {
            super(_value);
        }

    as the super-class of XInteger is Object call of super(_value) is wrong here. Can this be replaced by "this.value = _value" ?

    some expected stub-functions like listUserByName are missing (replaced by listUser ?) listUserByName is still mentioned within documentation of CUCM8.6


    some runtime exceptions within log4j file:

    ProjectResourceBundle$Context                loadBundle:423  loadBundle: Ignoring MissingResourceException: Can't find bundle for base name org.apache.axis.resource, locale en_US
    ProjectResourceBundle                 getBundle:318  Created org.apache.axis.i18n.resource, linked to parent null
    ProjectResourceBundle                 getBundle:264  getBundle(org.apache.axis,org.apache.axis.utils,resource,null,...)
    ProjectResourceBundle$Context                loadBundle:423  loadBundle: Ignoring MissingResourceException: Can't find bundle for base name org.apache.axis.utils.resource, locale en_US
    ProjectResourceBundle$Context                loadBundle:423  loadBundle: Ignoring MissingResourceException: Can't find bundle for base name org.apache.axis.resource, locale en_US
    ProjectResourceBundle                 getBundle:328  Root package not found, cross link to org.apache.axis.i18n.resource
    ProjectResourceBundle                 getBundle:328  Root package not found, cross link to org.apache.axis.i18n.resource

    Somehow possible to get rid of them?


    ....

    Many exception like this:

    java.lang.IllegalArgumentException: java.lang.NoSuchMethodException: com.cisco.www.AXL.API._8_5.LAnalogPortSigDigits.<init>(java.lang.String)
    at org.apache.axis.encoding.ser.SimpleDeserializerFactory.initConstructor(SimpleDeserializerFactory.java:78)
    at org.apache.axis.encoding.ser.SimpleDeserializerFactory.<init>(SimpleDeserializerFactory.java:54)
    at org.apache.axis.encoding.ser.BaseDeserializerFactory.createFactory(BaseDeserializerFactory.java:208)
    at com.cisco.www.AXLAPIService.AXLAPIBindingStub.addBindings2(AXLAPIBindingStub.java:10126)
    at com.cisco.www.AXLAPIService.AXLAPIBindingStub.<init>(AXLAPIBindingStub.java:8455)
    at com.cisco.www.AXLAPIService.AXLAPIBindingStub.<init>(AXLAPIBindingStub.java:8429)
    at com.cisco.www.AXLAPIService.AXLAPIServiceLocator.getAXLPort(AXLAPIServiceLocator.java:55)
    at com.cisco.www.AXLAPIService.AXLAPIServiceLocator.getAXLPort(AXLAPIServiceLocator.java:50)



    exeption already seen at 7.1 schema but seems not to be a problem:

    org.apache.axis.ConfigurationException: No service named AXLPort is available
    org.apache.axis.ConfigurationException: No service named AXLPort is available
    at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233)
    at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
    at org.apache.axis.MessageContext.setTargetService(MessageContext.java:756)
    at org.apache.axis.client.Call.invoke(Call.java:2690)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    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.listUser(AXLAPIBindingStub.java:39216)

    ...


    org.apache.axis.ConfigurationException: No service named CUCMB ver=8.5 listUser is available
    org.apache.axis.ConfigurationException: No service named CUCMB ver=8.5 listUser is available
    at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233)
    at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
    at org.apache.axis.MessageContext.setTargetService(MessageContext.java:756)
    at org.apache.axis.transport.http.HTTPTransport.setupMessageContextImpl(HTTPTransport.java:89)
    at org.apache.axis.client.Transport.setupMessageContext(Transport.java:46)
    at org.apache.axis.client.Call.invoke(Call.java:2738)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    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.listUser(AXLAPIBindingStub.java:39216)


    ListUser works also with schema 8.6 now

    Subject: RE: WSDL2JAVA problems at CUCM8.5
    Replied by: Thies van Gunst on 16-04-2012 05:10:42 AM
    Hi,

    for adding a "Translation Pattern" addTransPattern() I need to add a AddTransPatternReq containing a required param XPatternUsage. But this class is one of the above mentioned which causes warnings during code generation. The class XPatternUsage has a constructor with empty params, no setter-functions or any publich member variables. So there is no way to set usage to "Translation" or anything else. The class XPatternUsageNull conains much of public member variables. But this class cann not be used for AddTransPatternReq

    What can be done to fix this? Changes on wsdl-file? merge XPatternUsageNull.java  and XPatternUsage.java ?

    Subject: RE: WSDL2JAVA problems at CUCM8.5
    Replied by: Thies van Gunst on 19-04-2012 10:23:02 AM
    HI,

    I found out some more things causing the warnings during code generation (as already mentioned here, the generated classes where the warning during generation had occurred causes also problems at runtime) All warnings have in common, that they use "union" (new since 8.0) within AXLSoap.xsp. axis1-4 does not like members within the union without names

       <xsd:simpleType name="XZzpreff">
    <xsd:union>
    <xsd:simpleType>
          <xsd:restriction base="xsd:string">
             <xsd:enumeration value="Off"/>
             <xsd:enumeration value="On"/>
          </xsd:restriction>
       </xsd:simpleType>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    </xsd:union>
    </xsd:simpleType>

    when I change to this:

       <xsd:simpleType name="XZzpreff">
    <xsd:union>
    <xsd:simpleType name="e1">
          <xsd:restriction base="xsd:string">
             <xsd:enumeration value="Off"/>
             <xsd:enumeration value="On"/>
          </xsd:restriction>
       </xsd:simpleType>
    <xsd:simpleType name="e2">
    <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    </xsd:union>
    </xsd:simpleType>

    the warning has gone.

    But then I got a class XZzpreffE1.java and no second class is generated. An of curse I have a this "e1" also within the generated class:

            typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.cisco.com/AXL/API/8.5", "XZzpreff>e1"));

    I think the extension ">e1" will cause at runtime. (was not able to check it at the moment)


    By this I have also seen, that no class with E2 in its name was generated. I checked then every second union-member. All are empty! I added one entry to check this again and what a surprise I got a class containing E2 in its name. But this means that if no names are added to the union-members, the files which have "null" in its file name are the needed ones!. All other classes where a class with "null" in its name exists are empty skeletons! If for example the files XZzuserInfo.java and XZzntpmode.java are compared they only differ in the class name.

    Any idea for a workaround? I think it should be done within AXLSoap.xsd as there are 266 unions with this problem. Changing 266 generated files does not make sense.

    Subject: RE: WSDL2JAVA problems at CUCM8.5
    Replied by: Thies van Gunst on 27-04-2012 01:11:01 AM
    Hi,

    a solution for me is now to replace all unions within AXLSoap.xsd by its first member.


    Example:

    <xsd:simpleType name="XZzpreff">
    <xsd:union>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="Off"/>
    <xsd:enumeration value="On"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    </xsd:union>
    </xsd:simpleType>


    changed to:

    <xsd:simpleType name="XZzpreff">
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="Off"/>
    <xsd:enumeration value="On"/>
    </xsd:restriction>
    </xsd:simpleType>

    With this change everyting works fine now. No warnings at code-generation, no compiler errors and no new runtime errors compared with cucm 7.1