Thanks Jim. I learned something new. :-) To answer the other question:
> > I'm also curious if/how CXF/JAXB can enforce xs:choice? If you turn on schema validation in CXF, the schema validators should be able to enforce the xs:choice schema. If you look in samples/wsdl_first (in 2.0.2 kits), the cxf.xml there does configure the client and endpoint to do schema validation. Dan On Monday 08 October 2007, Jim Ma wrote: > You need to use the below jaxb binding file when run wsdl2java to > tell jaxb you need choice content : > > <jaxb:bindings version="2.0" schemaLocation="your.wsdl" > xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > node="//xsd:schema"> > <jaxb:globalBindings choiceContentProperty="true"/> > </jaxb:bindings> > > You will see the generated OjbectFactory.java is a different one. > CXF will load these classes you generated with this binding file and > run java2wsdl to generate the wsdl > contains choice content. > > -Jim > > David W Sica wrote: > > Ok, great, thanks. Let me ask you this then...if I run wsdl2java on > > my wsdl that contains xs:choice, deploy this with CXF, the resulting > > CXF-generated wsdl (I took out the wsdlLocation annotation) does not > > contain xs:choice? Does this make sense? > > > > I'm also curious if/how CXF/JAXB can enforce xs:choice? > > > > David > > > > Sent from my iPhone > > > > On Oct 8, 2007, at 3:21 PM, Daniel Kulp <[EMAIL PROTECTED]> wrote: > > > > On Monday 08 October 2007, David W Sica wrote: > > Does CXF wsdl2java support xs:choice XSD attributes? If it's not > > supported what will happen if I try to use wsdl2java against a > > schema that has this attribute? Finally, is there a place/document > > where I can find out what attributes are supported/non-supported? > > > > When using the JAXB databinding, there is VERY VERY little that > > isn't supported from a schema/wsdl first point of view. JAXB was > > designed to map as much of schema as is possible. The place to > > look for more information about jaxb would be: > > > > https://jaxb.dev.java.net/ > > > > > > To answer your specific question: yes, xs:choice is supported. > > :-) > > > > Thanks! -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog