Nick's Blog

Biztalk gotcha!

Posts Tagged ‘Error

Visual studio 2008, Biztalk 2009, Friends?

with one comment

Lately I’ve been working on a project which involves migrating an existing Biztalk 2002 server to Biztalk 2009. What I want to talk about here is not the migration bit but the Biztalk 2009 development bit.

Visual Studio 2008 just hates biztalk 2009.

Frustration #1:

 Unable to copy file “obj\Debug\schemas.dll” to “bin\Debug\schemas.dll”. The process cannot access the file ‘bin\Debug\schemas.dll’ because it is being used by another process.

Visual Studio gets a lock on the dlls after it builds them. This happens everytime I re-build my schemas project, some times it happens to the custom pipeline components projects too. So I had to restart visual studio again and again just to release that lock from the dll.

Frustration #2 (Visual Studio 2008 and Biztalk 2009 reference issues) :

#error: “The expression that you have entered is not valid.”

Visual Studio 2008 does a good job at confusing the orchestrations and messing with the references. You will find out soon enough that the referenced projects/dlls in your orchestrations break easily. Visual studio 2008 doesn’t require any help for the users to mess up your orchestrations project. If you are lucky, a simple refresh of the referenced project (Change the Copy Local property for the reference and change it back) will make the error go away.

If a refresh of the reference can get rip of the warning signs on the expression shapes but when you build the project, they come back again and the build fails with the same error. Double check the expression and make sure it’s a reference issue and there’s nothing wrong with the statements. Here’s what you can do to fix it.

First, you refresh the references again to make the warning signs go away. Now, drag the shape which triggers the first occurance of the error to somewhere else, doesnt matter where, just move it. Save the orchestration. And drag the same shape back to where it was and save the orchestration again. Now the orchestration should build without raising any errors……unless you just built your schemas project and rebuilding your orchestration project brings back frustration #1…

Written by stormdweller

September 1, 2009 at 11:55 PM

Using a orchestration to subscribe to schemas which have been published as a web service

leave a comment »

I came across this gotcha a few days ago, I wanna document it very badly before I forget.

So you published your schemas as a web service, built a orchestration and a C# program to test your web service. And then BAAAMM, you got the following error.

A message received by adapter “SOAP” on receive location “<YourReceiveLocation>” with URI “<YourWebServiceURI>” is suspended.
Error details: The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted.

You checked your orchestration and the web service and failed to identify the problem. Now it’s the time to blame biztalk, as it gives no help for resolving this issue.

As a general note, you can view your subscriptions from Biztalk Administration Console -> Biztalk Group -> New Query -> Search for subscriptions -> Double click on the orchestration.

Ok, in the expressions tab, there is a method Name row. This method name row has to be the same as the operation name of the webservice you are using. For example, if you are calling an operation in a web service called “calculate”, the orchestration port subscribing to this web service must use the name “calculate” as it’s “Operation” not the default value “Operation_1”. SO next time don’t forget to set your operation name when subscribing to a web service. đŸ™‚

I will post a guide on how to publish a web service and write a C# windows application to test the web service when I have time.

Written by stormdweller

March 31, 2009 at 3:33 AM

Leaving a element field blank in Map

leave a comment »

2 fields on the destination schema are to be left blank and they will be assigned a value in the orchestration at a later stage.

Initially, I didn’t connect/set anything to the fields which should be left blank and deployed the solution and I get the following “inner exception” error.

“Inner exception: A failure occurred while evaluating the distinguished field Header.FILE_COUNTER against the message part data. The message part data does not contain at least one of the nodes specified by the XPath expression (listed below) that corresponds to the distinguished field. The cause for this error may be that the message part data has not been initialized or that the message part data does not conform to the message part schema. Ensure that the message part data is initialized correctly.”

The reason this issue occured is that if you did not connect a value to a field in the destination schema or explicitly set the fields to <empty>, the field will not get initialized and if you try to use that field later, biztalk will throw an inner exception.

To resolve this issue, simply set the ‘Value’ of the element field to <empty>, so that the field will be initialized and it’s value will be set to blank.

Setting the value of a element field to <empty> in a map

Setting the value of a element field to in a map

Written by stormdweller

March 23, 2009 at 10:25 PM

Posted in Biztalk Map

Tagged with ,