public void gettingSchema() throws JIException {
OCDocumentObject documentObject = getRandomDocument("СчетНаОплатуПокупателю");
OCXMLDataType dt = app.getXMLTypeOf(documentObject);
System.out.println(dt.getTypeName());
OCXDTOFactory factory = app.getXDTOFactory();
OCXDTOPackageCollection pacCollection = factory.getPackages();
System.out.println("PACKAGES: --------------------------");
for (OCXDTOPackage package1 : pacCollection) {
System.out.println(package1.getNamespaceURI());
}
String sSchema = "http://v8.1c.ru/8.1/data/enterprise/current-config";
System.out.println("SCHEMA ------------------------------");
OCXMLSchemaSet schemaSet = factory.exportXMLSchema(sSchema);
System.out.println("Schema set size: " + schemaSet.size());
OCXMLSchema schema = schemaSet.getSchema(0);
System.out.println("Schema component type: " + schema.getComponentType());
OCXSComponentFixedList schemaComponents = schema.getComponents();