Axis2
  1. Axis2
  2. AXIS2-1701

Axis2 incorrectly serialized (to xml) XBeans adds xmlns=""

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Component/s: codegen, databinding
    • Labels:
      None
    • Environment:
      Axis 2 1.1 RC2
      FC3

      java version "1.5.0_06"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
      Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)

      Description

      When running this code snippet (below), axis2 adds a xmlns="" to the importPortlets element.
      <importPortlet xmlns="" importID="foo">
      However importRequest.toString() correctly serializes it.

      Code:
      final ImportPortletsDocument importRequest = ImportPortletsDocument.Factory.newInstance(xmlOptions);
      final ImportPortlets importPortlets = importRequest.addNewImportPortlets();
      importPortlets.setImportContext(importContext);
      importPortlets.setNilLifetime();
      RegistrationContext registrationContext = importPortlets.addNewRegistrationContext();
      registrationContext.setNil();

      importPortlets.setNilUserContext();
      final ImportPortlet importPortlet = importPortlets.addNewImportPortlet();
      importPortlet.setImportID("foo");
      importPortlet.setExportData(exportData);

      System.out.println(importRequest);
      final ImportPortletsResponseDocument importResponseDoc = stub.importPortlets(importRequest);
      Axis2 XML:
      <?xml version="1.0" encoding="UTF-8"?>
      [exec] <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsee="urn:wsee:Security">
      [exec] <soapenv:Header/>
      [exec] <soapenv:Body>
      [exec] <importPortlets xmlns="urn:oasis:names:tc:wsrp:v2:types">
      [exec] <registrationContext>
      [exec] <registrationHandle>2004</registrationHandle>
      [exec] </registrationContext>
      [exec] <importContext>QkVBOldMUDpFWFBPUlQ6MS4wOmVuLVVT</importContext>
      [exec] <importPortlet xmlns="" importID="foo">
      [exec] <exportData xmlns="urn:oasis:names:tc:wsrp:v2:types">H4sIAAAAAAAAALVU207bQBClUp/6FStLbZ/stSkgkiZBtAKEFCTUhqrqC9p4J3jVvWl3TQKv/Zj+R/tjnbWDSQS0CBVLlq3xzDkzZ453Y+PFy8HeQklyCc4Lo4dJkeUJAV0aLvTFMDmbHKa7yd5oIE3JpLhmAbM+gTe1K8HfHyYcfOmEDQ3g+O2+tBWbQiAzx/TvH79+MuET0lTCMJm5hAQR4mtdVxWp6uZO6GPAvwEnTNZKaFGrW0zQ6dGHDvZjBeCEiYj0gTEep4E1LjDZd8YEghfWaN/XEGqxGCZVCLZP6Xw+z6bAstIo6sFFTNqm0IXntDQ6OCO7GFJFsg6tpXgsWptNfW3j2x2wKqh1qPm7zLgLWvR6PbqIX9MWLFU46kwAvwOx8OI+hM08L+jXk/HnsgLFUqF9YLqEttCLvm/iYxS73dPTxyFtMF0G0+I8P88zzE5Gg7a00UxCOF42QRRz32s7ubK4+9P2W+eFUwczcLhbQAvetD1Gd6JQk6083yy2ejtFsRMf27vbebGdkLgz0OHMoRQUuAgWQTxdgTrAoHGZvSEzTmDBcnaUk8OM1TKcoE2VuAaOrmfSw8oIHRbRTGGf1plgSiMTcon+xsDxyf5pQto9sWkcJbgaBVeIK77EHH4TWvtDdC1ldP5DRDXuoSPRLMBzkLS77mjUVcaNYkJHI6zztbqsEy5ja4wHWC5Ji0sY5w68/1sHFUh75m7lXBpyrRNaXoi0OSBoTN8rhxNjX2/mwVhRvmHKvjfDSPu0jv+lETdzLQ3jh0byFa2EnprFc+zkAT6Pxn0OuvhvdCS93n/YeoMYz/T7j4HRqwFdObBHfwDYui+f7AYAAA==</exportData> [exec] </importPortlet>
      [exec] <userContext xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
      [exec] <lifetime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
      [exec] </importPortlets>
      [exec] </soapenv:Body>
      [exec] </soapenv:Envelope>
      XmlBeans XML:
      <importPortlets xmlns="urn:oasis:names:tc:wsrp:v2:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <registrationContext xsi:nil="true"/>
      <importContext>QkVBOldMUDpFWFBPUlQ6MS4wOmVuLVVT</importContext>
      <importPortlet importID="foo">
      <exportData>H4sIAAAAAAAAALVU207bQBClUp/6FStLbZ/stSkgkiZBtAKEFCTUhqrqC9p4J3jVvWl3TQKv/Zj+R/tjnbWDSQS0CBVLlq3xzDkzZ453Y+PFy8HeQklyCc4Lo4dJkeUJAV0aLvTFMDmbHKa7yd5oIE3JpLhmAbM+gTe1K8HfHyYcfOmEDQ3g+O2+tBWbQiAzx/TvH79+MuET0lTCMJm5hAQR4mtdVxWp6uZO6GPAvwEnTNZKaFGrW0zQ6dGHDvZjBeCEiYj0gTEep4E1LjDZd8YEghfWaN/XEGqxGCZVCLZP6Xw+z6bAstIo6sFFTNqm0IXntDQ6OCO7GFJFsg6tpXgsWptNfW3j2x2wKqh1qPm7zLgLWvR6PbqIX9MWLFU46kwAvwOx8OI+hM08L+jXk/HnsgLFUqF9YLqEttCLvm/iYxS73dPTxyFtMF0G0+I8P88zzE5Gg7a00UxCOF42QRRz32s7ubK4+9P2W+eFUwczcLhbQAvetD1Gd6JQk6083yy2ejtFsRMf27vbebGdkLgz0OHMoRQUuAgWQTxdgTrAoHGZvSEzTmDBcnaUk8OM1TKcoE2VuAaOrmfSw8oIHRbRTGGf1plgSiMTcon+xsDxyf5pQto9sWkcJbgaBVeIK77EHH4TWvtDdC1ldP5DRDXuoSPRLMBzkLS77mjUVcaNYkJHI6zztbqsEy5ja4wHWC5Ji0sY5w68/1sHFUh75m7lXBpyrRNaXoi0OSBoTN8rhxNjX2/mwVhRvmHKvjfDSPu0jv+lETdzLQ3jh0byFa2EnprFc+zkAT6Pxn0OuvhvdCS93n/YeoMYz/T7j4HRqwFdObBHfwDYui+f7AYAAA==</exportData>
      </importPortlet>
      <userContext xsi:nil="true"/>
      <lifetime xsi:nil="true"/>
      </importPortlets>

      1. wsrp-wsdl-full-v2.wsdl
        3 kB
        Nathan Lipke
      2. wsrp-2.0-types.xsd
        65 kB
        Nathan Lipke
      3. wsrp-2.0-interfaces.wsdl
        35 kB
        Nathan Lipke
      4. wsrp-2.0-bindings.wsdl
        35 kB
        Nathan Lipke

        Issue Links

          Activity

          Nathan Lipke created issue -
          Nathan Lipke made changes -
          Field Original Value New Value
          Attachment wsrp-2.0-types.xsd [ 12344926 ]
          Deepal Jayasinghe made changes -
          Affects Version/s 1.2 [ 12312159 ]
          Affects Version/s 1.1 [ 12312059 ]
          Davanum Srinivas made changes -
          Assignee Amila Chinthaka Suriarachchi [ amilachinthaka ]
          Deepal Jayasinghe made changes -
          Priority Major [ 3 ] Blocker [ 1 ]
          Srinath Perera made changes -
          Link This issue is related to AXIS2-1723 [ AXIS2-1723 ]
          Nathan Lipke made changes -
          Attachment wsrp-2.0-bindings.wsdl [ 12360207 ]
          Nathan Lipke made changes -
          Attachment wsrp-2.0-interfaces.wsdl [ 12360208 ]
          Nathan Lipke made changes -
          Attachment wsrp-wsdl-full-v2.wsdl [ 12360209 ]
          Amila Chinthaka Suriarachchi made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Amila Chinthaka Suriarachchi
              Reporter:
              Nathan Lipke
            • Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development