Jeffrey's Blog

.Net Developer
posts - 19, comments - 8, trackbacks - 0

My Links

News

Archives

Post Categories

Monday, November 17, 2008

WCF Test Harness Guide updated

I've added a new page to the Guide: Adding a New Proxy via Assembly

posted @ Monday, November 17, 2008 10:03 AM | Feedback (0) |

Friday, November 14, 2008

First CodePlex Project: WCF Test Harness

I've just published my first CodePlex project: WCF Test Harness.  This is a testing utility I have been working on for a while now and I thought it could be helpful for others.

I wrote a short Overview and I plan on adding additional information depending on interest.

posted @ Friday, November 14, 2008 3:45 PM | Feedback (0) |

Tuesday, June 24, 2008

BizTalk Msi Export: Customisation

Here are some notes on customising exports created via the BizTalk Administration Export MSI file.

image

Before creating the export, add any externally referenced .Net assemblies by adding them as a resource in the BizTalk Application's Resources folder:

image

This will allow you to include the added resources in your export and will add them to the Global Assembly Cache during installation.

image

This is also a good means of deploying binding files for different environments.

Also, verify the Destination Location of all resources are set to install in the deployment folder.  The following assembly

image

Should be modified so it will install in the installation folder:

image

A tool like Orca (available in vista SDK) can be used to modify the default deployment folder by changing the manufacturer property.  The screen below shows the property to be modified:

image

Just some notes...

posted @ Tuesday, June 24, 2008 3:11 PM | Feedback (2) |

Wednesday, April 16, 2008

BizTalk Map: Comparison between Table Looping and Looping functoids

I had a surprise recently about the behaviour of the Table Looping and Looping functoids that I wasn't expecting and involves when the scripting functoid is evaluated.

For those of you only interested in the comparison...

In the following map, the highlighted scripting functoid will be evaluated once per Client element.

image

In the following map, the highlighted scripting functoid will be evaluated once per element in the Client element.  In other words, for every Client element, the scripting functoid will be evaluated 11 times.

image

In other words, for an message containing 100 clients:

Looping Map:  1100 script evaluations

Table Looping Map: 121,000 script evaluations (100 clients * 11 script functoids * 11 elements)

Details of Comparison

Schemas

Both of the example maps accomplish the same thing, namely going from one schema to another where the content structure does not match.

An example source xml message:

image

An example destination xml message:

image

Note: The destination xml is based on the Sharepoint Lists.asmx UpdateListItems() method

 

Script Functoid

In this example, I am just calling an external assembly that updates a performance counter.  In the real-world scenario, I was calling an external assembly that did a Sharepoint lists lookup to determine the lookup id for a lookup list.  For clarity, the script functoid settings in the Table Looping Map are:

image

Where the IncrementTable in the Table Looping Map and IncrementLoop in the Looping Map method updates a Performance Counter BTSComparison for instance Table and Loop respectively.

Orchestration

The orchestration simply reads in a single xml file and using the maps generates two identical output files.

 

Summary

As there are a ton of resources on the net showing similar maps and orchestrations, I have not gone in to much detail.  If anyone is interested in this example in more detail, let me know and I'll post a better explanation and source.

Obviously I am still getting my head around the mapping functoids as to when best to use which one.  Like elsewhere in BizTalk there are more than one way to accomplish the same task...

posted @ Wednesday, April 16, 2008 1:40 PM | Feedback (0) |

Friday, March 14, 2008

Sharepoint Lists.asmx UpdateListItems: Root Folder

The RootFolder attribute on the Batch element controls the folder of the item. This can be used to access a sub-folder. The structure is Lists/list/folder where folder is optional.

For example, if the list being updated is Contacts and there are two sub-folders Work and Personal. To update an item in the Contacts list:

<Batch OnError="Continue" PreCalc="TRUE" ListVersion="0" RootFolder="/Lists/Contacts">
<Method ID="1" Cmd="Update">
<Field Name="ID">47821</Field>
<Field Name="RefID">479485</Field>
<Field Name="CustomerNumber">59613</Field>
</Batch>

And to update an item in the Work folder:

<Batch OnError="Continue" PreCalc="TRUE" ListVersion="0" RootFolder="/Lists/Contacts/Work">
<Method ID="1" Cmd="Update">
<Field Name="ID">47821</Field>
<Field Name="RefID">479485</Field>
<Field Name="CustomerNumber">59613</Field>
</Batch>

posted @ Friday, March 14, 2008 11:51 AM | Feedback (1) |

Thursday, March 06, 2008

Sharepoint WSS 3.0: Lists.asmx Error Codes

Just some notes relating to error codes received during Sharepoint integration using the UpdateListItems method of the  lists.asmx service.

