BizTalk ::名称为“X”的起始元素和名称空间“Y”是意外的

时间:2022-05-15 17:17:25

I came across error message below in BizTalk:

我在BizTalk中遇到了以下错误消息:

The adapter failed to transmit message going to send port "TIMESHEET_ODS_GMPS_FAB" with URL "mssql://SINGVSQLD8/VID08/GMPS?InboundId=CSP_BT_TIMESHEET_ODS_TO_GMPS". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The start element with name "CSP_BT_TIMESHEET_ODS_TO_GMPS" and namespace "http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo/GMPS" was unexpected. Please ensure that your input XML conforms to the schema for the operation.

适配器无法使用URL“mssql:// SINGVSQLD8 / VID08 / GMPS?InboundId = CSP_BT_TIMESHEET_ODS_TO_GMPS”发送发送到端口“TIMESHEET_ODS_GMPS_FAB”的消息。它将在为此发送端口指定的重试间隔后重新传输。详细信息:“Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException:名称为”CSP_BT_TIMESHEET_ODS_TO_GMPS“的起始元素和名称空间”http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo/GMPS“出乎意料。请确保输入XML符合操作的架构。

I understand that there has been several posts with the same topic previously, but unfortunately none apply as I have tried attempts below with no result:

我知道以前有过几个帖子有相同的主题,但遗憾的是没有一个适用,因为我尝试过以下尝试没有结果:

  1. Validate Instance between run–time Message and the Schema to ensure that input XML conforms to the Schema
  2. 验证运行时消息和模式之间的实例,以确保输入XML符合模式
  3. Ensure that Message being set to correct Message Type throughout Orchestration flow
  4. 确保在整个Orchestration流程中将Message设置为更正消息类型
  5. Use consistent Namespace http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo/GMPS in the Schema
  6. 在Schema中使用一致的命名空间http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo/GMPS
  7. Use Operation Name "CSP_BT_TIMESHEET_ODS_TO_GMPS" in SOAP Action Header to match with Send Port Operation Identifier and use Operation Action "Procedure/dbo/CSP_BT_TIMESHEET_ODS_TO_GMPS" to match with the Namespace
  8. 在SOAP操作标头中使用操作名称“CSP_BT_TIMESHEET_ODS_TO_GMPS”以与发送端口操作标识符匹配,并使用操作操作“Procedure / dbo / CSP_BT_TIMESHEET_ODS_TO_GMPS”与命名空间匹配

In addition, there are several other things that may or may not be related:

此外,还有其他一些可能相关或不相关的事情:

  1. I tried to set Root Reference property
  2. 我试图设置Root Reference属性
  3. No schema using same Namespace
  4. 没有使用相同命名空间的模式
  5. No Port using same InboundID
  6. 没有端口使用相同的InboundID
  7. I’m not using XML Transmit for this particular schema
  8. 我没有将XML Transmit用于此特定架构

My run–time [but shortened] Message is as below:

我的运行时[但缩短]消息如下:

