[jbossws-issues] [JBoss JIRA] Commented: (JBWS-2975) JAXBSerializer does not use defaultNamespace to create JAXBContext

Jim Ma (JIRA) jira-events at lists.jboss.org
Sun Mar 28 03:11:37 EDT 2010


    [ https://jira.jboss.org/jira/browse/JBWS-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12522405#action_12522405 ] 

Jim Ma commented on JBWS-2975:
------------------------------

There is the same issue in JAXBDeserializer.

> JAXBSerializer does not use defaultNamespace to create JAXBContext 
> -------------------------------------------------------------------
>
>                 Key: JBWS-2975
>                 URL: https://jira.jboss.org/jira/browse/JBWS-2975
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-native
>    Affects Versions: jbossws-native-3.3.0.CR1
>            Reporter: Jim Ma
>            Assignee: Jim Ma
>             Fix For: jbossws-native-3.3.0
>
>
> 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;
>     }
> }
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbossws-issues mailing list