by community-syndication | May 17, 2007 | BizTalk Community Blogs via Syndication
Natasha and the Webstock team have just launched Full Code Press.
On Friday the 6th of July the New Zealand team will be chosen.
On Saturday the 18th of August (Saturday after Tech.Ed) teams from Australia and New Zealand will spend 24 hours (yup no sleep) duking it out creating the best website for a non-profit organisation.
The “match” will be held in Australia
Friday 17/8/07
- New Zealand team arrives in Australia
It is a bit unclear to me as to who is paying for the NZ team to travel but there is more about this in the Logistics and Sponsorship section.
If you think you have got what it takes register for the New Zealand team today!
by community-syndication | May 17, 2007 | BizTalk Community Blogs via Syndication
There is a new release of QuickCounters up at http://codeplex.com/quickcounters.
Great new useability additions to the viewer application by Dave Comfort, as well
as fewer priviliges required against remote servers. See here for
the quick tour…
I’ll be talking about using QuickCounters with BizTalk at tonight’s Minnesota
BizTalk User Group meeting. (Last night, I was presenting on using Scrum
with Team Foundation Server at the Minnesota VSTS User
Group – it’s been a busy week!)
by community-syndication | May 17, 2007 | BizTalk Community Blogs via Syndication
There is a new release of QuickCounters up at http://codeplex.com/quickcounters.
Great new useability additions to the viewer application by Dave Comfort, as well
as fewer priviliges required against remote servers. See here for
the quick tour…
I’ll be talking about using QuickCounters with BizTalk at tonight’s Minnesota
BizTalk User Group meeting. (Last night, I was presenting on using Scrum
with Team Foundation Server at the Minnesota VSTS User
Group – it’s been a busy week!)
by community-syndication | May 17, 2007 | BizTalk Community Blogs via Syndication
In the last post we looked at how SOA Software is used to manage and maintain web services. Today, let’s look at how we can configure web service “policies” to do everything from encryption to load balancing.
So far we’ve seen that a give service managed by SOA Software can have a “policy” attached to […]
by community-syndication | May 17, 2007 | BizTalk Community Blogs via Syndication
During our BizTalk development we come across some really strange error message, which normally doesn’t reflect the real cause. I always wanted to consolidate everything in one place. After seeing couple of errors that’s being raised in the news groups, I thought this is the right time to materialize it. If you have come across any strange errors and willing to share please let me know via my contact page.
========================================================
Exception: ‘System.Xml.XmlDocument’ does not contain a definition for ‘Status’
========================================================
Cause:
System.Diagnostics.Debug.WriteLine(PO_SOURCE.Status.ToString());
Resolution:
status = PO_SOURCE.Status;
System.Diagnostics.Debug.WriteLine(status.ToString());
where “status” is a variable of type System.String.
Credit: Tim
Remark: When you try to do the conversion directly on the context property, the above exception is raised. You can easily fix it by first assigning the context property to a local variable and then doing the conversion.
Date Logged: 17th May 2007 (BizTalk 2006)
========================================================
ERROR: The BAM deployment failed.
A connection cannot be made. Ensure that the server is running.
No connection could be made because the target machine actively refused it
========================================================
Credit: Saravana Kumar
Remark:
If you receive the following error when you try to deploy BAM activities using bm.exe tool
The error information doesn’t reflect on the actual cause. Make sure, “SQL Server Analysis Services” is started.
Date Logged: 26th April 2007 (BizTalk 2006)
Nandri!
Saravana
by community-syndication | May 17, 2007 | BizTalk Community Blogs via Syndication
A few weeks ago my good friend Harry Pierson mentioned me that Pat Helland was back at Microsoft working on the Developer Division. For those of you who haven’t heard about him; Pat has been one of the main contributors to transactional programming technologies…(read more)
by community-syndication | May 17, 2007 | BizTalk Community Blogs via Syndication
When writing WCF implementations, or any code for that matter, testing is an important part of the process. This week, I was building tests for implemented WCF services and had difficulty aligning all the external dependencies of the tests (running hosts, configuration settings, behavior component references, etc). As a result, I set up my WCF services to be self-hosted services, run from the context of the test itself. This has several advantages, and some pitfalls. The advantages:
%u00b7 Isolation, the test has external dependencies only to the actual service implementation.
%u00b7 No manual setup running hosts to ensure they are available, the test ’just works’.
The pitfall might be:
%u00b7 Configuration settings could become out-of-sync. Because the host of the service implementation runs within the context of the test and thereby it’s AppDomain, you need to configure the service ABCs within the test configuration file. This could mean over time you’d get configuration settings for the tests no longer in sync with the actual host.
However, because the scope of the tests is under your control and so is it’s configuration, the described pitfall might not pose an issue.
In order for the test to host it’s own instance of the services to be tested I created a generic container. It’s a simple, but effective, class which can easily host different service types (all tracing and the IDisposable implementation removed for clarity):
/// <summary>
/// Defines a generic implementation of a runnable background host.
/// </summary>
/// <typeparam name=”T”>The service to run within the host.</typeparam>
public class RunnableBackgroundHost<T> : IDisposable where T : class, new()
{
internal AutoResetEvent stopEvent = new AutoResetEvent(false);
/// <summary>
/// Starts the host on a new thread.
/// </summary>
public void Run()
{
ThreadPool.QueueUserWorkItem(
new WaitCallback(delegate(object state)
{
using (ServiceHost host = new ServiceHost(typeof(T)))
{
host.Open();
stopEvent.WaitOne();
host.Close();
}
}));
}
/// <summary>
/// Stops the running host.
/// </summary>
public void Stop()
{
stopEvent.Set();
}
}
Using this class, testing services become quite easy. Set up the host before starting the test:
[System.Diagnostics.CodeAnalysis.SuppressMessage(
“Microsoft.Performance”,
“CA1812:AvoidUninstantiatedInternalClasses”), TestClass]
class HostInit
{
protected static RunnableBackgroundHost<Service1> service1;
protected static RunnableBackgroundHost<Service2> service2;
[AssemblyInitialize]
public static void AssemblyInitalize(TestContext context)
{
service1 = new RunnableBackgroundHost<Service1>();
service2 = new RunnableBackgroundHost<Service2>();
service1.Run();
service2.Run();
}
[AssemblyCleanup]
public static void AssemblyCleanup()
{
service1.Stop();
service2.Stop();
}
}
And set up your test, using a generated proxy (svcutil) and assuming the service is alive:
[TestClass]
public class Service1Tests : IDisposable
{
private Service1Client service1Client;
[TestInitialize]
public void TestInitialize()
{
service1Client = new Service1Client();
}
[TestMethod]
public void TestService1Method1()
{
Service1Request request = new Service1Request();
request.Id = “1”;
Service1Response response = service1Client.Method1(request);
Assert.IsNotNull(response, ErrorMessages.NullResponse);
Assert.AreEqual<int>(
response.Field,
1,
ErrorMessages.NonMatchingId);
}
}
ErrorMessages is a simple resource file containing the messages the test would display in case of failure.
What the test framework does in this case:
%u00b7 Call the static method HostInit.AssemblyInitalize marked with [AssemblyInitialize].
%u00b7 For every class within the test marked with [TestClass]
o Call any instance method marked with [TestInitialize].
o Run any method marked with [TestMethod].
o …
%u00b7 Call the static method HostInit.AssemblyCleanup marked with [AssemblyCleanup].
Within the test configuration file, configure both the service host and the client:
<system.serviceModel>
<client>
<endpoint
address=“http://localhost:8889/Services/Service1“
binding=“basicHttpBinding“
contract=“IService1“ />
</client>
<services>
<service name=“Service1“>
<endpoint
address=“http://localhost:8889/Services/Service1“
binding=“basicHttpBinding“
contract=“IService1“ />
</service>
</services>
</system.serviceModel>
That’s the basic setup. You can now easily test different services by defining the tests for it in it’s own class using it’s own generated client proxy and adding the service to the HostInit class. You could test behaviors by adding them to the configuration file and writing a test for them if they can be tested from the outside.
Just press SHIFT+ALT+X to run the test in the debugger. No console windows popping up, your test just executes :).
by community-syndication | May 16, 2007 | BizTalk Community Blogs via Syndication
I downloaded and installed Roxio Buzz this morning.
Now I was impressed how quickly it allowed me to get a slideshow built and uploaded to the silverlight streaming service.
I opened the ap dragged in 28 photos and 1 wmv file… clicked the share button… chose silverlight streaming added my account and key (you only need to do this once) and then typed in a simple title.
The Transcoding started and 5 minutes from installing the application I had my travel slideshow on the web… Nice!
N.B. It is easy to miss this piece of UI that tells you what is happening after the transcoding step…
Drum roll please…
function CreateSilverlight(){Sys.Silverlight.createHostedObjectEx({source: “streaming:/33/Roxio000001129762f7b6470a2d16000a874c4663b399”,parentElement: Roxio000001129762f7b6470a2d16000a874c4663b399Wrapper});}
var Roxio000001129762f7b6470a2d16000a874c4663b399Wrapper = document.getElementById(“Roxio000001129762f7b6470a2d16000a874c4663b399Wrapper”);
CreateSilverlight();
by community-syndication | May 16, 2007 | BizTalk Community Blogs via Syndication
The main reason for this blog post is due to this newsgroup post
Download Sample from here.
Step #1: Catching SOAP Exception:
Whenever you call a Web service it’s a good practice to handle the SOAP exception specifically rather than just leaving the orchestration to throw an un-handled exception which will result in orchestration service instance and all the referenced message instances being suspended. As shown in the following Orchestration diagram, handling a SOAP exception is straight forward. Place your “Send” shape inside a “Scope” and add an Exception Handler with “Exception Object Type” configured to System.Web.Services.Protocols.SoapException (You need to add reference to “System.Web.Services”). The “Message Assignment” shape inside the catch block got this simple statement
SOAP_EXCEPTION_MESSAGE = soapException.Detail.InnerXml;
Where SOAP_EXCEPTION_MESSAGE is an Orchestration message of type System.String and soapException is the “Exception object name” we assigned for the exception handler. So, with the following setup, whenever there is an exception a message similar to the one shown below will be generated and send across the wire with configured adapter (FILE, SMTP etc).
<string><ns0:NACK Type=”NACK” xmlns:ns0=”http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd”><NAckID>{2DA185D7-40E7-4279-9F6E-ADCEB6EF599B}</NAckID><ErrorCode>0xc0c01f07</ErrorCode><ErrorCategory>0</ErrorCategory><ErrorDescription>SoapException: System.Web.Services.Protocols.SoapException: Purposely raised this exception for testing at CustomerProcessing.Get500InternalSoapException(String yourName) </ErrorDescription></ns0:NACK></string>
Step #2: suspended(resumable) messages:
Even though you handled the SOAP exception using an exception handler in STEP #1, it’s only going to complete the orchestration gracefully but it’s going to leave the original request message you posted to the web services in a suspended(resumable) state. Bear in mind the SOAP exception will be raised inside the orchestration only after the send port has exhausted all the retries. During this period the messaging instance and orchestration service instance will be in the dehydrated state as shown below.
After all the retries, the SOAP exception will be raised inside the orchestration and corresponding SOAP request message will be suspended with resumable state as shown below. This will help the administrator to either resume or terminate the message later.
But at some scenario we don’t wont to leave the suspended (resumable) messages in the messagebox, instead move them to a different location (either to file system location or a remote server via HTTP etc, etc). Before BizTalk 2006 the only way to archive this behavior is by writing some WMI scripts, which is OK but doesn’t really fit with the message flow infrastructure. But with BizTalk 2006 we can take advantage of “Failed Message routing” capability and make this task seamless.
All you have to do is, on your SOAP send port check the check box “Enable routing for failed messages” (as shown in the following figure) and also you can set optionally the “Retry Count” value to “0” if you want to raise the SOAP exception straight away.
Then configure a “Send Port” (or an orchestration, if you want to do more business logic with the suspended messages) with following filter condition
ErrorReport.ErrorType == “FailedMessage”
ErrorReport.OutboundTransportLocation == http://localhost:47653/SOAPExceptionHandler.WebService/CustomerProcessing.asmx
The above filter condition will make sure you are dealing only with SOAP exception raised due to messages posted to that particular web service (CustomerProcessing.asmx). There are quite a bit of promoted properties that comes along with “ErrorReport” you can take advantage of to cater your situation as listed below.
- Description
- ErrorType
- FailureCategory
- FailureCode
- InboundTransportLocation
- MessageType
- OutboundTransportLocation
- ReceivePortName
- RoutingFailureReportID
- SendPortName
Related Reading:
http://blogs.conchango.com/matthall/archive/2005/07/28/1894.aspx
http://objectsharp.com/cs/blogs/matt/archive/2006/11/01/4110.aspx
Nandri!
Saravana
by community-syndication | May 16, 2007 | BizTalk Community Blogs via Syndication
During the conference I had the pleasure and oppty to spend some time with Andrew and
his family. The conference was tooooo short – should have been 4 days.
It’s not often you come across great inspiring people, with a great attitude to ‘lets
see if we can make this better’, and a fantastic personality to match!! (nothing worse
than wall flowers).
We kicked some tyres around Sharepoint and hatched a few ideas of “what would be really
cool if…”.(stay tuned)
Very level headed guy with a great perspective on what’s important and what’s not….I
suspect that may have alot to do with his wife Merideth 🙂 (just
a hunch!)
It’s a pleasure.
Mick.