map.put(arrTypeNS,new File("resources/tools/wsdlfixture/customtype/CustomTypeArrays.xsd").toURL());
XSModel xsmodel = new JavaToXSD().parseSchema(map);
assertNotNull("XSModel is null?", xsmodel);
XSNamedMap xsnamedmap = getXSNamedMap(xsmodel, typeNS);
assertNotNull("XSNamedMap is null?", xsnamedmap);
assertEquals(1, xsnamedmap.getLength());
XSObject xobj = xsnamedmap.item(0);
assertEquals("HelloObj", xobj.getName());
assertTrue("HelloObj is a complex type?",xobj instanceof XSComplexTypeDefinition);
xsnamedmap = getXSNamedMap(xsmodel, arrTypeNS);
assertEquals(1, xsnamedmap.getLength());
xobj = xsnamedmap.item(0);
assertEquals("HelloObjArray", xobj.getName());
assertTrue("HelloObjArray is a complex type?",xobj instanceof XSComplexTypeDefinition);
XSComplexTypeDefinition complexType = (XSComplexTypeDefinition) xobj;
XSModelGroupImpl sequence = (XSModelGroupImpl) complexType.getParticle().getTerm();
XSElementDecl valueElement = (XSElementDecl) ((XSParticleDecl) sequence.getParticles().item(0)).getTerm();
String name = valueElement.getTypeDefinition().getName();
assertEquals("HelloObj", name);
//Test the case when the schema files are parsed one by one
XSModel newxsmodel = utils.parseSchema("resources/tools/wsdlfixture/customtype/CustomTypeObj.xsd");
assertNotNull("XSModel is null?", newxsmodel);
xsnamedmap = getXSNamedMap(newxsmodel, typeNS);
assertNotNull("XSNamedMap is null?", xsnamedmap);
assertEquals(1, xsnamedmap.getLength());
xobj = xsnamedmap.item(0);
assertEquals("HelloObj", xobj.getName());
assertTrue("HelloObj is a complex type?",xobj instanceof XSComplexTypeDefinition);
newxsmodel = utils.parseSchema("resources/tools/wsdlfixture/customtype/CustomTypeArrays.xsd");
assertNotNull("XSModel is null?", newxsmodel);
xsnamedmap = getXSNamedMap(newxsmodel, arrTypeNS);
assertNotNull("XSNamedMap is null?", xsnamedmap);
assertEquals(1, xsnamedmap.getLength());
xobj = xsnamedmap.item(0);
assertEquals("HelloObjArray", xobj.getName());
assertTrue("HelloObjArray is a complex type?",xobj instanceof XSComplexTypeDefinition);
assertTrue("HelloObjArray is not a Wild Card?",!(xobj instanceof XSWildcard));
XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xobj;
XSParticle xspart = xc.getParticle();