2012-03-26 9 views
2

こんにちは私は使用する必要があるフィールドは何かを説明するXSDファイルがあります。C#.NetでXSDファイルを使用してXMLを構築する方法

XSDスキーマを使用して、ビルドとXMLリクエストを行い、サードパーティのサービスプロバイダにルーティングし、XMLリクエストが検証されると、システム(サードパーティ)から応答が返されます。 Logic実装の残りの部分を実行します。

私は見当もつかないこのXSDに

を使用して、建物のXMLで開始するいずれかの適切な場所に私を指すか、私はここXSD

を使用してXMLを構築するために使用することができます例のいくつかの並べ替えを提供することができますがありません<xs:element name="RxHistoryRequest"> 私は0を使用してXMLと

を構築する必要が使用して私のXSD

<?xml version="1.0" encoding="utf-8"?> 
    <xs:schema xmlns="http://www.ncpdp.org/schema/SCRIPT" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ncpdp.org/schema/SCRIPT" elementFormDefault="qualified"> 
     <!-- Message --> 
     <xs:element name="Message" type="MessageType"/> 
<xs:element name="RxHistoryRequest"> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:annotation> 
        <xs:documentation>UIH-020</xs:documentation> 
        <xs:documentation>UIH-030-1</xs:documentation> 
        <xs:documentation>PVD-P2</xs:documentation> 
       </xs:annotation> 
       <xs:element ref="RxReferenceNumber" minOccurs="0"/> 
       <!--UIH.2.1--> 
       <xs:element ref="PrescriberOrderNumber" minOccurs="0"/> 
       <!--UIH.3.1--> 
       <xs:element name="Pharmacy" type="OptionalPharmacyType" minOccurs="0"> 
        <xs:annotation> 
         <xs:documentation>PVD-P2</xs:documentation> 
        </xs:annotation> 
       </xs:element> 
       <!--PVD--> 
       <xs:element name="Prescriber" type="OptionalPrescriberType"> 
        <xs:annotation> 
         <xs:documentation>PVD-PC</xs:documentation> 
        </xs:annotation> 
       </xs:element> 
       <!--PVD--> 
       <xs:element name="Patient" type="HistoryRequestPatientType"> 
        <xs:annotation> 
         <xs:documentation>PTT</xs:documentation> 
        </xs:annotation> 
       </xs:element> 
       <!--PTT--> 
       <xs:element name="BenefitsCoordination" type="BenefitsCoordinationRequestType" maxOccurs="3"> 
        <xs:annotation> 
         <xs:documentation>COO</xs:documentation> 
        </xs:annotation> 
       </xs:element> 
       <!--COO--> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 
    <xs:element name="RxHistoryResponse"> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:annotation> 
        <xs:documentation>UIH-020</xs:documentation> 
        <xs:documentation>UIH-030-1</xs:documentation> 
        <xs:documentation>PVD-P2</xs:documentation> 
       </xs:annotation> 
       <xs:element ref="RxReferenceNumber" minOccurs="0"/> 
       <!--UIH.2.1--> 
       <xs:element ref="PrescriberOrderNumber" minOccurs="0"/> 
       <!--UIH.3.1--> 
       <xs:element name="Response" type="HistoryResponseType"> 
        <xs:annotation> 
         <xs:documentation>RES</xs:documentation> 
        </xs:annotation> 
       </xs:element> 
       <!--RES--> 
       <xs:element name="Pharmacy" type="OptionalPharmacyType" minOccurs="0"> 
        <xs:annotation> 
         <xs:documentation>PVD-P2</xs:documentation> 
        </xs:annotation> 
       </xs:element> 
       <!--PVD--> 
       <xs:element name="Prescriber" type="HistoryPrescriberType"> 
        <xs:annotation> 
         <xs:documentation>PVD-PC</xs:documentation> 
        </xs:annotation> 
       </xs:element> 
       <!--PVD--> 
       <xs:element name="Patient" type="HistoryResponsePatientType"> 
        <xs:annotation> 
         <xs:documentation>PTT</xs:documentation> 
        </xs:annotation> 
       </xs:element> 
       <!--PTT--> 
       <xs:element name="BenefitsCoordination" type="BenefitsCoordinationResponseType" maxOccurs="3"> 
        <xs:annotation> 
         <xs:documentation>COO</xs:documentation> 
        </xs:annotation> 
       </xs:element> 
       <!--COO--> 
       <xs:choice minOccurs="0"> 
        <xs:element name="MedicationDispensed" type="HistoryDispensedMedicationType" maxOccurs="300"> 
         <xs:annotation> 
          <xs:documentation>DRU-D</xs:documentation> 
         </xs:annotation> 
        </xs:element> 
        <!--DRU--> 
        <xs:element name="MedicationPrescribed" type="HistoryPrescribedMedicationType" maxOccurs="300"> 
         <xs:annotation> 
          <xs:documentation>DRU-P</xs:documentation> 
         </xs:annotation> 
        </xs:element> 
        <!--DRU--> 
       </xs:choice> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 
. 
. 
. 
. 
.. 
. 
continues 

の一部です。 私は応答をお読みください

ありがとうございました。

答えて

0

xsdからサンプルxmlを提供できるプログラムを使用できます。例えば、 Stylus Studio

あなたは私、私はこれは私がその特定のユーザの値を持つ新しいXML要求を構築し、リクエストを送信する必要があり、各ユーザーのリクエストに応じてウェブアップで動的に起こるはずあなた

+0

用のサンプルXMLを作ることができるXSDを提供する場合 – HaBo

関連する問題