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

The generated schema by axis2 seems invalid when OMElements are specified as input parameters in service implementation class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.3
    • None
    • om
    • None
    • winxp, jdk15, Axis2-SNAPSHOT (1.3)

    Description

      Please correct me if i'm wrong. I feel there is an error when generating schema if OMElements are included in service implementation class.

      I have a service implementation class with following signature.

      public OMElement echotest(OMElement x, OMElement y){
      }

      I deployed a service archive with above method and retrieved the schema by issuing ?xsd. I got following.

      <xs:schema>
      <xs:element name="echotest">
      <xs:complexType>
      <xs:sequence>
      <xs:element minOccurs="0" name="echotest" nillable="true" type="xs:anyType"/>
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      <xs:element name="echotestResponse">
      <xs:complexType>
      <xs:sequence>
      <xs:element minOccurs="0" name="return" nillable="true" type="xs:anyType"/>
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:schema>

      As you can see, only one element is added as input parameter though the method contains two params. If you deploy the same service by replacing OMElement with other primitive type (int, String etc) you will get schema with correct no. of input parameters.
      <xs:sequence>
      <xs:element name="a" nillable="true" type="xs:anyType"/>
      <xs:element name="b" nillable="true" type="xs:anyType"/>
      </xs:sequence>

      Attachments

        1. Myaxistest.aar
          1 kB
          Charitha Kankanambe

        Activity

          People

            deepal Deepal Jayasinghe
            charitha Charitha Kankanambe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: