我目前正在开发一个BizTalk业务流程,它使用消息分配形状将传入的xml消息转换为二进制,以便它可以存储在传出消息的提升属性中。
消息赋值形状表达式如下所示(myXml是System.Xml.XmlDocument类型的变量):
myXml = ReceiveMessage;
SendMessage.Payload = System.Text.Encoding.UTF8.GetBytes(myXml.OuterXml);
我收到设计时错误“无法隐式转换类型'System.Byte []'到'System.Byte []'”
我的编排如下:
我还包括传入和传出消息的模式。
传入:
<?xml version="1.0" encoding="utf-16" ?>
- <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="SeleneFTPFile">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" name="Row">
- <xs:complexType>
- <xs:sequence>
<xs:element name="Servicer_x0020_Order_x0020_ID" type="xs:unsignedInt" />
<xs:element name="Loan_x0020_Number" type="xs:string" />
<xs:element name="Servicer_x0020_Loan_x0020_Number" type="xs:string" />
<xs:element name="Selene_x0020_ID" type="xs:string" />
<xs:element name="BPO_x0020_Vendor" type="xs:string" />
<xs:element name="Pool" type="xs:string" />
<xs:element name="Order_x0020_Date" type="xs:string" />
<xs:element name="Completed_x0020_Date" type="xs:string" />
<xs:element name="Review_x0020_Date" type="xs:string" />
<xs:element name="Reviewer" type="xs:string" />
<xs:element name="Product" type="xs:unsignedByte" />
<xs:element name="Product_x0020_Name" type="xs:string" />
<xs:element name="Product_x0020_Name2" type="xs:string" />
<xs:element name="Property_x0020_Address" type="xs:string" />
<xs:element name="City" type="xs:string" />
<xs:element name="State" type="xs:string" />
<xs:element name="Zip" type="xs:unsignedInt" />
<xs:element name="Size_x0020_Square_x0020_Feet" type="xs:unsignedShort" />
<xs:element name="Bedroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Bathroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Garage" type="xs:string" />
<xs:element name="Lot_x0020_Size" type="xs:decimal" />
<xs:element name="Property_x0020_Type" type="xs:string" />
<xs:element name="Location" type="xs:string" />
<xs:element name="Location_x0020_View" type="xs:anyType" />
<xs:element name="Estimate_x0020_of_x0020_Exterior_x0020_Repairs" type="xs:unsignedShort" />
<xs:element name="Estimate_x0020_of_x0020_Interior_x0020_Repairs" type="xs:string" />
<xs:element name="Occupied" type="xs:string" />
<xs:element name="Currently_x0020_Listed" type="xs:string" />
<xs:element name="List_x0020_Price" type="xs:string" />
<xs:element name="List_x0020_Date" type="xs:string" />
<xs:element name="Listing_x0020_Agency" type="xs:string" />
<xs:element name="Listing_x0020_Agent" type="xs:string" />
<xs:element name="Listing_x0020_Agent_x0020_Phone_x0020_Number" type="xs:string" />
<xs:element name="DOM" type="xs:string" />
<xs:element name="Property_x0020_Issue" type="xs:string" />
<xs:element name="Property_x0020_Issue_x0020_Comment" type="xs:string" />
<xs:element name="Confidence_x0020_Score" type="xs:anyType" />
<xs:element name="Valuation_x0020_Summary" type="xs:string" />
<xs:element name="Current_x0020_REO_x0020_Quick_x0020_Sale_x0020_Value" type="xs:unsignedInt" />
<xs:element name="Current_x0020_Retail_x0020_Value" type="xs:unsignedInt" />
<xs:element name="Recommend_x0020_Retail_x0020_List" type="xs:unsignedInt" />
<xs:element name="Condition_x0020_Grade" type="xs:anyType" />
<xs:element name="Market_x0020_Grade" type="xs:anyType" />
<xs:element name="Marketability_x0020_Grade" type="xs:anyType" />
<xs:element name="Overall_x0020_Risk_x0020_Grade" type="xs:anyType" />
<xs:element name="Total_x0020_REO_x0020_listing_x0020_in_x0020_Neighborhood" type="xs:unsignedByte" />
<xs:element name="Total_x0020_Retail_x0020_listing_x0020_in_x0020_Neighborhood" type="xs:unsignedByte" />
<xs:element name="Total_x0020_REO_x0020_Sales_x0020_in_x0020_Neighborhood_x0020_in_x0020_last_x0020_90_x0020_days" type="xs:anyType" />
<xs:element name="Total_x0020_Retail_x0020_sales_x0020_in_x0020_Neighborhood_x0020_in_x0020_last_x0020_90_x0020_days" type="xs:anyType" />
<xs:element name="Neighborhood_x0020_Low_x0020_Price" type="xs:unsignedInt" />
<xs:element name="Neighborhood_x0020_High_x0020_Price" type="xs:unsignedInt" />
<xs:element name="Vandalism_x0020_Risk" type="xs:anyType" />
<xs:element name="Prop_x0020_Damage_x0020_Flag" type="xs:string" />
<xs:element name="Prop_x0020_Damage_x0020_Desc" type="xs:string" />
<xs:element name="BPO_x0020_Hyperlink" type="xs:unsignedInt" />
<xs:element name="Year_x0020_Built" type="xs:unsignedShort" />
<xs:element name="Last_x0020_Sale_x0020_Date" type="xs:string" />
<xs:element name="Last_x0020_Sale_x0020_Price" type="xs:string" />
<xs:element name="Comp1_x0020_List_x0020_Address" type="xs:string" />
<xs:element name="Comp1_x0020_List_x0020_City" type="xs:string" />
<xs:element name="Comp1_x0020_List_x0020_State" type="xs:string" />
<xs:element name="Comp1_x0020_List_x0020_Zip" type="xs:unsignedInt" />
<xs:element name="Comp1_x0020_List_x0020_Comp_x0020_Type" type="xs:string" />
<xs:element name="Comp1_x0020_List_x0020_Size" type="xs:unsignedShort" />
<xs:element name="Comp1_x0020_List_x0020_Bedroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp1_x0020_List_x0020_Bathroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp1_x0020_List_x0020_Garage" type="xs:string" />
<xs:element name="Comp1_x0020_List_x0020_Lot_x0020_Size" type="xs:decimal" />
<xs:element name="Comp1_x0020_List_x0020_Location" type="xs:anyType" />
<xs:element name="Comp1_x0020_List_x0020_Condition" type="xs:string" />
<xs:element name="Comp1_x0020_List_x0020_Price" type="xs:unsignedInt" />
<xs:element name="Comp1_x0020_List_x0020_Date" type="xs:string" />
<xs:element name="Comp2_x0020_List_x0020_Address" type="xs:string" />
<xs:element name="Comp2_x0020_List_x0020_City" type="xs:string" />
<xs:element name="Comp2_x0020_List_x0020_State" type="xs:string" />
<xs:element name="Comp2_x0020_List_x0020_Zip" type="xs:unsignedInt" />
<xs:element name="Comp2_x0020_List_x0020_Comp_x0020_Type" type="xs:string" />
<xs:element name="Comp2_x0020_List_x0020_Size" type="xs:unsignedShort" />
<xs:element name="Comp2_x0020_List_x0020_Bedroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp2_x0020_List_x0020_Bathroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp2_x0020_List_x0020_Garage" type="xs:string" />
<xs:element name="Comp2_x0020_List_x0020_Lot_x0020_Size" type="xs:decimal" />
<xs:element name="Comp2_x0020_List_x0020_Location" type="xs:anyType" />
<xs:element name="Comp2_x0020_List_x0020_Condition" type="xs:string" />
<xs:element name="Comp2_x0020_List_x0020_Price" type="xs:unsignedInt" />
<xs:element name="Comp2_x0020_List_x0020_Date" type="xs:string" />
<xs:element name="Comp3_x0020_List_x0020_Address" type="xs:string" />
<xs:element name="Comp3_x0020_List_x0020_City" type="xs:string" />
<xs:element name="Comp3_x0020_List_x0020_State" type="xs:string" />
<xs:element name="Comp3_x0020_List_x0020_Zip" type="xs:unsignedInt" />
<xs:element name="Comp3_x0020_List_x0020_Comp_x0020_Type" type="xs:string" />
<xs:element name="Comp3_x0020_List_x0020_Size" type="xs:unsignedShort" />
<xs:element name="Comp3_x0020_List_x0020_Bedroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp3_x0020_List_x0020_Bathroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp3_x0020_List_x0020_Garage" type="xs:string" />
<xs:element name="Comp3_x0020_List_x0020_Lot_x0020_Size" type="xs:decimal" />
<xs:element name="Comp3_x0020_List_x0020_Location" type="xs:anyType" />
<xs:element name="Comp3_x0020_List_x0020_Condition" type="xs:string" />
<xs:element name="Comp3_x0020_List_x0020_Price" type="xs:unsignedInt" />
<xs:element name="Comp3_x0020_List_x0020_Date" type="xs:string" />
<xs:element name="Comp1_x0020_Sold_x0020_Address" type="xs:string" />
<xs:element name="Comp1_x0020_Sold_x0020_City" type="xs:string" />
<xs:element name="Comp1_x0020_Sold_x0020_State" type="xs:string" />
<xs:element name="Comp1_x0020_Sold_x0020_Zip" type="xs:unsignedInt" />
<xs:element name="Comp1_x0020_Sold_x0020_Type" type="xs:anyType" />
<xs:element name="Comp1_x0020_Sold_x0020_Comp_x0020_Type" type="xs:string" />
<xs:element name="Comp1_x0020_Sold_x0020_Size" type="xs:unsignedShort" />
<xs:element name="Comp1_x0020_Sold_x0020_Bedroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp1_x0020_Sold_x0020_Bathroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp1_x0020_Sold_x0020_Garage" type="xs:string" />
<xs:element name="Comp1_x0020_Sold_x0020_Lot_x0020_Size" type="xs:decimal" />
<xs:element name="Comp1_x0020_Sold_x0020_Location" type="xs:anyType" />
<xs:element name="Comp1_x0020_Sold_x0020_Condition" type="xs:string" />
<xs:element name="Comp1_x0020_Sold_x0020_Price" type="xs:unsignedInt" />
<xs:element name="Comp1_x0020_Sold_x0020_Date" type="xs:string" />
<xs:element name="Comp2_x0020_Sold_x0020_Address" type="xs:string" />
<xs:element name="Comp2_x0020_Sold_x0020_City" type="xs:string" />
<xs:element name="Comp2_x0020_Sold_x0020_State" type="xs:string" />
<xs:element name="Comp2_x0020_Sold_x0020_Zip" type="xs:unsignedInt" />
<xs:element name="Comp2_x0020_Sold_x0020_Type" type="xs:anyType" />
<xs:element name="Comp2_x0020_Sold_x0020_Comp_x0020_Type" type="xs:string" />
<xs:element name="Comp2_x0020_Sold_x0020_Size" type="xs:unsignedShort" />
<xs:element name="Comp2_x0020_Sold_x0020_Bedroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp2_x0020_Sold_x0020_Bathroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp2_x0020_Sold_x0020_Garage" type="xs:string" />
<xs:element name="Comp2_x0020_Sold_x0020_Lot_x0020_Size" type="xs:decimal" />
<xs:element name="Comp2_x0020_Sold_x0020_Location" type="xs:anyType" />
<xs:element name="Comp2_x0020_Sold_x0020_Condition" type="xs:string" />
<xs:element name="Comp2_x0020_Sold_x0020_Price" type="xs:unsignedInt" />
<xs:element name="Comp2_x0020_Sold_x0020_Date" type="xs:string" />
<xs:element name="Comp3_x0020_Sold_x0020_Address" type="xs:string" />
<xs:element name="Comp3_x0020_Sold_x0020_City" type="xs:string" />
<xs:element name="Comp3_x0020_Sold_x0020_State" type="xs:string" />
<xs:element name="Comp3_x0020_Sold_x0020_Zip" type="xs:unsignedInt" />
<xs:element name="Comp3_x0020_Sold_x0020_Type" type="xs:anyType" />
<xs:element name="Comp3_x0020_Sold_x0020_Comp_x0020_Type" type="xs:string" />
<xs:element name="Comp3_x0020_Sold_x0020_Size" type="xs:unsignedShort" />
<xs:element name="Comp3_x0020_Sold_x0020_Bedroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp3_x0020_Sold_x0020_Bathroom_x0020_Count" type="xs:unsignedByte" />
<xs:element name="Comp3_x0020_Sold_x0020_Garage" type="xs:string" />
<xs:element name="Comp3_x0020_Sold_x0020_Lot_x0020_Size" type="xs:decimal" />
<xs:element name="Comp3_x0020_Sold_x0020_Location" type="xs:anyType" />
<xs:element name="Comp3_x0020_Sold_x0020_Condition" type="xs:string" />
<xs:element name="Comp3_x0020_Sold_x0020_Price" type="xs:unsignedInt" />
<xs:element name="Comp3_x0020_Sold_x0020_Date" type="xs:string" />
<xs:element name="BPO_x0020_Date" type="xs:string" />
<xs:element name="As_x0020_Repaired_x0020_Value" type="xs:unsignedInt" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
外发邮件架构:
<?xml version="1.0" encoding="utf-16" ?>
- <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="PerformTransformationRequest">
- <xs:annotation>
- <xs:appinfo>
- <properties xmlns="http://schemas.microsoft.com/BizTalk/2003">
<property distinguished="true" xpath="/*[local-name()='PerformTransformationRequest' and namespace-uri()='']/*[local-name()='Payload' and namespace-uri()='']" />
</properties>
</xs:appinfo>
</xs:annotation>
- <xs:complexType>
- <xs:sequence>
<xs:element name="Version" type="xs:string" />
<xs:element name="Payload" type="xs:base64Binary" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
提前致谢。
答案 0 :(得分:0)
如果我没记错,我们在将BizTalk项目从BizTalk 2009迁移到BizTalk 2010后遇到了这个错误。删除架构项目对Microsoft.BizTalk.DefaultPipelines
和Microsoft.BizTalk.GlobalPropertySchemas
的引用会使错误消失。