return xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
}
private void addJavaXMLTypeMap(XSTypeDefinition xt, String name, String containingElement, String containingType, JavaWsdlMapping jwm, boolean skipWrapperArray)
{
JavaXmlTypeMapping jxtm = null;
if (xt instanceof XSComplexTypeDefinition)
{
XSModelGroup xm = null;
XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xt;
if (xc.getContentType() != XSComplexTypeDefinition.CONTENTTYPE_EMPTY)
{
XSParticle xp = xc.getParticle();
if (xp != null)
{
XSTerm xterm = xp.getTerm();
if (xterm instanceof XSModelGroup)
xm = (XSModelGroup)xterm;
}
}
if ((skipWrapperArray && SchemaUtils.isWrapperArrayType(xt)) == false)
{
jxtm = new JavaXmlTypeMapping(jwm);
String javaType;
String localName = xt.getName();
// Anonymous
if (localName == null)
{
String tempName = containingElement + ToolsUtils.firstLetterUpperCase(name);
javaType = getJavaTypeAsString(null, new QName(tempName), false, true);
StringBuilder temp = new StringBuilder();
if (containingType != null && containingType.length() > 0)
temp.append(">").append(containingType);
temp.append(">").append(name);
localName = temp.toString();
jxtm.setAnonymousTypeQName(new QName(xt.getNamespace(), localName, "typeNS"));
}
else
{
javaType = getJavaTypeAsString(null, new QName(localName), false, true);
jxtm.setRootTypeQName(new QName(xt.getNamespace(), xt.getName(), "typeNS"));
}
if (typeNamespace == null)
{
typeNamespace = xt.getNamespace();
}
if (registeredTypes.contains(javaType))
return;
jxtm.setJavaType(javaType);
jxtm.setQNameScope("complexType");
registeredTypes.add(javaType);
jwm.addJavaXmlTypeMappings(jxtm);
// addJavaXMLTypeMapping(jwm, jxtm