Simon Nash wrote:
Scott Kurz wrote:
One more detail that might be relevant is the fact that the POJO/bean
type and the interface (and therefore wrapper) type are in different
packages.     I seem to remember this in certain cases in the past
mattering.

This seems to be an important detail.  The 1.x itest wsdlgen-verify
has a test for a POJO type in the same package as the interface, and
this works OK with the 1.x trunk.  I extended this test case to use
a POJO type in a different package from the interface type and this
generated incorrect WSDL (the other package was ignored and the XML
type for the POJO was generated in the interface package).

I'll try to figure out what's causing the other package to be ignored
in this case.

This is caused by the JAX-WS "feature" of ignoring the JAXB-specified
namespace mapping of packages that don't have an explicit @XmlSchema
annotation.  I was aware that this happens for the interface package,
but I didn't know that it also happens for other packages.

I modified my test case to add a package-info.java with an @XmlSchema
annotation to the package of the POJO class, and this made things work
as I was expecting on the 1.x trunk.  It might be worth doing this for the
failing case on 2.x to see what happens.  The code in package-info.java
would look like this:

@XmlSchema(namespace = "http://model.dc.simple/";)
package simple.dc.model;

import javax.xml.bind.annotation.XmlSchema;

  Simon

  Simon

I'd been wondering whether it was better to open a new JIRA or re-open
a 1.x JIRA;  sorry for going quiet there....

Scott






Reply via email to