Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2927

Axis 1.4 generated stubs are not having variables to store value

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.4
    • Fix Version/s: 1.2.1
    • Labels:
      None
    • Environment:
      Tomcat 8.5.32 running on Linux. JAX RPC service.

      Description

      Following is the wsdl snippet,

      <xs:complexType name="DateTime1">
                      <xs:annotation>
                          <xs:documentation>
      Primitive: Date Time: Specifies a date and/or time Date Time_1: Date and/or Time.
              </xs:documentation>
                      </xs:annotation>
                      <xs:simpleContent>
                          <xs:extension base="tns:DateTime1_Content">
                              <xs:attribute name="FormatText" type="tns:DateTime1_FormatText"/>
                          </xs:extension>
                      </xs:simpleContent>
                  </xs:complexType>
                  <xs:simpleType name="DateTime1_Content">
                      <xs:restriction base="xs:dateTime"/>
                  </xs:simpleType>
                  <xs:simpleType name="DateTime1_FormatText">
                      <xs:restriction base="xs:string"/>
                  </xs:simpleType>

      Corresponding stub generated using Axis 1.4 is as follows,(snippet)

      public class DateTime1  implements java.io.Serializable, org.apache.axis.encoding.SimpleType {
          private java.lang.String formatText;  // attribute
      
          public DateTime1() {
          }
      
          // Simple Types must have a String constructor
          public DateTime1(java.util.Calendar _value) {
              super(_value);
          }

      _value is not present in the DateTime1.java which is present in axis 1.2 stub. DateTime1_Content.java is not generated as it is a simpleType.

      Axis 1.2 Stub

      public class DateTime1  implements java.io.Serializable, org.apache.axis.encoding.SimpleType {
          private java.util.Calendar _value;
          private java.lang.String formatText;  // attribute
      
          public DateTime1() {
          }
      
          // Simple Types must have a String constructor
          public DateTime1(java.util.Calendar _value) {
              this._value = _value;
          }
          public DateTime1(java.lang.String _value) {
              java.util.Calendar cal =
                  (java.util.Calendar) new org.apache.axis.encoding.ser.CalendarDeserializer(
                      java.lang.String.class, org.apache.axis.Constants.XSD_STRING).makeValue(_value);
              this._value = cal;
          }

      How to access DateTime1 in code if there is no placeholder for it's value?

        Attachments

        1. DateTime1(Axis 1.4).zip
          1 kB
          Vamsi Krishna Bhagi
        2. DateTime1(AXIS 1.2.1).zip
          1 kB
          Vamsi Krishna Bhagi

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              VamsiBhagi Vamsi Krishna Bhagi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: