Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5940

WSDL2Java -p --package does not generate all classes under the given package

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.7.8
    • None
    • codegen, wsdl
    • None

    Description

      I am trying to force WSDL2Java (org.apache.axis2.wsdl.WSDL2Java) to generate all the classes under a given base package, for example com.mycompany.thewebservice.*

      According to the documentation the -p option should do the trick:

      -p --package The target package name. If omitted, a default package (formed using the target namespace of the WSDL) will be used.

      But unfortunately when we use the -p option, only the 3 main classes (XService.java, XCallbackHandler.java and XServiceStub.java) are generated under the given package. Many other packages are generated like for example:

      • com.theservice.*
      • org.w3.www._2004._60.xmlmime
      • org.xmlsoap.schemas.soap.encoding

      This is a mess for us because we integrate many webservices and we want to keep all the classes for a service under a common base folder.

      We were using Axis 1 in the past and its WSDL2Java (org.apache.axis.wsdl.WSDL2Java) has a parameter --package that works like a charm. In this case all the classes are neatly generated under the package that I specify.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ofrias Oscar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: