XML Schema用于已导出的的wscompile模型文件
下面代码是已导出的的wscompile模型文件的XML模式:
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<xsd:schema
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"
xmlns:tns=3D"http://java.sun.com/xml/ns/jax-rpc/ri/model= "
targetNamespace=3D"http://java.sun.com/xml/ns/jax-rpc/ri= /model"
elementFormDefault=3D"unqualified"
attributeFormDefault=3D"unqualified" version=3D"1.0">
<xsd:annotation>
<xsd:documentation>
这是已导出的的wscompile模型文件的XML模式。已导出的模型是对象的图表表示,其中有些是“直接的(immediate)”(比如整型、字符串型),“直接的”对象有一个实际的值。
非直接的对象有一组对象-赋值(object-valued)特性。
</xsd:documentation>
</xsd:annotation>
<xsd:element name=3D"model" form=3D"qualified">
<xsd:annotation>
<xsd:documentation>
模型是一个定义序列,它可以分为3类:
"object" —— 对象定义;
"iobject" —— 直接的对象定义;
"property" —— 特性定义。
另外,模型需要一个版本号 (("version"属性).
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs=3D"0" maxOccurs=3D"unbounded">
<xsd:choice>
<xsd:element name=3D"object" type=3D"tns:objectType"/>
<xsd:element name=3D"iobject" type=3D"tns:iobjectType"/>
<xsd:element name=3D"property" type=3D"tns:propertyType"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name=3D"version" type=3D"xsd:string" use=3D"required"/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name=3D"objectType">
<xsd:annotation>
<xsd:documentation>
对象定义,包括一个唯一的ID和对象的类型名称。
</xsd:documentation>
</xsd:annotation>
<xsd:sequence/>
<xsd:attribute name=3D"id" type=3D"xsd:string" use=3D"required"/>
<xsd:attribute name=3D"type" type=3D"xsd:string" use=3D"required"/>
</xsd:complexType>
<xsd:complexType name=3D"iobjectType">
<xsd:annotation>
<xsd:documentation>
直接的对象定义。除了ID和类型外,还要包含一个值。
</xsd:documentation>
</xsd:annotation>
<xsd:sequence/>
<xsd:attribute name=3D"id" type=3D"xsd:string" use=3D"required"/>
<xsd:attribute name=3D"type" type=3D"xsd:string" use=3D"required"/>
<xsd:attribute name=3D"value" type=3D"xsd:string" use=3D"required"/>
</xsd:complexType>
<xsd:complexType name=3D"propertyType">
<xsd:annotation>
<xsd:documentation>
特性定义。也就是说“主题”(由id来识别)有一个称为“name”的特性,将id为“value”的对象作为它的值。
</xsd:documentation>
</xsd:annotation>
<xsd:sequence/>
<xsd:attribute name=3D"name" type=3D"xsd:string" use=3D"required"/>
<xsd:attribute name=3D"subject" type=3D"xsd:string" use=3D"required"/>
<xsd:attribute name=3D"value" type=3D"xsd:string" use=3D"required"/>
</xsd:complexType>
</xsd:schema>
XML Schema 用于运行时描述文件
下面的代码是用于运行时描述文件的XML模式:
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<xsd:schema
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"
xmlns:tns=3D"http://java.sun.com/xml/ns/jax-rpc/ri/runti= me"
targetNamespace=3D"http://java.sun.com/xml/ns/jax-rpc/ri= /runtime"
elementFormDefault=3D"qualified"
attributeFormDefault=3D"unqualified"
version=3D"1.0">
<xsd:annotation>
<xsd:documentation>
这是运行时描述文件 (jaxrpc-ri-runtime.xml)的模式。
顶层元素必须是“ecdcoding”
</xsd:documentation>
</xsd:annotation>
<xsd:element name=3D"endpoints">
<xsd:annotation>
<xsd:documentation>
顶层的元素。它包含“version”属性和端点定义序列。
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=3D"endpoint" type=3D"tns:endpointType" minOccurs=3D"0" maxOccurs=3D"unbounded"/>
</xsd:sequence>
<xsd:attribute name=3D"version" type=3D"xsd:string" use=3D"required"/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name=3D"endpointType">
<xsd:annotation>
<xsd:documentation>
端点定义以下有几个属性:
"name" —— 端点名称;
"interface" ——端点的Java接口名称 (专业上称为“服务端点接口”);
"implementation" —— 端点实现类的名称;
"tie" —— 用于端点的tie类的名称;
"model"? —— 资源的名称,对应于端点的模型文件;
"wsdl"? ——资源的名称,对应于端点的WSDL文档;
"service"? —— 属于端点的WSDL服务的QName ;
"port"? —— 用于该端点的WSDL端口的QName;
"urlpattern" —— 该端点映射到的URL式样;
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
</xsd:sequence>
<xsd:attribute name=3D"name" type=3D"xsd:string" use=3D"required"/>
<xsd:attribute name=3D"interface" type=3D"xsd:string" use=3D"required"/>
<xsd:attribute name=3D"implementation" type=3D"xsd:string" use=3D"required"/>
<xsd:attribute name=3D"tie" type=3D"xsd:string" use=3D"required"/>
<xsd:attribute name=3D"model" type=3D"xsd:string"/>
<xsd:attribute name=3D"wsdl" type=3D"xsd:anyURI"/>
<xsd:attribute name=3D"service" type=3D"xsd:anyURI"/>
<xsd:attribute name=3D"port" type=3D"xsd:anyURI"/>
<xsd:attribute name=3D"urlpattern" type=3D"xsd:anyURI" use=3D"required"/>
</xsd:complexType>
</xsd:schema>
到此 讲述Sun ONE Application Server 就全部结束。