Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2620

wscompile fails to generate artifacts when reserved word is in WSDL namespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • jbossws-2.0.1.SP2
    • tools-jaxws
    • None

      If you have a webservice with the package name 'com.jboss.examples.Public.ws', running wsprovide generates a wsdl with the namespace: 'com.jboss.examples.Public.ws''.
      Then if you run wsconsume on the wsdl, it fails to generate the java artifacts.

      According to JAXB2.0 specification - Appendix D Section 5.1 Mapping from a Namespace URI. The algorithm in this section states, in item 8b, "If any of the resulting package name components are keywords then append underscore to them."

      Looking at the JAXB code, it does check for reserved words and will prepend an '_', however the order of operations should be changed. Currently it looks for reserved words first, then changes the package to lowercase as is the Java standard. It should change it to lowercase first then check for reserved words and it will function correctly.

      A bug [1] was opened on JAXWS showing the issue and suggesting the fix, which is a change to jaxb com/sun/xml/bind/api/impl/NameConverter.java

      [1] https://jax-ws.dev.java.net/issues/show_bug.cgi?id=599

              darran.lofthouse@redhat.com Darran Lofthouse
              rhn-support-bmaxwell Brad Maxwell
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: