开发者

Question regarding xsd

开发者 https://www.devze.com 2022-12-30 15:03 出处:网络
I have an application which reads the data from the database, creates an object out ofthe data, marshalls it into an xml and enqueue the xml to a queue which isproducer. The xmlis dequeued from the qu

I have an application which reads the data from the database, creates an object out of the data, marshalls it into an xml and enqueue the xml to a queue which is producer. The xml is dequeued from the queue by a consumer.

I need to use xsds at two different places.

  1. For database access while reading the data from the database and

  2. For interaction between producer and consumer

Can the same xsd be used in both the cases? Or do I need to use different xsds?


Transferred some facts from the comments:

Some tables in my datamodel have m-m relns. For eg consider the below 3 tables Requests:

RequestId Desc Exporters : ExporterId Desc Request_exporters : RequestId (FK) ExporterId (FK)

xsd for xml (interaction between producer and cons开发者_StackOverflowumer ) looks like :

<xs:complexType name="Requests">  
  <xs:element name="RequestId" type="xs:long" />  
  <xs:element name="Exporter" type="Exporter" minOccurs="1" 
    maxOccurs="unbounded"/>
</xs:complexType> 

But the xsd for database needs to have the details of ttrequestexporters as well. So I am not clear as to how I should use the same xsd for both.


It's the same data, so you can use the same xsd.


You will be able to use the same XSD.

0

精彩评论

暂无评论...
验证码 换一张
取 消