BizTalk :: The starting element named "X" and namespace "Y" was unexpected

BizTalk got error message below:

The adapter was unable to send a message sending port "TIMESHEET_ODS_GMPS_FAB" with the 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 initial element named" CSP_BT_TIMESHEET_ODS_TO_GMPS "and Namespace" http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo/GMPS "was unexpected. that your input XML matches the schema for the operation.

I realize there have been several posts previously with the same topic, but unfortunately they don't apply as I tried the following with no result:

  • Validate an instance between the runtime message and the schema to ensure that the input XML matches the schema
  • Make sure the message is configured to correct the message type during Orchestration flow
  • Use a consistent namespace http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo/GMPS in Schema
  • Use operation name "CSP_BT_TIMESHEET_ODS_TO_GMPS" in SOAP action Header to match with send and use operation ID Action "Procedure / dbo / CSP_BT_TIMESHEET_ODS_TO_GMPS" to match namespace

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

  • I tried to set the Root Reference property
  • No schema uses the same namespace
  • No port using the same InboundID
  • I am not using XML passing for this particular schema

My runtime [but shortened] The message looks like this:

<?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 circuit looks like this:

<?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 looks like this:

<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've ever come across a similar error message, or see that there is something wrong with my code, a hint would be much appreciated.

+3


source to share


1 answer


The problem has now been resolved. I ran into several other issues, including a timeout issue, though until I finally finish development now and am not going to push QA.

In short, I got an offline suggestion that mentioned that I shouldn't change one schema and just find and replace whatever needs to be used as another schema, even if I did a clean find and replace process. So I recreated the schema from scratch and redistributed and it all worked well all of a sudden.

Also, I used http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo namespace instead of postfixed name / GMPS in the newly created schema as this was the default, besides namespace everything else in the new scheme is an exact match [as I see it, at least] with the old one.



However, since my project is slightly behind schedule, I didn't try: [1] Change the namespace without re-creating the schema from scratch [2] To try to use the namespace with postfix / GMPS after recreating the schema from scratch

This entry is for reference purposes only.

0


source







All Articles