views:

39

answers:

2

Hi, I'm parsing a WSDL which has a xsd:choice. How can I model a xsd:choice on java?, I didn't find a union class or something like that.

A: 

JAXB does this , Give it a try it will choose proper model.

org.life.java
I'm using EasyWSDL to parse the WSDL.
Federico
@Federico JAXB will create model for you from parser XSD.
org.life.java
thanks I tried it and it's very good
Federico
A: 

You can use a "Marker" interface (an interface which defines no methods) and let the different choices be a class which implements that interface.

Peter Tillemans