A value in the update for a column exceeded the maximum column size.

<ErrorCode xmlns="http://schemas.microsoft.com/sharepoint/soap/">Invalid text value

A text field contains invalid data. Please check the value and try again.</ErrorText>

A column to be updated was passed in that did not exist.

<ErrorCode xmlns="http://schemas.microsoft.com/sharepoint/soap/">One or more field types are not installed properly. Go to the list settings page to delete these fields.</ErrorText>
  </Result>

The field being updated was a lookup field that allows multiple values and the value passed in contained a trailing ";".  A trailing semi-colon only seems to be an issue when it is the first item in the list.

<!-- <Field Name="VehicleFeatures">1,#Cassette Radio;</Field> -->
<ErrorCode xmlns="http://schemas.microsoft.com/sharepoint/soap/">Bad parameter passed to Web Server Extensions.  Check the information you entered and try again.</ErrorText>
</Result>

posted @ Thursday, March 06, 2008 2:59 PM | Feedback (1) |

Thursday, February 28, 2008

BizTalk Map: Choice Element

In my schema file, I have a choice element that only contains a single child element.  For example:

image

The above example is actually a crude schema of the where clause of a Sharepoint call to Lists.asmx where in the case I have only 1 item, I want to send a where clause of

<Where>
  <Eq>
    <FieldRef Name="ItemID"/>
    <Value Type="Text">99900</Value>
  </Eq>
</Where>

And in the case that I have multiple items, I want to send something like:

<Where>
  <Or>
    <Eq>
      <FieldRef Name="ItemID" />
      <Value Type="Text">3394</Value>
    </Eq>
...
    <Eq>
      <FieldRef Name="ItemID" />
      <Value Type="Text">9867</Value>
    </Eq>
  </Or>
</Where>

In my map, it is a simple operation of using

  • A Record Count functoid to receive a count of the number of items
  • A Greater Than functoid to compare the result of the count of items against 1
  • A Equal To functoid to compare the result of the count of items against 1

The map is then composed by connecting the items record in the source document to the Record Count functoid, the result of the Greater Than functoid to the Or choice element, and the result of the Equal To functoid to the Eq choice element.

posted @ Thursday, February 28, 2008 10:01 AM | Feedback (0) |

Thursday, February 21, 2008

Where, oh where has my Sharepoint feature gone...

Yes, another newbie to Sharepoint post; but it may help the others out there who are working through labs and exercises and not getting the "expected" results.

If after you have deployed your new feature (e.g., workflow, web part, etc) you do not have it listed as an available content type, it might have been added successfully but not activated. 

To activate a feature go to the Site Settings:

image

Select Site collection features option from the Site Collection Administration section.

image

A list of loaded features is presented with the option of activating and deactivating.

posted @ Thursday, February 21, 2008 1:56 PM | Feedback (0) |

Tuesday, February 19, 2008

BAM Tip: Visual Studio External Tools

Here is a simple way to open a command window from within Visual Studio that is aware of the BizTalk Management Utility (bm.exe).  I have found this useful while working with interceptor configuration files.  This tip will add the Visual Studio Command Prompt to the Tools menu. 

Nothing too dramatic here, just a time saver when defining interceptor configuration files from within Visual Studio without adding shortcuts on my desktop or quick launch bar.

Add Visual Studio Command Prompt to External Tools

Simply select the External Tools option off of the Tools menu.  To keep thing simple, I basically duplicated the Visual Studio Command prompt settings by viewing its properties. 

image

Modify Visual Studio Command Prompt's PATH

Depending on the operating system you are running Visual Studio on, the following will be different.  To determine where to modify, open the file indicated in the command arguments.  For me it was: C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat.

In the file you will see a supplied parameter, e.g., x86, indicates were the settings are located for the specific operating system.  Note that %~dp0 indicates the where the batch file was run from.  For me it was: C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat.

This file just pointed to another file C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat. In this file is where the environment settings are stored.  I modified the file to include the location of bm.exe as part of the PATH environment variable.  The following line was inserted after the current @set PATH line:

@set PATH=C:\Program Files\Microsoft BizTalk Server 2006\Tracking;%PATH%

posted @ Tuesday, February 19, 2008 9:32 PM | Feedback (0) |

Friday, January 25, 2008

Guidance Automation blues...

I've recently had a battle updating Guidance Automation to the most recent release. 

The main issue was I had to remove old Guidance Automation Packages without the original source project.  The only way I found was to an xml file in the C:\Documents and Settings\All Users\Application Data\Microsoft\RecipeFramework folder that contains a list of the installed packages. 

 

posted @ Friday, January 25, 2008 8:57 AM | Feedback (0) |

Powered by: