使用biztalk转换将两个模式合并为一个模式(作为主细节)

时间:2019-04-20 07:13:37

标签: schema biztalk biztalk-orchestrations

我需要将两个模式转换为一个模式作为主从模式。我有passengerId作为唯一字段。一些主模式的记录可能没有详细模式的任何引用,所以我需要一个条件,检查详细模式中是否存在passengerId,从而为主模式创建新的子代。 https://www.dropbox.com/s/8xpbqawstu94u85/transform.jpg?dl=0

主模式:

\b

详细架构

 <xs:complexType name="StoredProcedureResultSet0">
 <xs:sequence>
  <xs:element minOccurs="0" maxOccurs="1" name="PassengersId" nillable="true" type="xs:long" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="Gender" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="FirstName" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="LastName" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="ClassOfService" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="SSR" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="FFP" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="ChkInStatus" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="BoardingStatus" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="Passenger_Type" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="SeatNo" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="PassengerCountryCode" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="PassengerCountryName" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>

结果

 <xs:complexType name="StoredProcedureResultSet0">
 <xs:sequence>
  <xs:element minOccurs="0" maxOccurs="1" name="Origin" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="Destination" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="FlightNo" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="FlightDate" nillable="true" type="xs:dateTime" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="PassengersId" nillable="true" type="xs:long" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="Gender" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="FirstName" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="LastName" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="ClassOfService" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="SSR" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="SSRCode" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="ChkInStatus" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="BoardingStatus" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="Passenger_Type" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="SeatNo" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" maxOccurs="1" name="PassengerCountryCode" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>

0 个答案:

没有答案