新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> DTD, XML Schema(XMLS), RELAX NG
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - XML技术『 DTD/XML Schema 』 → XSD的结构问题 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 14590 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: XSD的结构问题 举报  打印  推荐  IE收藏夹 
       本主题类别: Description Logics | Web Services | DOM    
     JamesTeng 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:2
      积分:56
      门派:XML.ORG.CN
      注册:2011/10/4

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给JamesTeng发送一个短消息 把JamesTeng加入好友 查看JamesTeng的个人资料 搜索JamesTeng在『 DTD/XML Schema 』的所有贴子 引用回复这个贴子 回复这个贴子 查看JamesTeng的博客楼主
    发贴心情 XSD的结构问题

    调用一个WebService,有一个WSDL和一个XSD,在调用的时候想产生这样的SOAP消息结构

    .....
    <Payload>
       <document ..... />
       <document .... />
    </Payload>

    但是根据现在的XSD产生的结构却是
    <Payload>
       <Payload .... />
      <Payload ..../>
    </Payload>

    xsd file 结构=================
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns="urn:CIMMessageEnvelope.technology.cim.data.xxx.xxx.xxx" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:CIMMessageEnvelope.technology.cim.data.xxx.xxx.xxx" elementFormDefault="qualified">
     <xsd:complexType name="CIMMessageEnvelopeType">
      <xsd:annotation>
       <xsd:documentation>Envelope of CIM carrying the payload information</xsd:documentation>
      </xsd:annotation>
      <xsd:sequence>
       <xsd:element ref="Header"/>
       <xsd:element ref="Payload" minOccurs="0"/>
      </xsd:sequence>
     </xsd:complexType>
     <xsd:complexType name="DocumentType">
      <xsd:sequence>
       <xsd:any namespace="##any" processContents="lax"/>
      </xsd:sequence>
     </xsd:complexType>
     <xsd:complexType name="HeaderType">
      <xsd:annotation>
       <xsd:documentation>Message Envelope header information</xsd:documentation>
      </xsd:annotation>
      <xsd:sequence>
       <xsd:element ref="Delivery" minOccurs="0">
        <xsd:annotation>
         <xsd:documentation>Message delivery details (sender and receiver)</xsd:documentation>
        </xsd:annotation>
       </xsd:element>
       <xsd:element ref="PayloadManifest" minOccurs="0">
        <xsd:annotation>
         <xsd:documentation>The payload that is carried with the message. The payload could be one or more XML documents or one or more attachments</xsd:documentation>
        </xsd:annotation>
       </xsd:element>
       <xsd:element ref="TargetSystems" minOccurs="0">
        <xsd:annotation>
         <xsd:documentation>Details of the systems that will process this message. The message could go to multiple systems</xsd:documentation>
        </xsd:annotation>
       </xsd:element>
       <xsd:element name="BusinessProcessName" type="xsd:string" minOccurs="0">
        <xsd:annotation>
         <xsd:documentation>Name of the business process (e.g. AVO, WARRANTS, CPR, etc). This business process is part of the business service namely, Legal Action, Investigations, etc. Business activity software service is an activity under the business process</xsd:documentation>
        </xsd:annotation>
       </xsd:element>
       <xsd:element ref="Service" minOccurs="0">
        <xsd:annotation>
         <xsd:documentation>Business activity software service details as part of a business process (e.g. AVO Interim order as part of AVO business process. CourtOutcome is a business process and an AVO final order as part of Court Outcome is a business activity).</xsd:documentation>
        </xsd:annotation>
       </xsd:element>
       <xsd:element ref="CustomAttributes" minOccurs="0" maxOccurs="unbounded">
        <xsd:annotation>
         <xsd:documentation>Any other specific attributes that are not covered by the defined elements. This could be project specific. e.g. MQ Message ID</xsd:documentation>
        </xsd:annotation>
       </xsd:element>
      </xsd:sequence>
     </xsd:complexType>
     <xsd:complexType name="PayloadType">
      <xsd:sequence>
       <xsd:element ref="Document" minOccurs="0">
        <xsd:annotation>
         <xsd:documentation>The payload (could be XML document or non XML document)</xsd:documentation>
        </xsd:annotation>
       </xsd:element>
      </xsd:sequence>
     </xsd:complexType>
     <!---->
     <xsd:element name="CIMMessageEnvelope">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="Header">
         <xsd:annotation>
          <xsd:documentation>The metadata information details about the message</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Payload" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>The payload details of the message</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="Address" type="xsd:string"/>
     <xsd:element name="AddressType" type="xsd:string"/>
     <xsd:element name="AttachmentDetails">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="Index" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Index of the attachment</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="FileName" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Name of the file as attachment</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Description" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Description of the file as attachment</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Type" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>File type</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="URL" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>URL of the location of the file</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="Context" type="xsd:string"/>
     <xsd:element name="CustomAttributes">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="Name">
         <xsd:annotation>
          <xsd:documentation>name of the attribute (the metadata)</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Value">
         <xsd:annotation>
          <xsd:documentation>Value of the metadata (the data)</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="Description" type="xsd:string"/>
     <xsd:element name="Delivery">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="Message" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Container defining the metadata information about the message</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="To" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Container to define the end point address to which the message has to be sent  (RECEIVER)</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="From" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Container to define the end point address of the origin of the message (SENDER)</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="MessageExchangePattern" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Type of message processing namely, synchronous or asynchronous
    Synchronous =  0
    Asynchronous = 1
    </xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
       <xsd:attribute name="DeliveryType">
        <xsd:annotation>
         <xsd:documentation>Type of delivery and carries 2 values (0 or 1)
    0- Internal within
    1- External to

    Default is 0</xsd:documentation>
        </xsd:annotation>
        <xsd:simpleType>
         <xsd:restriction base="xsd:string">
          <xsd:enumeration value="0">
           <xsd:annotation>
            <xsd:documentation>Internal within </xsd:documentation>
           </xsd:annotation>
          </xsd:enumeration>
          <xsd:enumeration value="1">
           <xsd:annotation>
            <xsd:documentation>External to </xsd:documentation>
           </xsd:annotation>
          </xsd:enumeration>
         </xsd:restriction>
        </xsd:simpleType>
       </xsd:attribute>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="DocumentDetails">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="Name" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>XML Schema Name (the root node) of the XML document being added to the envelope.</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Namespace" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>The namespace of the XSD Schema that this document is an instance of</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Description" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Description of the XML document</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
       <xsd:attribute name="RefKey" type="xsd:integer">
        <xsd:annotation>
         <xsd:documentation>Assign a unique number to teh document if more than one document. This will be the same number used in the body</xsd:documentation>
        </xsd:annotation>
       </xsd:attribute>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="Document">
      <xsd:complexType>
       <xsd:complexContent>
        <xsd:extension base="DocumentType">
         <xsd:attribute name="RefKey" type="xsd:integer"/>
        </xsd:extension>
       </xsd:complexContent>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="Environment" type="xsd:string"/>
     <xsd:element name="From">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="Name" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Name of the sender (e.g. )</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Address" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Name of the receiver (e.g. DPP, AGD) when the client determines where the request is destined (i.e. when the ESB acts as an EAI Server). Otherwise it can be 'ESB' when the ESB knows exactly what to do with the message (SOA).</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="AddressType" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>An optional type that specifies the transport type. It overrides any Transport Type information from the "address" element</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="FileName" type="xsd:string"/>
     <xsd:element name="Handle" type="xsd:string"/>
     <xsd:element name="Header" type="HeaderType"/>
     <xsd:element name="Index" type="xsd:string"/>
     <xsd:element name="Message">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="SenderMessageID" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>A message ID of the message sent to the client . Could be a correlation message ID or a business message ID also</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="ReceiverMessageID" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>A message ID of the message received from the client. Could be a correlation message ID or business message ID also</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="SentTimeStamp" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Timestamp of when the message was sent by the client</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="ReceivedTimeStamp" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Timestamp of when the message was received from the client</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Subject" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>General description about the message</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="Name" type="xsd:string"/>
     <xsd:element name="Namespace" type="xsd:string"/>
     <xsd:element name="Payload" type="PayloadType"/>
     <xsd:element name="PayloadManifest">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="DocumentDetails" minOccurs="0" maxOccurs="unbounded">
         <xsd:annotation>
          <xsd:documentation>One or more XML documents that are enclosed as payloads</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="AttachmentDetails" minOccurs="0" maxOccurs="unbounded">
         <xsd:annotation>
          <xsd:documentation>Other formats (non XML) are recommended to be referenced here as attachments for performance reasons. These attachments ARE NOT CONTAINED WITH THIS PAYLOAD ENVELOPE. Instead references to external artefacts and are moved around/managed by transport adapters or by other means</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="Process" type="xsd:string"/>
     <xsd:element name="MessageExchangePattern">
      <xsd:simpleType>
       <xsd:restriction base="xsd:string">
        <xsd:enumeration value="0"/>
        <xsd:enumeration value="1"/>
       </xsd:restriction>
      </xsd:simpleType>
     </xsd:element>
     <xsd:element name="ReceivedTimeStamp" type="xsd:dateTime"/>
     <xsd:element name="ReceiverMessageID" type="xsd:string"/>
     <xsd:element name="ReferenceID" type="xsd:string"/>
     <xsd:element name="SenderMessageID" type="xsd:string"/>
     <xsd:element name="SentTimeStamp" type="xsd:dateTime"/>
     <xsd:element name="Service">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="Name" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Name of the business activity software service as part of a business process (e.g. AVO Interim order as part of AVO business process. CourtOutcome is a business process and an AVO final order as part of Court Outcome is a business activity)</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Namespace" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>service namespace. Can define the name and version as part of the namespace also </xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Version" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>version of the business activity software service</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Context" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>arbitrary parameter which allows you to change the behaviour of this service, e.g. test, then execute a test service than a production service, specifiy the channel (e.g. internet, or thick client appln) </xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Description" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Description of the service</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="Subject" type="xsd:string"/>
     <xsd:element name="SystemID" type="xsd:string"/>
     <xsd:element name="SystemType" type="xsd:string"/>
     <xsd:element name="SystemVersion" type="xsd:string"/>
     <xsd:element name="TargetSystem">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="SystemID" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Unique identifier assigned to the system</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="URL" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>URL of the target system end point</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Environment" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Type of environment (e.g. development, training, production, testing)</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="SystemType" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Type of system, e.g. COPS, CIDS, CADS</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="SystemVersion" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Version number of the system (e.g. SAP 4.6.7)</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="TargetSystems">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="TargetSystem" maxOccurs="unbounded">
         <xsd:annotation>
          <xsd:documentation>Details of the system</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="To">
      <xsd:complexType>
       <xsd:sequence>
        <xsd:element ref="Name" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>Name of the receiver (e.g. DPP, AGD)</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="Address" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>A URL of some sort (understood by the client and message service engine) that identifies the endpoint for a client request (and an entry point to the message service engine). The address identifies where the request is going. Used more with asynchronous messages, but can also be used to override default settings (eg. a default endpoint for a Service Bus stored in client configuration for all services). Can also be the source alias (e.g. the business system name from where the message originally was initaited, e.g. COPS)</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
        <xsd:element ref="AddressType" minOccurs="0">
         <xsd:annotation>
          <xsd:documentation>An optional type that specifies the transport type. It overrides any Transport Type information from the "address" element. The Type can also be "Source System Name"</xsd:documentation>
         </xsd:annotation>
        </xsd:element>
       </xsd:sequence>
      </xsd:complexType>
     </xsd:element>
     <xsd:element name="Type" type="xsd:string"/>
     <xsd:element name="URL" type="xsd:string"/>
     <xsd:element name="Value" type="xsd:string"/>
     <xsd:element name="Version" type="xsd:string"/>
    </xsd:schema>


       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2011/10/4 7:28:00
     
     JamesTeng 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:2
      积分:56
      门派:XML.ORG.CN
      注册:2011/10/4

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给JamesTeng发送一个短消息 把JamesTeng加入好友 查看JamesTeng的个人资料 搜索JamesTeng在『 DTD/XML Schema 』的所有贴子 引用回复这个贴子 回复这个贴子 查看JamesTeng的博客2
    发贴心情 
    没有上传权限,所以只能把XSD代码贴出来
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2011/10/4 7:30:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 DTD/XML Schema 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/12/22 1:08:30

    本主题贴数2,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    84.961ms