I compile schemas in WSDL/XSD using JAXB. Later in my generated java
interfaces corresponding to WSDL porttype, I need to get the java type class
file to be imported for an element/type in the XSD.
How do I achieve this?
String fullJavaName =
NameConverter.smart.toPackageName(name.getNamespaceURI()) + "."
+ NameConverter.smart.toClassName(name.getLocalPart());
works for elements with complex types, where name is the QName.
But does not work for simple type, element with simple type.
JAXBModel says this
public TypeAndAnnotation getJavaType(QName xmlTypeName) {
*// TODO: primitive type handling?*
TypeUse use = model.typeUses().get(xmlTypeName);
if(use==null) return null;
return new TypeAndAnnotationImpl(outline,use);
}
thanks,
pankaj
--
पंकज एम तोलानी