<?xml version="1.0" encoding="utf-8"?>
<CSP_BT_TIMESHEET_ODS_TO_GMPS xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo/GMPS">
  <p_request_xml>&lt;GMPS_FAB&gt;&lt;record&gt;&lt;fromdate&gt;2014-02-01T00:00:00&lt;/fromdate&gt;&lt;todate&gt;2014-02-07T00:00:00&lt;/todate&gt;&lt;empno&gt;00157772&lt;/empno&gt;&lt;legacyempnum&gt;90297&lt;/legacyempnum&gt;&lt;timesheet_date&gt;2014-02-05T00:00:00&lt;/timesheet_date&gt;&lt;paycode&gt;AUST-NOR-SAL&lt;/paycode&gt;&lt;spanid&gt;63295458&lt;/spanid&gt;&lt;contractnum&gt;R3133&lt;/contractnum&gt;&lt;company_code&gt;0244&lt;/company_code&gt;&lt;job_project&gt;45985&lt;/job_project&gt;&lt;subacct_costctr&gt;CRPMT&lt;/subacct_costctr&gt;&lt;ctr_opcode&gt;CR001&lt;/ctr_opcode&gt;&lt;wbs_code /&gt;&lt;ll1worked&gt;0244&lt;/ll1worked&gt;&lt;ll2worked&gt;0100&lt;/ll2worked&gt;&lt;ll3worked&gt;45985&lt;/ll3worked&gt;&lt;ll4worked&gt;CRPMT&lt;/ll4worked&gt;&lt;ll6worked /&gt;&lt;hoursamt&gt;8.000000&lt;/hoursamt&gt;&lt;acttrantype&gt;O&lt;/acttrantype&gt;&lt;billot&gt;R&lt;/billot&gt;&lt;billotrate&gt;119.790000&lt;/billotrate&gt;&lt;diff_rate /&gt;&lt;diff_ot_rate&gt;0.00000000000000&lt;/diff_ot_rate&gt;&lt;direct_ind&gt;D&lt;/direct_ind&gt;&lt;emp_base_rate&gt;119.790000&lt;/emp_base_rate&gt;&lt;emp_ot_rate&gt;0.000000000000&lt;/emp_ot_rate&gt;&lt;interfaceflag /&gt;&lt;vendorcode /&gt;&lt;PAYRULE&gt;AUST-STAFF-EXEC&lt;/PAYRULE&gt;&lt;hourstype&gt;REG&lt;/hourstype&gt;&lt;emp_engage_type&gt;N&lt;/emp_engage_type&gt;&lt;contractor_ot_rate /&gt;&lt;last_modified&gt;2014-02-06T19:27:16.400&lt;/last_modified&gt;&lt;process_date&gt;2014-03-26T22:29:04.417&lt;/process_date&gt;&lt;calendar_id&gt;502&lt;/calendar_id&gt;&lt;equip_depth /&gt;&lt;equip_block /&gt;&lt;equip_loc /&gt;&lt;fullnm&gt;Burry, Raymond W&lt;/fullnm&gt;&lt;shiftcode&gt;8&lt;/shiftcode&gt;&lt;ll1home&gt;0244&lt;/ll1home&gt;&lt;ll2home&gt;5000&lt;/ll2home&gt;&lt;ll3home&gt;52363&lt;/ll3home&gt;&lt;craftcode /&gt;&lt;exportflag /&gt;&lt;job_discipline_code /&gt;&lt;job_discipline_name&gt;Project Engineer (Eng)&lt;/job_discipline_name&gt;&lt;application_code&gt;GMPS&lt;/application_code&gt;&lt;application_name&gt;GMPS&lt;/application_name&gt;&lt;calgroup_name&gt;GMPS APAC Engineering&lt;/calgroup_name&gt;&lt;calgroup_desc&gt;GMPS AP Engineering&lt;/calgroup_desc&gt;&lt;location_code&gt;SING&lt;/location_code&gt;&lt;calendar_name&gt;GMPS_GMPS APAC Engineering_02012014_02072014&lt;/calendar_name&gt;&lt;date_last_extracted&gt;2014-03-24T22:23:00&lt;/date_last_extracted&gt;&lt;/record&gt;&lt;/GMPS_FAB&gt;</p_request_xml>
  <p_response_xml xsi:nil="true" />
</CSP_BT_TIMESHEET_ODS_TO_GMPS>

My Schema is as below:

我的架构如下:

<?xml version="1.0" encoding="utf-16" ?> 
<xs:schema xmlns="http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo/GMPS" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:ns3="http://schemas.datacontract.org/2004/07/System.Data/GMPS" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo/GMPS" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation=".\DataSetSchema.xsd" namespace="http://schemas.datacontract.org/2004/07/System.Data/GMPS" /> 
<xs:annotation>
<xs:appinfo>
<fileNameHint xmlns="http://schemas.microsoft.com/servicemodel/adapters/metadata/xsd">Procedure.dbo</fileNameHint> 
<b:references>
<b:reference targetNamespace="http://schemas.datacontract.org/2004/07/System.Data/GMPS" /> 
</b:references>
</xs:appinfo>
</xs:annotation>
<xs:element name="CSP_BT_TIMESHEET_ODS_TO_GMPS">
<xs:annotation>
<xs:documentation>
<doc:action xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">Procedure/dbo/CSP_BT_TIMESHEET_ODS_TO_GMPS</doc:action> 
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="p_request_xml" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" maxOccurs="1" name="p_response_xml" nillable="true" type="xs:string" /> 
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CSP_BT_TIMESHEET_ODS_TO_GMPSResponse">
<xs:annotation>
<xs:documentation>
<doc:action xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">Procedure/dbo/CSP_BT_TIMESHEET_ODS_TO_GMPS/response</doc:action> 
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="CSP_BT_TIMESHEET_ODS_TO_GMPSResult" nillable="true" type="ns3:ArrayOfDataSet" /> 
<xs:element minOccurs="1" maxOccurs="1" name="ReturnValue" type="xs:int" /> 
<xs:element minOccurs="0" maxOccurs="1" name="p_response_xml" nillable="true" type="xs:string" /> 
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

