7 Replies Latest reply: Mar 14, 2013 8:23 AM by 996915 RSS

    Axis WSDL2Java emitter not generating all the required classes

    947051
      Hello,

      I am working on an application that connects to the CRM-OD database via a Java, for Web services 2.0.
      I downloaded the custom WSDL files for ServiceRequest, Activity and Note services. But when I used the Axis WSDL2Java emitter from creating Java classes for the WSDL’s, I noticed few classes missing from the “crmondemand.xml.<servicename>.data” namespace, such as the ‘ListOf<servicename>data.java’ class.
      The field elements are clearly present in the WSDL file but not in the generated classes.
      Is there some way to fix this problem? Or am I doing something wrong? As that class in particular has recordcount and lastpage functions which are essential for the development of the application.

      Edited by: 944048 on Jul 2, 2012 1:15 PM

      Edited by: 944048 on Jul 2, 2012 1:16 PM
        • 1. Re: Axis WSDL2Java emitter not generating all the required classes
          805445
          what version of axis?
          what command line are you using?
          did you edit the wsdls at all?


          Thanks
          • 2. Re: Axis WSDL2Java emitter not generating all the required classes
            947051
            1. Version: Axis 1.4

            2. Command line(Win 7): java -classpath C:\axis\lib\*;C:\axis\lib org.apache.axis.wsdl.WSDL2Java <WSDL-Name>.wsdl -o src

            3. No I did not edit the WSDL's.

            Even when I use the Axis plugin for Eclipse WSDL emitter, it's the same result.

            BUT, if I use JAXB emitter it seems to give me all the classes I need, but as the previous documented code is based on Axis, I need to stick to Axis.

            Edited by: 944048 on Jul 6, 2012 8:46 AM
            • 3. Re: Axis WSDL2Java emitter not generating all the required classes
              941709
              Run into similar problem today
              1. axis2-1.6.2
              2. wsdl2java.bat -uri C:\Oracle\Endeca\Server\2.3.0\apis\web-services\conversation.wsdl
              3. No

              It looks like complex types definitions which extend existing complex types are ignored.
              For example
              For this part:
                             <complexType name="ContentElementConfig">
                                  <annotation>
                                       <documentation>
                                            The ContentElementConfig type is a sort of "Abstract Base Class". Types that extend
                                            ContentElementConfig are logical representations of a chunk of data. A ContentElementConfig
                                            can provide a "projection" of data that is determined by its State.
                                            A custom ContentElementConfig must be paired with a
                                            handler function written in XQuery to work properly; the ContentElementConfig identifies
                                            the handler to call and provides appropriate configuration information for that handler.

                                            The actual subtype polymorphism is accomplished in a request by applying xsi:type to the
                                            specific ContentElementConfig instance in the request.
                                            Schemas that extend the ContentElementConfig are permitted to redeclare Handler with a default.
                                            This would look like:
                                            <complexType name="MyContentElementConfig">
                                                 <complexContent>
                                                      <extension base="ContentElementConfig">
                                                           <attribute name="HandlerNamespace" type="cs_v1_0:NonEmptyString" use="optional" default="MyDefault"/>
                                                           <attribute name="HandlerFunction" type="cs_v1_0:NonEmptyString" use="optional" default="MyDefaultFn"/>
                                                      </extension>
                                                 </complexContent>
                                            </complexType>
                                       </documentation>
                                  </annotation>
                                  <attribute name="Id" type="cs_v1_0:NonEmptyString" use="required"/>
                                  <attribute name="HandlerNamespace" type="cs_v1_0:NonEmptyString" use="required"/>
                                  <attribute name="HandlerFunction" type="cs_v1_0:NonEmptyString" use="required"/>
                             </complexType>
              ConfigStub.ContentElementConfig class is successfully created, but for this part

                             <complexType name="RecordListConfig">
                                  <annotation>
                                       <documentation>
                                            The RecordListConfig type contains inputs needed to define
                                            what is returned in the record list. A RecordList will be
                                            returned for each RecordListConfig provided.
                                            <code>Column</code> - defines a field to be returned in
                                            the RecordList of the Results.
                                            <code>RecordsPerPage</code> - defines the maximum number
                                            of Record elements to return in the ContentElement of the
                                            result; default is 10.
                                       </documentation>
                                  </annotation>
                                  <complexContent>
                                       <extension base="cs_v1_0:ContentElementConfig">
                                                 <sequence>
                                                      <element name="Column" type="cs_v1_0:NonEmptyString" maxOccurs="unbounded"/>
                                                      <element name="RecordsPerPage" type="unsignedInt" minOccurs="0"/>
                                                      <element name="Page" type="unsignedInt" minOccurs="0"/>
                                                      <element name="Sort" type="cs_v1_0:Sort" minOccurs="0" maxOccurs="unbounded"/>
                                                 </sequence>
                                                 <attribute name="MaxPages" type="unsignedInt" use="optional" default="20"/>
                                       </extension>
                                  </complexContent>
                             </complexType>


              ConfigStub.RecordListConfig class isn't created.
              • 4. Re: Axis WSDL2Java emitter not generating all the required classes
                Jackie_C
                I'm running into the exact same issue myself.
                In my situation, I'm looking for the LQLConfig, but that class, along with a number of others, are not created.

                Any ideas?
                • 5. Re: Axis WSDL2Java emitter not generating all the required classes
                  Jackie_C
                  After some digging, it seems like the default adb data binding has issues generating all of the classes for the complex types.

                  However, I was able to resolve this by changing the default data binding to xmlbeans (-d xmlbeans) in the command line call and all of the classes were generated and I was able to go on my merry way.

                  Hope this helps.
                  • 6. Re: Axis WSDL2Java emitter not generating all the required classes
                    996915
                    Thank you Jackie C, i tried to use your solution, but i can't find the data-binding parameter on axis 1.4. Did you used it on the 1.4 version?
                    • 7. Re: Axis WSDL2Java emitter not generating all the required classes
                      996915
                      Thank you Jackie C, i tried to use your solution, but i can't find the data-binding parameter on axis 1.4. Did you used it on the 1.4 version?