开发者

Question regarding xsd

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