Skip to main content
Formatting improved for better/quick understanding for others in future
Source Link

I am able to read xml namename, descriptiondescription, detailsdetails whether it is mandatory or multivalue using core service factory java. I am not able to read xml type. There is no method called 'Gettype'. Could anyone please tell me how to retrieve xml type?

I am not able to read xml type. There is no method called 'Gettype'.
Could anyone please tell me how to retrieve xml type?

Thanks in advance!

My code goes like this.

ICoreService oClient = CoreServiceFactory.getBasicHttpClient();

SchemaFieldsData schemaData = oClient.readSchemaFields(str, true, null);

ArrayOfItemFieldDefinitionData design=schemaData.getFields();

List design_item = design.getItemFieldDefinitionData();

for(ItemFieldDefinitionData loopVariable : design_item) {

String xmlName=loopVariable.getName();

String description=loopVariable.getDescription();

String multiValue=(loopVariable.getMaxOccurs()==1) ? "No" : "Yes";

String mandatory=(loopVariable.getMinOccurs()==1) ? "Yes" : "No";

}

ICoreService oClient = CoreServiceFactory.getBasicHttpClient();
SchemaFieldsData schemaData = oClient.readSchemaFields(str, true, null); 
ArrayOfItemFieldDefinitionData design=schemaData.getFields(); 
List<ItemFieldDefinitionData> design_item = design.getItemFieldDefinitionData();
for(ItemFieldDefinitionData loopVariable : design_item)
    {         
     String xmlName=loopVariable.getName();               
     String description=loopVariable.getDescription();                
     String multiValue=(loopVariable.getMaxOccurs()==1) ? "No" : "Yes";               
     String mandatory=(loopVariable.getMinOccurs()==1) ? "Yes" : "No";     
    }

I am able to read xml name, description, details whether it is mandatory or multivalue using core service factory java. I am not able to read xml type. There is no method called 'Gettype'. Could anyone please tell me how to retrieve xml type? Thanks in advance!

My code goes like this.

ICoreService oClient = CoreServiceFactory.getBasicHttpClient();

SchemaFieldsData schemaData = oClient.readSchemaFields(str, true, null);

ArrayOfItemFieldDefinitionData design=schemaData.getFields();

List design_item = design.getItemFieldDefinitionData();

for(ItemFieldDefinitionData loopVariable : design_item) {

String xmlName=loopVariable.getName();

String description=loopVariable.getDescription();

String multiValue=(loopVariable.getMaxOccurs()==1) ? "No" : "Yes";

String mandatory=(loopVariable.getMinOccurs()==1) ? "Yes" : "No";

}

I am able to read xml name, description, details whether it is mandatory or multivalue using core service factory java.

I am not able to read xml type. There is no method called 'Gettype'.
Could anyone please tell me how to retrieve xml type?

Thanks in advance!

My code goes like this.

ICoreService oClient = CoreServiceFactory.getBasicHttpClient();
SchemaFieldsData schemaData = oClient.readSchemaFields(str, true, null); 
ArrayOfItemFieldDefinitionData design=schemaData.getFields(); 
List<ItemFieldDefinitionData> design_item = design.getItemFieldDefinitionData();
for(ItemFieldDefinitionData loopVariable : design_item)
    {         
     String xmlName=loopVariable.getName();               
     String description=loopVariable.getDescription();                
     String multiValue=(loopVariable.getMaxOccurs()==1) ? "No" : "Yes";               
     String mandatory=(loopVariable.getMinOccurs()==1) ? "Yes" : "No";     
    }
Tweeted twitter.com/StackTridion/status/701576898816647168
added 26 characters in body
Source Link
Bhavya
  • 113
  • 3

I am able to read xml name, description, details whether it is mandatory or multivalue using core service factory java. I am not able to read xml type. There is no method called 'Gettype'. Could anyone please tell me how to retrieve xml type? Thanks in advance! My

My code goes like this. ICoreService

ICoreService oClient = CoreServiceFactory.getBasicHttpClient(); SchemaFieldsData

SchemaFieldsData schemaData = oClient.readSchemaFields(str, true, null);

ArrayOfItemFieldDefinitionData design=schemaData.getFields(); 

List design_item = design.getItemFieldDefinitionData(); for

for(ItemFieldDefinitionData loopVariable : design_item) { String

String xmlName=loopVariable.getName(); String

String description=loopVariable.getDescription(); String

String multiValue=(loopVariable.getMaxOccurs()==1) ? "No" : "Yes"; String

String mandatory=(loopVariable.getMinOccurs()==1) ? "Yes" : "No";   

}

I am able to read xml name, description, details whether it is mandatory or multivalue using core service factory java. I am not able to read xml type. There is no method called 'Gettype'. Could anyone please tell me how to retrieve xml type? Thanks in advance! My code goes like this. ICoreService oClient = CoreServiceFactory.getBasicHttpClient(); SchemaFieldsData schemaData = oClient.readSchemaFields(str, true, null ArrayOfItemFieldDefinitionData design=schemaData.getFields(); List design_item = design.getItemFieldDefinitionData(); for(ItemFieldDefinitionData loopVariable : design_item) { String xmlName=loopVariable.getName(); String description=loopVariable.getDescription(); String multiValue=(loopVariable.getMaxOccurs()==1) ? "No" : "Yes"; String mandatory=(loopVariable.getMinOccurs()==1) ? "Yes" : "No";  }

I am able to read xml name, description, details whether it is mandatory or multivalue using core service factory java. I am not able to read xml type. There is no method called 'Gettype'. Could anyone please tell me how to retrieve xml type? Thanks in advance!

My code goes like this.

ICoreService oClient = CoreServiceFactory.getBasicHttpClient();

SchemaFieldsData schemaData = oClient.readSchemaFields(str, true, null);

ArrayOfItemFieldDefinitionData design=schemaData.getFields(); 

List design_item = design.getItemFieldDefinitionData();

for(ItemFieldDefinitionData loopVariable : design_item) {

String xmlName=loopVariable.getName();

String description=loopVariable.getDescription();

String multiValue=(loopVariable.getMaxOccurs()==1) ? "No" : "Yes";

String mandatory=(loopVariable.getMinOccurs()==1) ? "Yes" : "No"; 

}

Source Link
Bhavya
  • 113
  • 3

How to read schema fields (especially xml type) from tridion using core service factory java?

I am able to read xml name, description, details whether it is mandatory or multivalue using core service factory java. I am not able to read xml type. There is no method called 'Gettype'. Could anyone please tell me how to retrieve xml type? Thanks in advance! My code goes like this. ICoreService oClient = CoreServiceFactory.getBasicHttpClient(); SchemaFieldsData schemaData = oClient.readSchemaFields(str, true, null ArrayOfItemFieldDefinitionData design=schemaData.getFields(); List design_item = design.getItemFieldDefinitionData(); for(ItemFieldDefinitionData loopVariable : design_item) { String xmlName=loopVariable.getName(); String description=loopVariable.getDescription(); String multiValue=(loopVariable.getMaxOccurs()==1) ? "No" : "Yes"; String mandatory=(loopVariable.getMinOccurs()==1) ? "Yes" : "No"; }