Using XPath expression with filters in orchestration

In one of our projects, we hadto do an xpath expression in an orchestration to find a value from a nodes subnode, where another subnode has a specific value.
So our input is like this:

<Root>
	<Delivery>
		<DeliveryType>Home</DeliveryType>
		<BoxInfo>
		<BoxID>22</BoxID>
		</BoxInfo>
	</Delivery>
	<Delivery>
		<DeliveryType>Work</DeliveryType>
		<BoxInfo>
		<BoxID>35</BoxID>
		</BoxInfo>
	</Delivery>
	<Delivery>
		<DeliveryType>Home</DeliveryType>
		<BoxInfo>
		<BoxID>12</BoxID>
		<BoxID>87</BoxID>
		</BoxInfo>
	</Delivery>
	<Boxes>
		<Box>
			<ID>12</ID>
			<Contents>Envelopes</Contents>
		</Box>
		<Box>
			<ID>22</ID>
			<Contents>Surface Pro 2</Contents>
		</Box>
		<Box>
			<ID>35</ID>
			<Contents>Stickers</Contents>
		</Box>
		<Box>
			<ID>87</ID>
			<Contents>Stamps</Contents>
		</Box>
	</Boxes>
</Root>

Now what we wanted to do, is to have the ID’s of the boxes, where the delivery type was Home.
Continue reading

UBL in maps slowing down build

In my current project we are using UBL as our internal format. UBL, or Universal Business Language, is an effort to define a library of standard electronic XML business documents such as purchase orders and invoices. The plusside of using UBL is you have a industry standard, and there are various components and resources to easily integrate it in your solutions. The downside,from a BizTalk perspective is, the schema’s are very large, and have lot of schema references, which again have there own references, which can go up to 8 levels deep.
Continue reading

Service Bus for Windows Server – Posting messages for BizTalk

In my previous post I talked about how we are using Service Bus as our queueing mechanic, from which we read messages using BizTalk. When using Paulo Salvatori’s test client we could read these messages in BizTalk, however when we were publishing messages from our own .NET applications, we weren’t able to receive them in BizTalk. These were the errors we got in the event log:

The adapter “WCF-Custom” raised an error message. Details “System.ServiceModel.CommunicationException: Unrecognized message version.

The adapter “WCF-Custom” raised an error message. Details “System.FormatException: Input string was not in a correct format.

Error
After some research, I found out this is due to the way the messages are being deserialized by the BizTalk WCF adapter. To solve this, when placing the messages on Service Bus, we have to publish them as WCF messages, instead of using the Service Bus SDK.
Continue reading