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

"invalid QName prefix" exception when generating WSDL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.94
    • 0.95
    • wsdl
    • None
    • Windows XP Pro, JBoss

    Description

      In org.apache.axis2.wsdl.java2wsdl.Java2WOM rev. 366099, the "targentNamespece" and "targetNamespecheprefix" variables are not initialized with any value. When Java2WSDL instantiates Java2WOM, it also makes assumption that these 2 parameters are null.

      SUGGESTED RESOLUTION(S):
      --------------------------------------------------
      1. Set the default values for the 2 variables (line 56 and 57 of Java2WOM):
      private String targentNamespece = SchemaGenerator.SCHEMA_TARGET_NAMESPACE;
      private String targetNamespecheprefix = SchemaGenerator.SCHEMA_NAMESPACE_PRFIX;

      2. Add methods to allow Java2WSDL to accept "targetNamespace" and "targetNamespacePrefix" from users.

      Stack trace is as follows:
      ------------------------------------
      [JAM] Warning: You are running under a pre-1.5 JDK. JSR175-style source annotations will not be available
      java.lang.IllegalArgumentException: invalid QName prefix
      at javax.xml.namespace.QName.<init>(QName.java:81)
      at org.apache.axis2.wsdl.java2wsdl.Java2WOM.generateWOM(Java2WOM.java:99)
      at org.apache.axis2.wsdl.java2wsdl.Java2WSDL.generateWSDL(Java2WSDL.java:43)
      at test.Axis2Test.generateWsdl(Axis2Test.java:56)
      at test.Axis2Test.main(Axis2Test.java:170)

      Attachments

        Activity

          People

            Unassigned Unassigned
            juandazeng Juanda Zeng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: