Hello,
Thanks for the schema / data file you sent me directly via mail. I have recognized that you renamed the second definition of ‘Telephone’ into ‘Telephone_Number’. I used your modified schema to create an application with X-Application’s generator.
I had the same effect as you described within your post:
- The search page does not contain any search field.
- The create page contains add / remove for the content elements of the root element and contains also the links to switch between the alternatives of the entry, but there is no input field.
So, I could reproduce the problem.
The reason for this problem is the definition of the content fields. All element definition (EntryId, LoginName, …) look like this:
<xs:complexType mixed = "true"></xs:complexType>
The option ‘mixed’ means, that the content of an element could be a mixture of normal text and child elements defined for this complex type. However, the complex type is empty and there are no children the text could be mixed with.
For the generator does not consider this situation. It does not generate an input field for an empty complex type with option mixed=‘true’.
I fixed this problem within the java class ‘StructureBuilder.java’ that is attached to this post. Please, follow the instructions below to add the fix to your X-Application:
- Extract the attached zip file into the directory where you extracted the X-Application zip file. In this way, the existing java source file will be replaced.
- Open a console and change to the directory
…\xapplication_411
- Invoke the command ‘build quick’
- Shut down Tomcat if necessary
- Invoke the command ‘build1 generator’
- Start Tomcat
- Generate your application again:
- Don’t define the schema just enter for
Schema → Name : ‘TelephoneSchema’
Schema → Doctype : ‘Telephone’
and click the ‘Generate’ Button.
Hope, it the fix will work also on your maschine.
Bye,
Christian.
empty_mixed_20030731.zip (3.65 KB)
#API-Management#Tamino#webMethods