Reputation: 94
We need to build test data for complex nested XML schema (xsd). We tried with XMLspy, where we have the following situation.
Here is our .xsd piece.--------------------------
<xsd:sequence>
<xsd:element name="Explanation" type="ExplanationType" minOccurs="0"/>
</xsd:sequence>
XSD Type definition ------------------
<xsd:simpleType name="ExplanationType">
<xsd:annotation>
<xsd:documentation>A note field that allows up to 9000 characters</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="TextType">
<xsd:maxLength value="9000"/>
</xsd:restriction>
</xsd:simpleType>
Generated test XML via xmlspy
<Explanation>!</Explanation>
Even though element defined as 9000 length, we have only one character (!). How do I get 9000 length string such as
**<Explanation>xxxxxxxxxxxxxxxxxxx ……………………………(9000 length)</Explanation>**
In my test data (generated xml message) ?
Is there an option to get such thing via xmlspy?
Is there any other tool provide such data?
Upvotes: 1
Views: 649
Reputation: 5168
Split your type definition into two files with the first ending with: (caret)xsd:documentation(caret) and the second beginning with: (caret)/xsd:documentation(caret)
Windows:
type preamblefile 9000charfile postfile > testfile
Linux:
cat preamblefile 9000charfile postfile > testfile
Upvotes: 1