My SOAP Action Header is as below:

我的SOAP Action Header如下:

<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Operation Name="CSP_BT_TIMESHEET_ODS_TO_GMPS" Action="Procedure/dbo/CSP_BT_TIMESHEET_ODS_TO_GMPS" />
</BtsActionMapping>

If you have ever experienced similar error message or see that something is wrong with my code, a clue will be much appreciated.

如果您曾经历过类似的错误消息或者看到我的代码出现问题,那么我们将非常感谢您提供线索。

1 个解决方案

#1


0  

The issue has now been resolved. I encountered several other issue including timeout issue afterward though until I finally finished the development just now and about to promote to QA.

这个问题现在已经解决了。之后我遇到了其他几个问题,包括超时问题,直到我最后完成开发并即将推广到QA。

Long story short, I received an offline suggestion mentioning that I should not modify one schema and just find-and-replace everything to be used as other schema even if I made a clean find-and-replace process. Therefore I recreated the schema from scratch and redeployed and everything worked well all of the sudden.

长话短说,我收到了一个离线建议,提到我不应该修改一个模式,只是找到并替换所有用作其他模式的东西,即使我做了一个干净的查找和替换过程。因此,我从头开始重新构建模式并重新部署,一切都突然好起来。

In addition, I used http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo namespace instead of the one with /GMPS postfix in the newly created schema as it was the given default. Aside from the namespace, everything else in the new schema is the exact match [from the way I see it, at least] with the old one.

此外,我使用了http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo命名空间而不是新创建的模式中的/ GMPS后缀,因为它是给定的默认值。除了名称空间之外,新模式中的所有其他内容都是完全匹配[从我看到它的方式,至少]与旧模式。

However, since my project now a little bit behind schedule, I didn't try to: [1] Only change the namespace without recreating the schema from scratch [2] To try to use the namespace with /GMPS postfix after recreating the schema from scratch

但是,由于我的项目现在有点落后于计划,我没有尝试:[1]只更改名称空间而不从头开始重新创建模式[2]尝试在重新创建模式后使用/ GMPS后缀的命名空间刮

This post made for future reference purpose only.

此帖仅供将来参考。

#1


0  

The issue has now been resolved. I encountered several other issue including timeout issue afterward though until I finally finished the development just now and about to promote to QA.

这个问题现在已经解决了。之后我遇到了其他几个问题,包括超时问题,直到我最后完成开发并即将推广到QA。

Long story short, I received an offline suggestion mentioning that I should not modify one schema and just find-and-replace everything to be used as other schema even if I made a clean find-and-replace process. Therefore I recreated the schema from scratch and redeployed and everything worked well all of the sudden.

长话短说,我收到了一个离线建议,提到我不应该修改一个模式,只是找到并替换所有用作其他模式的东西,即使我做了一个干净的查找和替换过程。因此,我从头开始重新构建模式并重新部署,一切都突然好起来。

In addition, I used http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo namespace instead of the one with /GMPS postfix in the newly created schema as it was the given default. Aside from the namespace, everything else in the new schema is the exact match [from the way I see it, at least] with the old one.

此外,我使用了http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo命名空间而不是新创建的模式中的/ GMPS后缀,因为它是给定的默认值。除了名称空间之外,新模式中的所有其他内容都是完全匹配[从我看到它的方式,至少]与旧模式。

However, since my project now a little bit behind schedule, I didn't try to: [1] Only change the namespace without recreating the schema from scratch [2] To try to use the namespace with /GMPS postfix after recreating the schema from scratch

但是,由于我的项目现在有点落后于计划,我没有尝试:[1]只更改名称空间而不从头开始重新创建模式[2]尝试在重新创建模式后使用/ GMPS后缀的命名空间刮

This post made for future reference purpose only.

此帖仅供将来参考。