Wednesday, April 16, 2008

Error: ...The failure may be cuased by the fact that under the default settings SQL Server does not allow remote connections

Situation:
While deploying my BizTalk Project i received the following error



Solution:
- Open the Properties of the project,
- Under Configuration properties, select Deployment
- Check if the server is correct

Friday, April 4, 2008

Replace " (double quotes) from Field Elements with Xslt

Situation:
I receive a CSV file, all string values are surrounded by " (double quotes).
This is normal for a CSV file, to use with Excel. But when I need the values of these fields in my Xml to send to SharePoint, you can understand that I don't want to have those double quotes in the fields.

Problem:
I didn't find in my map a functiod to Replace those double quotes

Solution:
I created a map with a Custom Xlst, and used the function Translate for each field



I added this map to the receive port. Once the Xml file arrives in my Orchestration,the double quotes are gone.

Friday, March 14, 2008

Flat File Disassember Error: Unexpected end of stream while looking for

Situation:
I receive a flat file, going thru a receive pipeline with a Flat File Disassembler Component. And I received the following error:

Error:
There was a failure executing the receive pipeline: "OmnioApplication.Pipelines.ReceiveFlatOmnioFile_IncomingRequest, OmnioApplication, Version=1.2.0.0, Culture=neutral, PublicKeyToken=99f7db139ef9cf70" Source: "Flat file disassembler" Receive Port: "OmnioFlatPort" URI: "D:\TestArea\Omnio\Input\IncomingRequest\*.txt" Reason: Unexpected end of stream while looking for:
Positional data (length is 24)
'\r\n'
The current definition being parsed is RequestRevenue. The stream offset where the error occured is 72. The line number where the error occured is 2. The column where the error occured is 33.

Solution:
While checking the Flat File I saw that the last line was an empty line. This means that after the last record, a carriage return was added.

So I went to the XSD of the flat file in Visual Studio and selected the Root Element
Within the properties I changed Child order to PostFix and it worked.

Friday, March 7, 2008

Documentate BizTalk Applications

This will be a short blog message, to documentate your BizTalk Applications download UK SDC BizTalk 2006 Documenter

UK SDC BizTalk 2006 Documenter
Creates compiled help files for a given BTS 2006 installation. This tool can be run on an ad-hoc basis using the UI or from the command line as a post build/deploy task to create a compiled help file describing a BTS 2006 installation. It will compile: BTS Host configuration, Send/Receive port configuration, Orchestration diagrams, Schema and Map content, Pipeline process flow, Adapter configuration, Rule engine vocabularies and policies, More… and publish them as compiled help files. Optionally you can embed custom HTML content and custom descriptions for all BTS artifacts to produce a more customized look and feel to the CHM output.

Download link: http://code.msdn.microsoft.com/BTS2006Scripts/Release/ProjectReleases.aspx?ReleaseId=237

Wednesday, March 5, 2008

Determine the Version of BizTalk Installed

Situation:
Check the version on Test, Validation and Production Server.

Solution:
Open regedit and got to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\BizTalk Server\3.0\

You will find the information you need and compare with the other systems.

Tuesday, February 12, 2008

Copy Any-Element to a typed structure

Situation:I received a SSDN reply, the schema contained a element.
This element can contain different other xml data, depending on the request.
I need to map the content of the element to a structured format.

Schema of the incoming XML file (with the element):


Schema of the Output-Xml, this schema = the structure within th element


Problem:
BizTalk can’t link elements, the Mass copy didn’t work as there are more fields next to above the any-element at the same level. (See XSD schema)

Solution:
Add a Message Assign shape to your Orchestration
Add the following code


IdentifyPersonResultMsg = xpath(SSDNReplyMsg, "/*[local-name()='SSDNReply']/*[local-name()='ServiceReply']/*[local-name()='IdentifyPersonReply']");



I just use an xpath query to get the content in the element and I place the result I the correct message.
In this case IdentifyPersonResultMsg has the message type as the element

Message constructed on the Construct Shape: IdentifyPersonResultMsg

Wednesday, February 6, 2008

Uploading Documents to a SharePoint Document Library containing different Content Types

Situation:
A document library in SharePoint contains several Content Types. BizTalk will upload documents to the document library in SharePoint.
When uploading via BizTalk the document to SharePoint, I need to say which Content Type the document is linked too.

Problem:
When uploading the document and adding the Metadata needed for the content type of the document, I saw that SharePoint always uses the default content type.
So metadata not used in the default content type is discharged.
How can I tell the WSS adapter which content type to use?

Solution:
The solution is very simple; the name of the content type is also metadata.

In the orchestration, add a Message Assign Shape
Add the following code to the Message Assign Shape:

SharePointOutMsg(WSS.ConfigPropertiesXml) = "<ConfigPropertiesXml><PropertyName1>Content Type</PropertyName1><PropertySource1>My Custom ContentType</PropertySource1> [Add more custom metadata] </ConfigPropertiesXml>";