Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-4024

JAXBSerializer does not use defaultNamespace to create JAXBContext

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.1.0
    • EAP 5.0.0
    • Web Services
    • None

    Description

      The namespace prefix of type attribute in return element is lost in the marshaled message for GetCars object:

      -------Car.java----------
      @XmlSeeAlso(

      {Toyota.class, Ford.class}

      )

      public abstract class Car {
      private String model;
      private String make;

      public String getModel()

      { return model; }

      public void setModel(String model)

      { this.model = model; }

      public String getMake()

      { return make; }

      public void setMake(String make) { this.make = make; }
      }

      -----Ford.java----------
      public class Ford extends Car {

      private String color;
      private final String make="Ford";

      public Ford() { setMake("Ford"); }

      public String getMake() { return make; }

      public Ford(String model, String color)

      { setModel(model); this.color = color; }

      public String getColor()

      { return color; }

      public void setColor(String color)

      { this.color = color; }

      }

      --GetCars.java---------
      @XmlRootElement(name = "getSedansResponse", namespace = "http://jbossws.jboss.org")
      @XmlAccessorType(XmlAccessType.FIELD)
      @XmlType(name = "getSedansResponse", namespace = "http://jbossws.jboss.org")
      public class GetCars {

      @XmlElement(name = "return", namespace = "")
      private List<Car> _return;

      /**
      *

      • @return
      • returns List<Car>
        */
        public List<Car> getReturn() { return this._return; }

      /**
      *

      • @param _return
      • the value for the _return property
        */
        public void setReturn(List<Car> _return) { this._return = _return; }

        }

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-ema Jim Ma
              rhn-engineering-ema Jim Ma
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: