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

wsdl2java uses java primitives for the xsd primitives

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • nightly
    • None
    • codegen
    • None

    Description

      The type mapping for wsdl2java is wrong.
      The XSD primitives are mapped to the java primitives. So it is not possible to transport a null or nil value between the client and the server.

      Here is my suggested patch for file "modules/adb-codegen/src/org/apache/axis2/schema/typemap/JavaTypeMap.java":

      addTypemapping(SchemaConstants.XSD_BOOLEAN, Boolean.class.getName());
      addTypemapping(SchemaConstants.XSD_DOUBLE, Double.class.getName());
      addTypemapping(SchemaConstants.XSD_FLOAT, Float.class.getName());
      addTypemapping(SchemaConstants.XSD_INT, Integer.class.getName());
      addTypemapping(SchemaConstants.XSD_LONG, Long.class.getName());
      addTypemapping(SchemaConstants.XSD_SHORT, Short.class.getName());
      addTypemapping(SchemaConstants.XSD_BYTE, Byte.class.getName());

      This works fine for me.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified