BizTalk 2013 log file to debug EDI application - biztalk

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.

Related

BizTalk Preserve Interchange - wrong root node

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.

Why there is no selectable Receive Handler while creating a Receive Location?

As I'm learning to use BizTalk Server 2013, I'm following this sample:
http://msdn.microsoft.com/en-us/library/dd334500%28v=bts.80%29.aspx
At step 4, it says how to create a Receive Location. While I'm creating one, the combo box for Receive handler is empty (which is said to select the BizTalkServerApplication).
Question: Why is that empty? Is that any configuration that I've missed?
FYI: I'm using BizTalk Server 2013 (Evaluation)
Most likely, because there is no Receive Handler configured for the File Adapter.
Check the Platform Settings/Adapters/FILE. You should see a Send and Receive entry. If not, right-click/New and create the ones you need.
This can happen if the BizTalk Hosts are created outside the initial Configuration. It is also possible that you did not complete all the options in BizTalk Configuration. You can check there also to make sure BizTalk Runtime is configured.

Biztalk WCF-webhttp (WCF web publishing wizard)

[I am new in biztalk trying to publish and consume servcie using webhttp (using Biztalk 2013, VS 2012)
getting following message and don't know want to do next to solve this issue.
*you have created a service.
To test this service, you will need to create a client and use it to call the service. you can do this using the svcutil.exe tool from the command line with the following syntax:
svcutil.exe "http://[host]/expwebhttpsampledesktop/service1.svc?singlews"*dl
"svcutil.exe" command it generates .cs, .wsdl, and metadata.xml files for me.
not sure what i am doing wrong here but trying to consume the service i made. and at the end of it i am getting following error
"Error consuming WCF service metadata. Message part missing element. Correct service description ""http://tempuri.org/" message type "service1_operation1_inputmessage"" part "Part" and return the wizard."]
thank you in advance
You need to create a client that will now consume the service. A client can be anything from a simple Console app, a BizTalk Send Port, another Web-Service or a Winforms/WPF app. The client will invoke your service (possibly passing parameters), you service will do its stuff and return a response back to the client.
There are a number of ways to create a client, however you might want to start with this tutorial from MSDN: http://msdn.microsoft.com/en-us/library/ms733133.aspx.
Alternatively, you might want to search for 'Add Service Reference Visual Studio 2012'. Adding a service reference creates the necessary libraries for your client to consume the service.
UPDATE: I found some relevant screenshots, so I thought I would add them....
To add a Service Reference, right-click on your Project and select 'Add Service Reference':
within the 'Add Service Reference' dialog, enter the address of the service (in your case http://[host]/expwebhttpsampledesktop/service1.svc) and click 'Go' for the wizard to auto-discover the service methods. Finally, update the service Namespace:
You will now be able to reference your service just like any other type within C# in order to invoke it.
HTH, Nick.

Text file output from Biztalk?

I have a mapping in Biztalk from an external XML schema to an internal XML schema. The internal schema I wish to map to a flat file schema. But that doesent seems to be possible. I cant select the flat file schema as destination schema. So I guess I need to use a flat file assembler in a send pipeline? But on properties on the flat file assembler the flat file schema is not visible under Document Schema.
Do you know how to do this?
I use Biztalk 2009
+1 to what Jay said.
Moreover, You should do the following after step 2:
2.1 Create a new Map that references source schema (external schema) and destination schema (flat file schema created in step 2)
and then you should use this map to transform XML to flat file. This should be done using a send port configured with two things:
pipeline (already mentioned in Jay's response, #3)
Outbound Maps, you can find that in BizTalk Administration console under Send Port properties .. You should configure add the map you created in step 2.1 to the outbound maps.
Typically, you should be receiving the XML file on a receive location. so what you need to do is to create a new receive port, and a receive location. and in the send port properties (again!) add a new filter with the following configuration:
BTS.ReceivePortName == XXXXX
Where XXXXX is the receive port name.
This way, any message is received on receipt port XXXXX is going to be sent to the send port with the map and pipeline already configured.
Create an example flat file that has the formatting you want for your output
Create a flat file schema using the flat file schema wizard. Use your example file as the input to the wizard.
create a pipeline. Put the flat file assembler into the pipeline.
Click on the flat file assembler shape and set the document schema to the flat file schema you created. This tells it the format of the output file.
Create a send port and use the pipeline you created.
Send your data to the send port.

error in event viewer

I have two question....
when i drop some Edi file in receive location......if there is some error in file.....we get some error in event viewer(I guesss these are receive pipeline error).....
my first question is
can we se this error in the sql server .................In which database and table we can see event viewer error.
My second question is
can we get this error and write into some file through biztalk.
my first question is
can we se this error in the sql server .................In which database and table we can see event viewer error. --> I guess No.
My second question is
can we get this error and write into some file through biztalk. --> Yes you can do that. following are few ways
1.Use Enterprise Library logging and catch the error in pipeline if you are using custom pipeline and write those errors in flat file
2.if you use SCOM , it will automatically poll all the errors related with BizTalk in event viewer and sends notifications to you.
3.Write a custom service using .net and read the event logs on each bizTalk nodes, later you can either write them in flat file or push them in database tables.
Check out http://msdn.microsoft.com/en-us/library/aa578516.aspx. You could route the message to a file and or SQL table.
If you turn on BAM and EDI reporting there will be a nicer view in the admin console.

Resources