XMas generates XML and WSDL files from an XSD one
XSD 2 XML
Select or drag and drop an XSD file.
The XSD file is validated during the loading phase.
If the validation file is ok, the XSD 2 XML feature is ready to produce an XML file demo. The file is based on the Selected XML root element and the chosen options.
Choose one between the interfaces contained
and decide how to produce the output.
With Just Structure selected, the XML structure without occurrences and data simulation
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with XMas by Nick4Name (https://www.nick4name.eu) -->
<ZTEST_LIGEST xmlns:tns="urn:nick4name.eu:test"
xmlns="urn:nick4name.eu:test">
<I_BANUM/>
<I_BANFN/>
<I_BEDAT/>
<T_RDA>
<item>
<BNFPO/>
<MATNR/>
<MENGE/>
<MEINS/>
</item>
</T_RDA>
</ZTEST_LIGEST>
Unselecting Just Structure produces an XML without data simulation but considering the occurrences
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with XMas by Nick4Name (https://www.nick4name.eu) -->
<ZTEST_LIGEST xmlns:tns="urn:nick4name.eu:test"
xmlns="urn:nick4name.eu:test">
<I_BANUM/>
<I_BANFN/>
<I_BEDAT/>
<T_RDA>
<item>
<BNFPO/>
<MATNR/>
<MENGE/>
<MEINS/>
</item>
<item>
<BNFPO/>
<MATNR/>
<MENGE/>
<MEINS/>
</item>
</T_RDA>
</ZTEST_LIGEST>
Selecting Data Simulation, elements, and attributes are filled with random data based on data types and restrictions.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with XMas by Nick4Name (https://www.nick4name.eu) -->
<ZTEST_LIGEST xmlns:tns="urn:nick4name.eu:test"
xmlns="urn:nick4name.eu:test">
<I_BANUM>-1482740340</I_BANUM>
<I_BANFN>vVP</I_BANFN>
<I_BEDAT>2050-70-70</I_BEDAT>
<T_RDA>
<item>
<BNFPO>25837</BNFPO>
<MATNR>okxAScqGSWGLuzCArluR</MATNR>
<MENGE>974760514.129</MENGE>
<MEINS>XH</MEINS>
</item>
</T_RDA>
</ZTEST_LIGEST>
With Anonymize XML the XML is generated without namespaces
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with XMas by Nick4Name (https://www.nick4name.eu) -->
<ZTEST_LIGEST>
<I_BANUM>-1648222006</I_BANUM>
<I_BANFN>nY</I_BANFN>
<I_BEDAT>8726-04-23</I_BEDAT>
<T_RDA>
<item>
<BNFPO>80745</BNFPO>
<MATNR>mlcLnJrFkXCGgSKcjhcAQOixFWLQtf</MATNR
<MENGE>676361219.181</MENGE>
<MEINS>j</MEINS>
</item>
</T_RDA>
</ZTEST_LIGEST>
With Validate by XSD, the generated XML file is prepared to be validated by the XSD file
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with XMas by Nick4Name (https://www.nick4name.eu) -->
<ZTEST_LIGEST p1:noNamespaceSchemaLocation="GenericRequestReply_test_rda.xsd"
xmlns:p1="http://www.w3.org/2001/XMLSchema-instance">
<I_BANUM>1421431750</I_BANUM>
<I_BANFN>Ogp</I_BANFN>
<I_BEDAT>1313-31-48</I_BEDAT>
<T_RDA>
<item>
<BNFPO>06187</BNFPO>
<MATNR>uKXroKtIcYlgvPpgleqGSJo</MATNR>
<MENGE>1816404673.180</MENGE>
<MEINS>l</MEINS>
</item>
</T_RDA>
</ZTEST_LIGEST>
If the XSD file is not customized for validation, XMas can adapt it for you
<?xml version="1.0" encoding="utf-8"?>
<!--Removed: targetNamespace=urn:nick4name.eu:test-->
<!--Removed: xmlns=urn:nick4name.eu:test-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified"
elementFormDefault="qualified"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsd:element name="ZTEST_LIGEST">
...
</xsd:schema>
Known limitations
If the XSD contains features that are not yet supported, the file is not imported and an error is notified
Currently:
Features supported | Features not yet supported |
---|---|
Root elements definition by reference (type attribute) or without reference (xsd:complexType under xsd:element, nested) xsd:all xsd:attribute @ref xsd:complexType xsd:simpleType xsd:restriction xsd:simpleContent xsd:complexContent xsd:simpleContent xsd:extension xsd:enumeration | xsd:choice xsd:group xsd:attributeGroup xsd:union xsd:… |
XSD 2 WSDL
If you want to generate a WSDL file from the XSD one select XSD 2 WSDL
You have:
- To set the direction of the interface under Root elements. If there is more than one interface you can also set just one, in inbound mode, to prepare the WSDL for an asynchronous scenario;
- To confirm or set a Namespace;
- To set a service name, Service name;
- Optionally, you can set up 2 endpoints;
- You can decide to produce an indented or linearized output, Save linearized.
Known limitations
WSDL generation supports just one xsd:schema structure with one or two root elements. The root elements exceeding are ignored.
XML 2 XSD
If you want to generate an XSD file from the XML template select XML 2 XSD
Select or drag and drop an XML file.
The XML file is validated during the loading phase.
If the validation file is okay, the XML 2 XSD feature is ready to produce an XSD file. The file produced is based on the options selected.
Starting from the following XML template
<?xml version="1.0" encoding="utf-8"?>
<MOVEMENT_SS>
<MOVEMENTS_DETAILS>
<TIPOREC>MH</TIPOREC>
<CAUS_SS>309</CAUS_SS>
<DTMOV>2023-05-24</DTMOV>
</MOVEMENTS_DETAILS>
</MOVEMENT_SS>
Without options selected
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with XMas by Nick4Name (https://www.nick4name.eu) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="MOVEMENT_SS">
<xs:complexType>
<xs:sequence>
<xs:element name="MOVEMENTS_DETAILS">
<xs:complexType>
<xs:sequence>
<xs:element name="TIPOREC" type="xs:string" />
<xs:element name="CAUS_SS" type="xs:integer" />
<xs:element name="DTMOV" type="xs:date" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
With Set all tags as mandatory, all XSD elements and structures are set with minOccurs and maxOccurs to 1
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with XMas by Nick4Name (https://www.nick4name.eu) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="MOVEMENT_SS">
<xs:complexType>
<xs:sequence>
<xs:element name="MOVEMENTS_DETAILS" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="TIPOREC" minOccurs="1" maxOccurs="1" type="xs:string" />
<xs:element name="CAUS_SS" minOccurs="1" maxOccurs="1" type="xs:integer" />
<xs:element name="DTMOV" minOccurs="1" maxOccurs="1" type="xs:date" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
With Add attributes FormDefault and elementFormDefault, the attributes attributeFormDefault and elementFormDefault are added unqualifying the attributes with a prefix and qualifying the elements with a prefix
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with XMas by Nick4Name (https://www.nick4name.eu) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:element name="MOVEMENT_SS">
<xs:complexType>
<xs:sequence>
<xs:element name="MOVEMENTS_DETAILS">
<xs:complexType>
<xs:sequence>
<xs:element name="TIPOREC" type="xs:string" />
<xs:element name="CAUS_SS" type="xs:integer" />
<xs:element name="DTMOV" type="xs:date" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
With Add maxLength restriction for empty tags too, a simpleType structure containing a maxLength element will be added for each element
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with XMas by Nick4Name (https://www.nick4name.eu) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="MOVEMENT_SS">
<xs:complexType>
<xs:sequence>
<xs:element name="MOVEMENTS_DETAILS">
<xs:complexType>
<xs:sequence>
<xs:element name="TIPOREC">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CAUS_SS">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:maxLength value="3" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DTMOV">
<xs:simpleType>
<xs:restriction base="xs:date">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Always updated
XMas checks for updates at every run.
You can download XMas from here.
Lascia un commento