BizTalk Preserve Interchange - wrong root node - biztalk

I've got a Party/Agreement with the setting "Preserve Interchange - suspend Interchange on error". My understanding is that that's supposed to provide data with http://schemas.microsoft.com/BizTalk/EDI/X12/2006/InterchangeXML and a root "X12InterchangeXml".
Apparently the root is being set to X12_00401_820 as I'm getting the error below.
Error:
6: Finding the document specification by message type "http://schemas.microsoft.com/BizTalk/EDI/X12/2006/InterchangeXML#X12_00401_820" failed. Verify the schema deployed properly.`
I'm trying to reverse engineer an old system (from BT2010 to BT2013/R2) that has an orchestration with http://schemas.microsoft.com/BizTalk/EDI/X12/2006/InterchangeXML and a root "X12InterchangeXml". I have the code and the bindings, but not the party definition, so I'm taking test data and building on my party/agreement for the 820 to try to recreate what they were doing before.
References:
EDI Batch Schemas
BizTalk Server: Working with Preserve Interchange EDI Xml (Part 1)

It turns out the error namespace was really from the outbound part of the receive port, not the inbound part. I had a map to the 820 specified in the message, but that 820 schema was not deployed.

Related

Biztalk Cannot process EDIFACT file

I'm new in processing EDIFACT files. I want to process a EDIFACT file of type D:01B INTFSTA. I searched for schema in BizTalk server, created orchestration and deployed in BizTalk server. While processing the file I get the following error.
Error encountered during parsing.
Error: 1 (Miscellaneous error)
70: Cannot locate document specification because multiple schemas matched the message type "http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_D01B_IFTSTA".
Error: 2 (Miscellaneous error)
71: Transaction Set or Group Control Number Mismatch
Error: 3 (Miscellaneous error)
29: Invalid count specified at interchange, group or message level
.
The sequence number of the suspended message is 1.
There is no other application using the same schema (D:01B INTFSTA).
Please help.
Most likely you have the schema deployed more than once in your BizTalk environment. In the BizTalk console, go to "All Artifacts", select "Schemas" and list alphabetically. There, search for EFACT_D01B_IFTSTA in the Root Name column. You will find that it is deployed in another application most likely.
A good practice around deploying EDI schemas btw, is to update the namespace to include the name of your trading partner. More than 1 of your trading partners may use the schema in different ways or have customizations in it. This approach lets you handle this situation.
The suggested namespace would, for example, be http://schemas.yourcompany.com/partners/yourtradingpartner
Most likely, the schema is not deployed. Check the Schemas node of the All Artifacts Application.
2&3. You test EDIFACT instance is invalid. Did you cut and paste it together? That would cause the mis-matches.
Note, it's a better practice to change the Target Namespace on the EDI schemas to something specific to the app which uses them.

Importing Biztalk bindings error

I am trying to deploy Biztalk project to my local Biztalk Server using Biztalk Deployment Framework and i am getting the following error:
Information: Importing bindings
"C:\Users...\PortBindings.xml"
into application "Mdm" in BizTalk configuration database
(server=".", database="BizTalkMgmtDb")... EXEC : error :
Failed to update binding information.
[C:\Users...\Deployment.btdfproj]
Cannot update receive port "ApprovedRequests". Cannot update receive
location "ApprovedRequestsDb". The following items could not be
matched up to hosts due to name and/or trust level mismatches:
Item: 'ApprovedRequestsDb' Host: 'ReceiveHost' Trust level:
'Untrusted' You must do one of the following:
1) Create hosts with
these names and trust levels and try again
2) Re-export the MSI without the binding files and have a post import script apply a
suitable binding file.
I've already had host named 'ReceiveHost', so i decided that theres something wrong with Trust level. I tried to deploy with trust level 'Trusted' and recieved the same error.
Can't figure out what is causing the problem.
Thanks.
According to the error, in your binding file, the ApprovedRequestsDb receive location is configured to use a host (receive handler) called ReceiveHost, which is untrusted, which BizTalk cannot find.
Double-check the spelling of the host on the local BizTalk server into which you are importing the binding file. Also make sure that it is untrusted.
Finally, the host must be configured as a handler for the adapter used by your receive location. So if your receive location should use the WCF-SQL adapter, then go to the adapter configuration in the BizTalk Administration Console and ensure that the ReceiveHost is configured as a receive handler for that adapter.
Check you have a host for this install, in your case called "ReceiveHost". You can create hosts and host instances in BizTalk Server Admin Console.
Check for each adapter (especially the adapter used for "ApprovedRequestsDb") that your bindings use, that "ReceiveHost" host is set up in direction Send/Receive, this will at first likely be only BizTalkServerApplication which is the default. Under Platform Settings -> Adapters look through these and make new ones where needed to use the "SQL" host.
This error will only ocur if your HostName does not exist or incorrectly spelt. Also check the Trust level is set to Untrusted. Once you have verified the following you can re-create your binding file as ther might be some typo that is causing it not to import properly.

BizTalk 2013 log file to debug EDI application

I am new to BizTalk. I wrote an application to receive an EDI 850 (Purchase Order) and to output a corresponding xml file in a separate folder location.
In the project I deployed to biz talk I have an 850 schema, my result xml schema, a map from the original EDI 850 to my new xml schema, and a pipeline with a flat file assembler pointing to my new schema.
I set it up like what is explained in the following tutorial: http://msdn.microsoft.com/en-us/library/bb226541.aspx. I did run through this tutorial first and it worked for me.
I dropped the edi file into my receive folder and it is picked up. But my result file in the send to folder is empty.
The event viewer does not show any errors.
I would like to know if there is a log file that would show where something may have been configured incorrectly.
To RECEIVE an EDI file, you need a receive pipeline with an EDI disassembler.
The EdiReceive pipeline in the EDI BizTalk application is what you are looking for most likely. By default this pipeline does the necessary tracking, so you should be able to see in the "Tracked Message Events".
You should always try to do it step by step:
EdiReceive disassemble to XML file and subscribe to that file using a send port.
Once this works, try mapping the result with a 'Test Map' using VS. You might notice you did something wrong there.
Once this works, deploy your mapping to BizTalk and set it in the send port as an outbound map, so it gets executed.
Hope this helps.
Use the BizTalk Server Administration Console and look at Tracked message events, that should show you if BizTalk received it and where it went.

BizTalk error Schema Not Found

I'm receiving an HL7 2.3 ORU schema. I've configured the appropriate party to use a schema namespace of "http://mycompany.ca/application/HL7/2X/2.3/1"
I've built my custom HL7 Schema, ad set the targetNamespace to "http://mycompany.ca/application/HL7/2X/2.3/1", and ensured it has a root element of "ORU_R01_23_GLO_DEF".
I've deployed the schema to biztalk by importing it, then running the msi.
I can see that my BIzTalk application has the schema in it, and I can see that the MSI installed the schema on the drive.
When I send an HL7 to my receive location, I get an error in the evenlog:
Error happened in body during parsing
Error # 1
Alternate Error Number: 301
Alternate Error Description: Schema http://mycompany.ca/application/HL7/2X/2.3/1#ORU_R01_23_GLO_DEF not found
Alternate Encoding System: HL7-BTA
From this, I can tell that the party resolution worked correctly, but can't figure out why it can not find the schema.

Pool Multiple Messages with BizTalk 2006 SQL Adapter

I have a StoredProcedure that returns a simple table containing several records:
DECLARE #STEPS_TABLE AS TABLE (OrchestrationID uniqueidentifier, [Message] nvarchar(1000));
-- LOADING THE VALUES HERE
SELECT * FROM #STEPS_TABLE As Step FOR XML AUTO, XMLDATA, ELEMENTS
I used the SQL Transport Schema Generation Wizard to create my schema and could configure the port correctly. If I use this schema on my orchestration, it works perfectly. BizTalk starts one instance of the orchestration everytime the #STEPS_TABLE has more than 1 record.
Reading Microsoft technical documentation, they recommend to get several messages in one call and then use the XML pipeline to disassemble the multi-row BizTalk message into a single-row BizTalk message.
I haven't used the XML pipeline before, so I tried the provided steps but couldn't get it to work.
Could somebody provide me a link to a "how to" (didn't find anything until now, after several hours of searching) or give me some hints to succeed.
Thanks in advance.
... some hours later I could figure it out myself. So if anybody comes across the same issue as me, here you have some guidelines to make it work on your environment.
At the end I followed a different walkthrough from Microsoft and avoided the pipeline recommendation altogether. The documentation I found is called "Disassembling Result Sets Using the SQL Adapter" and does exactly what i was looking for. You can just follow the whole walkthrough from Microsoft but avoid the creation of the send port and make some little adjustment on the receive port.
After following the technical document you will end up with two schemas, I will call them message and envelope (contains several messages) for the sake of this excercise. In your orchestration you can create a receiving port that maps to the message and then when you configure it as a SQL Port and you link it to your stored procedure (or select statement), you only have to change the Document Root Element Name to the envelope root name; the XML Receive pipeline (provided by default in BizTalk 2006) will do the magic of disassembling the messages contained in the envelope and instantiating an orchestration for each message.
The Microsoft "Disassembling Result Sets Using the SQL Adapter" walkthrough can be found under:
http://msdn.microsoft.com/en-us/library/aa562098(v=bts.20).aspx
Mission accomplished :)

Resources