wsdl2java replaces @XmlSeeAlso annotation on the base class if the base class 
already exists.
---------------------------------------------------------------------------------------------

                 Key: CXF-2312
                 URL: https://issues.apache.org/jira/browse/CXF-2312
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.1.5
         Environment: Windows XP
            Reporter: Ed Wei


when using wsdl2java to generate java classes from wsdl files, if the wsdl file 
contains type definitions of an already generated class, the @XmlSeeAlso 
annotaion of the class gets replaced instead of appended. 

for example, suppose B extends A. and class A already exists in the target 
directory.  A have the following code:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "A")
@XmlSeeAlso({B.class})
public class A{
}

if wsdl2java is run on a wsdl file that defines C extends A, the resulting 
source code for class A SHOULD be:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "A")
@XmlSeeAlso({B.class, C.class})
public class A{
}

it should NOT be:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "A")
@XmlSeeAlso({C.class})
public class A{
}

wsdl2java should not remove annotations, but should append instead. this is 
crutial for situations where we share objects between 2 different web services, 
where web service 1 defines class A and B, and web service 2 defines Class A 
and C.  in this situation, when wsdl2java is run first on web service 1 and 
then on web service 2, the resulting class A should have @xmlseealso specified 
on class A for both class B and C.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to