1

BTAHL7V2Xスキーマ(MSH_25_GLO_DEFなど)を使用してアセンブリを構築しました。

別のアセンブリで、要素の1つがタイプMSH_25_GLO_DEFであるスキーマを作成する必要があります。

私のBTAHL7V2XCommonアセンブリには、次のものがあります。

<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://microsoft.com/HealthCare/HL7/2X" targetNamespace="http://microsoft.com/HealthCare/HL7/2X" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:appinfo>
      <b:schemaInfo root_reference="MSH_25_GLO_DEF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="MSH_25_GLO_DEF">
  ...

他のアセンブリには、次のようなスキーマがあります。

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://mycompany.com/Custom/HL7/2X" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:ns0="http://microsoft.com/HealthCare/HL7/2X" targetNamespace="http://mycompany.com/Custom/HL7/2X" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="BTAHL7Schemas.MSH_25_GLO_DEF" namespace="http://mycompany.com/Custom/HL7/2X"/>
  <xs:include schemaLocation="ORU_R01_23_GLO_DEF.xsd" />
  <xs:annotation>
    <xs:appinfo>
      <b:schemaInfo standards_version="HL7.DBVersion.1_5" document_type="HL7 2X Schema" version="2.0.0104.0.2.0" root_reference="ORU_R01_23_GLO_DEF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
      <b:references>
        <b:reference targetNamespace="http://mycompany.com/Custom/HL7/2X/2.3/ORU/DataTypes" />
        <b:reference targetNamespace="http://microsoft.com/HealthCare/HL7/2X" />
        <b:reference targetNamespace="http://mycompany.com/Custom/HL7/2X/2.3/ORU/Segments" />
        <b:reference targetNamespace="http://mycompany.com/Custom/HL7/2X/2.3/ORU/Tables" />
      </b:references>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="ORU_R01_23_ALL">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="1" name="MSH_25_GLO_DEF" type="ns0:MSH_25_GLO_DEF" />
        <xs:element minOccurs="1" maxOccurs="1" ref="ORU_R01_23_GLO_DEF" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

MSHヘッダーを含むBTAHL7V2Xアセンブリへの参照を追加しました。オブジェクトブラウザーで参照されたアセンブリを表示すると、MSH_25_GLO_DEFを確認できますが、「http://microsoft.com/HealthCare/ 」というエラーが常に表示されます。スキーマを表示すると、HL7 / 2X:MSH_25_GLO_DEFが宣言されていません。

また、インポート参照をインクルードに変更してみました。

<xs:include schemaLocation="BTAHL7Schemas.MSH_25_GLO_DEF" /> 

ただし、スキーマを表示すると別のエラーが発生します。

The targetNamespace 'http://microsoft.com/HealthCare/HL7/2X' of included/redefined schema should be the same as the targetNamespace 'http://mycompany.com/Custom/HL7/2X' of the including schema. 

別のアセンブリでBizTalkスキーマを参照する適切な方法はありますか?

4

1 に答える 1

0

これをチェックしてください: http ://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/d40d2c15-5c91-45c9-877d-2559802d1b1e

それが役立つことを願っています

<xs:schema ... targetNamespace="http://mycompany.com/Custom/HL7/2X">
        <xs:import schemaLocation="BTAHL7Schemas.MSH_25_GLO_DEF" namespace="http://microsoft.com/HealthCare/HL7/2X"/>
    <b:schemaInfo ... root_reference="ORU_R01_23_ALL" ... />
于 2013-03-18T19:51:03.730 に答える