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

Type inheritance does not work with JAXBRI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.3
    • None
    • databinding
    • JDK 1.5

    Description

      Type inheritance does not work with JAXBRI

      Code generated using the following settings from the attached WSDL:
      <databindingName>jaxbri</databindingName>
      <generateServerSide>true</generateServerSide>
      <generateServerSideInterface>true</generateServerSideInterface>
      <generateServicesXml>true</generateServicesXml>
      <syncMode>sync</syncMode>
      <generateAllClasses>true</generateAllClasses>
      <unpackClasses>true</unpackClasses>

      The following code
      Example z = new ExampleStub("http://localhost:8888/axis2/services/Example");
      MetodaInput m = new MetodaInput();
      m.setTest("test string");
      Child ch = new Child();
      ch.setI(19);
      ch.setS("child");
      m.setPar(ch);
      z.metoda(m);

      renders this incorrect SOAP (child type and "s" field are lost):
      <soapenv:Body><metoda xmlns="http://example.org/"><test>test string</test><par><i>19</i></par></metoda></soapenv:Body>

      while correct would be:
      <soapenv:Body><metoda xmlns="http://example.org/"><test>test string</test><par xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="child"><i>19</i><s>child</s></par></metoda></soapenv:Body>

      The problem could be in JAXBContext creation in Stub:
      jc = javax.xml.bind.JAXBContext.newInstance(org.example.MetodaInput.class);

      Attachments

        1. example.wsdl
          2 kB
          Martin Caslavsky

        Activity

          People

            Unassigned Unassigned
            martiner Martin Caslavsky
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: