uCosminexus Service Platform, Basic Development Guide
(1) Format of XML schema to be used
- XML schema must fulfill the following conditions:
- XSD namespace of schema must be " http://www.w3.org/2001/XMLSchema".
- Root element must be described in the selected XML schema.
- When you specify a file for XML schema, length of the file name must be 128 bytes or less.
- White space character (single byte space (#x20), tab (#x9) and linefeed code (#xA or #xD) must not be used in start or end of XML schema attributes.
- If you specify a large value in maxOccurs attribute, large size memory is consumed. It is recommended to use unbounded as much as possible, in maxOccurs attribute.
- You can use type attribute, ref attribute or internal definition (complexType or simpleType) for defining types of xsd:element element.
- If you use standard reception as the reception of business process, it is recommended to specify qualified in elementFormDefault attribute of xsd:schema element.
- Note
- If a SOAP specific attribute (mustUnderstand attribute, role attribute, encodingStyle attribute, actor attribute and relay attribute) appears in the child element of SOAP header or SOAP body and you convert with data transformation activity without defining this attribute in XML schema, SOAP specific attribute is not reflected in variable after conversion. Also, verification error occurs when you execute the verification process. Therefore, when SOAP specific attribute appear, mention xsd:anyAttribute in XML schema.
- When you want to specify a percent encoded value in XMLschema file, specify a hexadecimal value with upper case characters. Example is as follows:
Correct: schemaLocation="%E3%81%82.xsd"
Incorrect: schemaLocation="%e3%81%82.xsd"
(2) Notes when referring to external XML schema
Notes when referring and using external schema from XML schema, are as follows:
- When schemaLocation attribute of xsd:import element of XML schema defined under wsdl:types element of WSDL is not specified, namespace must be resolved by using the XML schema under wsdl:types element.
- Specify schemaLocation attribute of xsd:import element of XML schema without fail.
- Specify namespace attribute in xsd:import element without fail.
- In xsd:import element and xsd:includ element, call reference and set hierarchy to less than 20 hierarchy.
- In schemaLocation attribute, do not specify schema (redefine having 2 or more hierarchies) in schema having redefine element.
- Do not include schema for which targetNamespace attribute is not specified, rom the schema for which targetNamespace attribute of xsd:schema element is specified.
- When using SOAP1.1 mode, you can set value percent encoded with UTF-8 as well as value not percent encoded, in schemaLocation attribute of xsd:import element and schemaLocation attribute of xsd:include element. However, when percent encoding is done and directory is included in file path, do not encode the directory delimiter (/).
- When using SOAP1.1/1.2 combined mode, specify value percent encoded with UTF-8, in schemaLocation attribute of xsd:import element and schemaLocation attribute of xsd:include element. However, when value is percent encoded and directory is included in file path, do not encode the directory delimiter (/).
- Use a forward slash (/) as a directory delimiter in the schemaLocation attribute. (You cannot use \).
- Use "/" in directory delimiter of schemaLocation attribute (you cannot use "\").
- Do not use following characters in the file path of XML schema.
";", "?", ":", "@", "&", "=", "+", "$", ", ", "<", ">", "#", "%", """, "{", "}", "|", "^", "[", "]", "`".
- Notes when specifying schemaLocation attribute are as follows:
- User character prescribed in RFC2396 and character that fulfills xsd:anyURI. However, you cannot use RFC2732 (IPv6).
- When you want to specify schemaLocation attribute with absolute URI, use enter of the http, https, and file protocol.
Example of specifying schemaLocation attribute is as follows:
- (Example1) Specify XML schema in local with relative path
- ./example/sample.xsd
- (Example 2) Specify XML schema in local with absolute path of URL format
- file:///C:/example/sample.xsd
- (Example 3) Specify XML schema in remote, with URL
- http://example.com/sample.xsd
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.