Skip to main content

Abstract Classes and JAXWS

5 replies [Last post]
dovholuk
Offline
Joined: 2005-04-26
Points: 0

Hi All,

Does JAXWS 'support' abstract classes in lieu of substitutions or choice groups?

I can't seem to get derived types to be properly written to the wsdl.

Any help is appreciated.

Thanks,
dohvoluk

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dovholuk
Offline
Joined: 2005-04-26
Points: 0

here's a sample wsdl which does not react as i expect


targetNamespace="http://TestSchema.Geometry"
xmlns:types="http://TestSchema.Geometry.Types"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://TestSchema.Geometry"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">


xmlns:tns="http://TestSchema.Geometry.Types"
targetNamespace="http://TestSchema.Geometry.Types">






















































kohsuke
Offline
Joined: 2003-06-09
Points: 0

Yes. You can use @XmlElementRef and hae subclasses use different tag names.

This would be an excellent topic for https://jaxb.dev.java.net/guide/

If only I have some time to update it...

dovholuk
Offline
Joined: 2005-04-26
Points: 0

Thanks again for answering... Is there any way that I can get the @XmlElementRef annotation added when generating jaxb artifacts from a schema/wsdl?

kohsuke
Offline
Joined: 2003-06-09
Points: 0

Maybe I misunderstood your question. If you're compiling WSDL, you should have gotten the right annotations and the right set of classes.

Perhaps your question was "I got such and such databinding for my WSDL but I wanted it little different". If so, please explain what you got and what you wanted.

dovholuk
Offline
Joined: 2005-04-26
Points: 0

kohsuke,

i think that the following bug here: https://jaxb.dev.java.net/issues/show_bug.cgi?id=201
is exactly the issue i'm referring to

thanks