...and everything in between RSS 2.0
# Tuesday, January 10, 2012

Come learn about the latest CTP pieces on the Windows Azure platform, Windows Azure Application Integration Services.
This month fellow Breezer, Mick Badran will be presenting to the Sydney Azure User Group.

Click here for more details

Tuesday, January 10, 2012 9:11:09 PM (AUS Eastern Daylight Time, UTC+11:00)  #    - Trackback
BizTalk General | Cloud Services | Windows Azure
# Friday, December 09, 2011

BizTalk Server 2010 was released just over a year ago now and has been the products most stable release to date (IMO). Yesterday Microsoft announced details of their next release, BizTalk Server 2010 R2.

From the product team blog:

BizTalk Server 2010 R2 will focus on three primary themes:

  • Platform Support – Supporting new and current server and development platforms
  • Improved B2B – Aligning with industry standards and continuing to invest in performance improvements
  • Ready for the Cloud – Enabling customers to take advantage of the benefits of cloud computing

BizTalk Server 2010 R2 will be delivered approximately 6 months following the release of Windows Server 8. Release timing for Windows Server 8 is yet to be announced and will be disclosed by the Windows Server team in the future

 

Platform Support

Improved B2B

Ready for the Cloud

New Platforms and Infrastructure

  • Windows Server 8*
  • SQL Server 2012*

Increased Developer and IT Productivity

  • Visual Studio 11* and Windows 8* to develop solutions
  • In-place migration from BizTalk Server 2010

Extended Platform Integration

  • DB2 client connectivity to SQL Server,
    conversion of commands to T-SQL,
    migration of packages to stored procedures
  • Adapter connectivity to new data sources, including IBM Informix V11 and IBM IMS/DB V11

Agile Alignment to Industry Standards

  • Regular updates to schemas, accelerators certifications and adapters. Highlights include:
  • Healthcare: HIPPA 5010 extensions: 2777CA, 999, HL7 2.5.1
  • Finance: SWIFT SRG 2011 support, SWIFT SRG 2012, SWIFTNet 7.0 (new messaging platform)

Improved Performance and Scalability

  • HL7 MLLP adapter performance improvements
  • Better performance with ordered send ports
  • Enhanced scale out configuration with multiple hosts
  • Expanded adapter options for faster batch processing

Extend on-premises solutions to the cloud

  • Easily extend your on-premises BizTalk Server solution to the cloud in a secure manner
  • Tighter integration of on-premises BizTalk Server applications with Windows Azure Service Bus

Improved Licensing

  • Adjustments to licensing that are geared towards cloud hosting, including:
  • Purchase from a hoster on a monthly basis (SPLA)
  • Register your existing license with a hoster (License Mobility)
Friday, December 09, 2011 10:41:40 AM (AUS Eastern Daylight Time, UTC+11:00)  #    - Trackback
BizTalk General
# Thursday, December 08, 2011

A colleague of mine here at Breeze (Eka) forwarded on the details of what is in the recent BizTalk Server 2010 CU3.

BizTalk Server EDI support

VSTS bug number

KB article number

Description

674429

2566805

FIX: A hotfix is available that enables the support for 999 functional acknowledgements and for 277CA for HIPAA 5010 Errata in BizTalk Server 2010

 

BizTalk Server Message Runtime and Pipelines

VSTS bug number

KB article number

Description

803417

2624266

FIX: Event ID 5753 when the PassThruReceive pipeline processes XML documents after you apply a tracking profile in BizTalk Server 2010

811525

2625919

FIX: Displayed BAM-portal results might not contain the latest records in BizTalk Server 2010

 

BizTalk Server BAM Tracking

VSTS bug number

KB article number

Description

790926

2610824

FIX: "Conversion failed" error when the UNION ALL clause runs against a BAMPrimaryImport view in BizTalk Server 2010

814467

2627804

FIX: A hotfix that improves the performance of the tracking feature in BizTalk Server 2010 is available

 

BizTalk Server Adapters

VSTS bug number

KB article number

Description

772932

2592430

FIX: PeopleSoft connection might time out in BizTalk Server 2010 if you use BizTalk Adapter for PeopleSoft Enterprise

 

Of course, also check out the contents of previous (and other BizTalk Server version updates) as well > http://support.microsoft.com/kb/2555976

Thursday, December 08, 2011 1:05:10 PM (AUS Eastern Daylight Time, UTC+11:00)  #    - Trackback
BizTalk General
# Friday, September 09, 2011

A recent project of ours has made the news this week > Centrebet deploys app integration platform.

This was a great project to be involved in, consisting of a great mix of technology:

  • Microsoft BizTalk Server
  • Windows Server AppFabric
  • Windows Azure AppFabric Service Bus
  • Windows Azure Hosted Services
  • F# asynchronous programming

Case_Study_Overview

A real software engineering project that had to meet high throughput and low latency requirements, incorporate new technologies and come in on very (very) tight time frames. Credit to go out to the team at Breeze for getting this over the line.

Friday, September 09, 2011 8:59:08 AM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
BizTalk General | Breeze | Cloud Services | F# | WCF | Windows Azure | Windows Server AppFabric
# Tuesday, November 30, 2010
HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.

"If I had a dollar for every time I’ve seen this…”

And yet the solution appears to be different each time. Or at least to me when it comes to issues with integrated Windows Authentication and Kerberos. Today the solution lay in forcing IIS to use NTLM authentication as suggested by the following KB article

http://support.microsoft.com/kb/871179

To work around this behaviour if you have multiple application pools that run under different domain user accounts, you must force IIS to use NTLM as your authentication mechanism if you want to use Integrated Windows authentication only. To do this, follow these steps on the server that is running IIS:

  1. Start a command prompt.
  2. Locate and then change to the directory that contains the Adsutil.vbs file. By default, this directory is C:\Inetpub\Adminscripts.
  3. Type the following command, and then press ENTER:

    cscript adsutil.vbs set w3svc/NTAuthenticationProviders "NTLM"

  4. To verify that the NtAuthenticationProviders metabase property is set to NTLM, type the following command, and then press ENTER:

    cscript adsutil.vbs get w3svc/NTAuthenticationProviders


    The following text should be returned:

    NTAuthenticationProviders       : (STRING) "NTLM"
Tuesday, November 30, 2010 8:49:29 PM (AUS Eastern Daylight Time, UTC+11:00)  #    - Trackback
BizTalk General
# Monday, October 18, 2010

On a recent project I needed to resolve the identity of clients calling an orchestration exposed as a WCF service. Clients would use a X.509 certificate to sign the message. Configuring the WCF service was easy enough but I was not getting the party resolution piece working correctly. The WCF adapter (I was using WCF-CustomIsolated) was not populating the context property (BTS.SignatureCertificate) that the party resolution component uses to lookup the party even though the client certificate was being validated. The WCF adapter was dumping the soap headers into the context. I was left either to parse the headers manually and find a way to grab details of the signing certificate or somehow get the WCF adapter to do this work for me (as it was already validating the client certificate and checking we had the corresponding public key in the certificate store). Fortunately, I found a way we can get the adapter to help out.

The solution was to create a WCF service behavior extension to intercept message processing by the adapter (note this takes place before the message is presented to the receive pipeline). The custom behavior looks for a client certificate and if found writes the thumbprint into a custom soap header. The WCF Adapter would then write my custom header into the message context and I could grab it in a custom pipeline component. I chose to write a component to execute before the OOTB party resolution component and populate the BTS.SignatureCertificate context property with the value of certificate thumbprint. I could of done this all in one component and performed custom party resolution but thought this might be a bit cleaner.

So looking at the WCF service behavior

   1:  using System;
   2:  using System.ServiceModel;
   3:  using System.ServiceModel.Dispatcher;
   4:  using System.ServiceModel.Channels;
   5:  using System.ServiceModel.Description;
   6:  using System.IdentityModel.Claims;
   7:  using System.ServiceModel.Configuration;
   8:   
   9:  namespace Breeze.WCF.ClientCertificateContext
  10:  {
  11:      public class MessageInspector : IDispatchMessageInspector, IServiceBehavior
  12:      {
  13:          #region IDispatchMessageInspector Members
  14:   
  15:          object IDispatchMessageInspector.AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext)
  16:          {
  17:              object correlationState = null;
  18:              string thumbprint = "";
  19:   
  20:              try
  21:              {
  22:                  // Gather thumbprint of signing certificate used by the client
  23:                  foreach (ClaimSet set in request.Properties.Security.ServiceSecurityContext.AuthorizationContext.ClaimSets)
  24:                  {
  25:                      foreach (Claim claim in set.FindClaims(ClaimTypes.Thumbprint, Rights.Identity))
  26:                      {
  27:                          thumbprint = BitConverter.ToString((byte[])claim.Resource);
  28:                          thumbprint = thumbprint.Replace("-", "");
  29:                      }
  30:                  }
  31:   
  32:                  // Write this away as a custom message header
  33:                  if (!String.IsNullOrEmpty(thumbprint))
  34:                  {
  35:                      MessageHeader header = MessageHeader.CreateHeader("ClientCertificate", "http://schemas.breeze.net/BizTalk/WCF-properties", thumbprint);
  36:                      request.Headers.Add(header);
  37:                  }
  38:   
  39:              }
  40:              catch (Exception ex)
  41:              {
  42:                  System.Diagnostics.EventLog.WriteEntry("WCF MessageInspector", String.Format("Exception caught: {0}", ex.ToString()));
  43:              }
  44:   
  45:              return correlationState;
  46:          }
  47:   
  48:          void IDispatchMessageInspector.BeforeSendReply(ref Message reply, object correlationState)
  49:          {
  50:          }
  51:   
  52:          #endregion
  53:   
  54:          #region IServiceBehavior Members
  55:   
  56:          public void AddBindingParameters(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, 
                                                System.Collections.ObjectModel.Collection<ServiceEndpoint> endpoints, BindingParameterCollection bindingParameters)
  57:          {
  58:              return;
  59:          }
  60:   
  61:          public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
  62:          {
  63:              foreach (ChannelDispatcher channelDispatcher in serviceHostBase.ChannelDispatchers)
  64:              {
  65:                  foreach (EndpointDispatcher endpointDispatcher in channelDispatcher.Endpoints)
  66:                  {
  67:                      endpointDispatcher.DispatchRuntime.MessageInspectors.Add(this);
  68:                  }
  69:              }
  70:          }
  71:   
  72:          public void Validate(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
  73:          {
  74:              return;
  75:          }
  76:   
  77:          #endregion
  78:      }
  79:   
  80:      public class MessageInspectorElement : BehaviorExtensionElement
  81:      {
  82:          public override Type BehaviorType
  83:          {
  84:              get { return typeof(MessageInspector); }
  85:          }
  86:   
  87:          protected override object CreateBehavior()
  88:          {
  89:              return new MessageInspector();
  90:          }
  91:      }
  92:   
  93:   
  94:  }

 

Tip: Don't forget to implement the BehaviorExtensionElement. You’ll need this to apply the service behavior via configuration (in the receive location) rather then having to do it programmatically. You will also need to sign, GAC and register the service behavior extension element in the machine.config (or service’s web.config in IIS)

With the WCF service behavior bits done, we need to add it to our receive location:

image

If you were to test the solution now, you’ll get the thumbprint of the client certificate written to your custom context property (http://schemas.breeze.net/BizTalk/WCF-properties#ClientCertificate) and will look something like this:

   1:  <ClientCertificate xmlns="http://schemas.breeze.net/BizTalk/WCF-properties">11C3E164C41ADC8DBA0EA6558784B9FAE19E398D</ClientCertificate>

 

I had thought I might be able to get away with writing this directly into the BTS.SignatureCertificate context property but the format is clearly different. The BTS.SignatureCertificate property needs just the certificate thumbprint string and obviously we have the xml wrapper. So we must create a simple pipeline component to sit somewhere before the party resolution component to grab the certificate thumbprint out of our custom context property and write it into the context property the party resolver component is looking for.

image

After deploying and setting the receive pipeline to use the custom one above, I got party resolution working like a bought one with the BTS.SigningCertificate, BTS.SourcePartyID and MessageTracking.PartyName context properties populated.

I guess I was a little surprised that all this was needed. WCF does a great job of abstracting out all the transport and security bits and moving them to configuration time (no additional code in our service or client). In the HTTP and SOAP adapter days, the MIME/SMIME pipeline component was used to decrypt and validate the signing certificate as well as populating the required context properties. Why doesn’t the WCF Adapter perform this part in the same way? I mean, its doing the decoding, decrypting and certificate validation. So why not the populating of these context properties? Perhaps there is secret squirrel checkbox somewhere I missed. Love to hear comments if anyone has done this differently?

[Updated: 19-10-2010]

Thanks to Thiago (see comments section) we have been able to simplify this further. The WCF adapter provides some “special” namespaces that allow us to instruct the adapter to write context properties in a more controlled way. Specifically we can instruct the adapter to write directly into defined property schema elements (e.g. OOTB BizTalk property schemas or deployed custom property schemas). This allows us to write the certificate thumbprint directly into the BTS.SigningCertificate context property and avoid the need for the custom pipeline component to move the value from the custom header property into the BTS.SigningCertificate property as described above.

To do this we simply change the IDispatchMessageInspector.AfterReceiveRequest to make use of these special namespaces.

                // Write this away as a custom message header
                if (!String.IsNullOrEmpty(thumbprint))
                {
                    // Write the thumbprint directly to the BTS.SigningCertificate context property
                    //  Thanks to Thiago http://connectedthoughts.wordpress.com
 
                    // Create a collection of context properties we want the adapter to write/promote for us                    
                    XmlQualifiedName clientCertificateProp = 
                        new XmlQualifiedName("SignatureCertificate", "http://schemas.microsoft.com/BizTalk/2003/system-properties"); //Maps to BTS.SignatureCertificate
                    List<KeyValuePair<XmlQualifiedName, object>> promoteProps = new List<KeyValuePair<XmlQualifiedName, object>>();
                    promoteProps.Add(new KeyValuePair<XmlQualifiedName, object>(clientCertificateProp, thumbprint));
 
                    // Add the property collection to the request
                    //  Use the http://..../Promote to have the adapter promote the context prop
                    //  or use  http:/...../WriteToContext to just have the property written but not promoted.
                    request.Properties.Add("http://schemas.microsoft.com/BizTalk/2006/01/Adapters/WCF-properties/Promote", promoteProps); 
                }

 

Now we can do away with the custom pipeline component bits and use the OOTB XMLReceive pipeline (as it contains the party resolver component already). The certificate thumbprint will be written directly into the BTS.SigningCertificate context property (and promoted) ready for the party resolver component to use.

Nice work Thiago. thumbs_up

Monday, October 18, 2010 11:50:22 AM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
BizTalk General | WCF
# Friday, July 09, 2010

I have been avoiding this for sometime now. That is, adding new activity items to the current BAM deployment in production. Production has been running for months now and in this high volume system we partition the BAM activities every week and archive each month (giving the client a rolling month worth of activity data). I was concerned that during the update of the BAM definition this data was going to be blown away (an experience that has caused much embarrassment in the past).

So the procedure I used this time did the trick…well almost

  • Took a “backup” of the current BAM definition using BM.exe

    bm.exe get-config -FileName:MyConfig.xml

  • Added the new activity items using Excel and edited the views
  • Exported the new BAM definition to xml
  • Removed the existing views using BM.exe

    bm.exe remove-view -Name:MyView

  • Deployed the new definition using BM.exe and the update-all command – FAILED smile_cry

    bm.exe update-all -DefinitionFile:MyNewDef.xml
     
    The error message in the command window was:
    All queries combined using a UNION, INTERSECT or EXCEPT operator must have an 
    equal number of expressions in their target lists.
     
    Upon investigation, I found that the partition tables did not get updated with the new activity items. As the view spans both the current activity tables and all the partition tables the view creation failed. Interestingly, the BAM Archive tables did get updated.

  • “Upgraded” the partition tables using the script from this blog post

    I did need to make a slight change to avoid some errors that cropped up with partition tables already archived and as such no longer present in the BAMPrimaryImport database (although the original script works).

    I changed the CURSOR definition to filter out those tables already archived:

    DECLARE partition_cursor CURSOR LOCAL FOR
    SELECT InstancesTable
    FROM [dbo].[bam_Metadata_Partitions]
    WHERE ActivityName = @activityName
    AND ArchivedTime Is Null -- Added additional filter
    ORDER BY CreationTime ASC
  • Deployed the new definition again using BM.exe and the update-all command – SUCCEEDED
  • Re-applied security to the Views using BM.exe

    bm.exe add-account -AccountName:TheStig -View:MyView

Unfortunately all my BAM Alerts got blown away smile_baringteeth . Makes sense as the alerts reference the view that was removed. Luckily taking the backup in step one allowed me to pull out the original alert definition and paste them into my new definition file. I re-deployed that using the update-all command and alerts are back to normal.

I did come across this KB 969558 article for BTS 2006 R2 that appeared to address the partition tables issue. It looks as though this did not make it into BTS 2009.

Friday, July 09, 2010 3:12:01 PM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
BizTalk General
# Thursday, July 01, 2010

I am getting a few reports that after a recent windows update (or installing .NET Framework 4.0) the ESSO service fails to restart. Microsoft have released a hotfix to address this (http://support.microsoft.com/kb/2252691)

Microsoft Reports:

This issue occurs after installing .NET Framework 4.0. The registration of the assembly used by ENTSSO to access SQL Server does not specify the correct version of the .NET Framework. When .NET Framework 4.0 is installed, the assembly will try to use the newer framework and then fail to load

To resolve this manually:

32-bit Server

1.       Open a command window
2.       Go to C:\Windows\Microsoft.NET\Framework\v2.0.50727
3.       Type: regasm “C:\Program Files\Common Files\Enterprise Single Sign-On\ssosql.dll”

64-bit Server

1.       Open a command window
2.       Go to C:\Windows\Microsoft.NET\Framework64\v2.0.50727
3.       Type each of the following and hit ENTER:

32bit:  regasm “C:\Program Files\Common Files\Enterprise Single Sign-On\win32\ssosql.dll”
64bit:  regasm “C:\Program Files\Common Files\Enterprise Single Sign-On\ssosql.dll”

Note
On a 64-bit server, regasm will need to be run for both the 32-bit and 64-bit versions of ssosql.dll.

Hope this helps smile_wink

Thursday, July 01, 2010 3:05:59 PM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
.NET Framework | BizTalk General
# Thursday, April 02, 2009

In a (not so recent) post, I walked through the steps to get your BizTalk Server 2006 R2+ Orchestrations exposed to the Cloud. See Exposing BizTalk Orchestrations to the Cloud. With the release of the Microsoft .NET Services SDK (March 2009 CTP) this week, you will find your existing .NET Services endpoints no longer valid.

Here's how to resolve the issue.

At the moment your existing .NET Services endpoints are in the form:

sb://servicebus.windows.net/services/[solution name]/[service name]/

This has now been changed to:

sb://[solution name].servicebus.windows.net/[service name]/

Note: you can still register your service hierarchy as before (e.g. sb://.../[service group]/[service name]) but for simplicity I have just used [service name] in the URI's above.

So, even if you followed Microsoft's advise and coded your service endpoints URI's this way:

Uri address = new Uri(String.Format("sb://{0}/services/{1}/{2}", ServiceBusEnvironment.DefaultRelayHostName, solutionName, serviceName));

that didn't get you out of trouble when the URI change was released. We are now encouraged to use the following when generating endpoint addresses in code:

Uri address = ServiceBusEnvironment.CreateServiceUri("sb", solutionName, serviceName);

This will give us an address in the new structure and protect us from any future changes (but we heard that somewhere before didn't we). Also, be aware that (as of time of posting) the published services feed is not listing your services correctly (but they are still accessible). Your new published services feed will also be:

http://[solution name].servicebus.windows.net/

In the coming days, the team at Breeze will be walking through the new goodies the March CTP brings so look out for future posts (of particular interest is the queuing and routing features we have now!).

Thursday, April 02, 2009 12:24:56 PM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
BizTalk General | Cloud Services
# Friday, November 28, 2008

This week I gave a presentation to the Sydney BizTalk User Group on (Biz)Talking to the Cloud. I showed how we can quickly and easily configure a BizTalk Receive Port to consume services hosted in the cloud. In the demo, we configured BizTalk to participate in a multicast events scenario.

I have been playing further with BizTalk and Cloud services and in this post I will demonstrate how to expose BizTalk Orchestrations to the Cloud. To make it easy for you to build this on your own environment, I have used the now famous (or infamous) EchoService as the basis of this demo. This allows you to use the existing Microsoft .NET Services SDK sample to call the BizTalk Orchestration through the cloud.

Before You Begin

  1. Sign-up to Microsoft .NET Services and create your Solution.
  2. Download the Microsoft .NET Services SDK and install on your BizTalk Server 2006 R2 development environment.
    Note: Nothing more is needed as far as BTS is concerned. I am pleased Microsoft is making good on ensuring developers can use existing skills and technologies to get started with cloud services. Furthermore, we can be fairly comfortable that playing around with this stuff is not going to break or render our existing dev environment useless. Credit where credit is due.

BizTalk Development

In this step we will create a simple orchestration that receives a generic message, pulls the "echo" text out, creates the response message, and sends it back out the two-way port. I have used System.Xml.XmlDocument types avoiding the need to create schemas and simplifying the demo.

  1. In Visual Studio 2005, create a new Empty BizTalk project.
  2. Go ahead and set your Assembly Key File and BizTalk Application project settings. (I called my BizTalk App BizTalk Services as we will see later on)
  3. Add a new Orchestration to the project.
  4. Create the following messages:
  5. Name Type
    msgRequest System.Xml.XmlDocument
    msgResponse System.Xml.XmlDocument

  6. Create the following variables:
  7. Name Type
    strText string
    strResponse string
    xmlDoc System.Xml.XmlDocument

  8. Add the following shapes to the design surface

    orchestration shapes
  9. In the Message Assignment shape enter the following code to construct the response message:
  10. // Retrieve the text sent in the request
    strText = xpath(msgRequest, "string(//*[local-name()='text'])");
    
    // Construct the response
    strResponse = System.String.Format("<EchoResponse xmlns=\"http://samples.microsoft.com/ServiceModel/Relay/\">
    <EchoResult>{0}</EchoResult></EchoResponse>"
    , "BizTalk: " + strText); // Create the response document xmlDoc.LoadXml(strResponse); // Assign the response message variable msgResponse = xmlDoc;





     
  11. Now add a Two-Way port setting the port Binding to Specify Later and the Type Modifier to Public.
    Note: As we will be binding to a physical receive port, operation names are not important here.
  12. Wire up the port operations and don't forget to set the Activate property of the Receive shape smile_wink
  13. Build and deploy your project.

BizTalk Application Configuration

In this step we will configure a WCF-Custom receive port to expose our newly created orchestration to the cloud.

  1. In BizTalk Server Administration Console, navigate to the BizTalk Application you just deployed to (mine was called BizTalk Services).
  2. Create a new Request-Response receive port.
  3. Add a new receive location and set the Transport type to WCF-Custom.

    new recv loc
  4. Configure the WCF-Custom adapter.
  5. Set the EndPoint Address to:

            sb://servicebus.windows.net/services/[your solution name]/EchoService/
  6. Set the Binding Type to NetTcpRelayBinding
    Note: This is one of the new bindings added when you installed the Microsoft .NET Services SDK

    nettcprelaybinding
  7. On the Behaviors tab, add a new behavior extension called transportClientEndpointBehavior to the EndPointBehavior node.
  8. Set the credentialType to UserNamePassword and enter your solution credentials on the UserNamePassword element of the ClientCredentials node.
    Note: If you are using Windows CardSpace instead, set the transportClientEndpointBehavior to use it here instead.

    transport client behavior
  9. Click Apply and verify no errors occurred with your WCF-Custom adapter configuration.
  10. Click OK to close the Adapter configuration dialog.
  11. Set the Receive Handler to your BizTalk Server Application host.
  12. Leave the Receive and Send piplines as PassThru (as we are not requiring xml parsing of the messages we are sending and receiving).
  13. Click OK to save the new receive location.
  14. Do likewise for the receive port.
  15. Now, configure your orchestration bindings and start the BizTalk application.

Verify the Service is Exposed to the Cloud

In this step we will browse to your Microsoft .NET Services service registry feed and verify your service is exposed to the cloud.

  1. Launch Internet Explorer and browse to the following URL:

         http://servicebus.windows.net/services/[your solution name]/
  2. You should now see your service endpoint listed in the Atom feed.

Test Your Solution

  1. In Windows Explorer, navigate to the samples folder under the install folder for Microsoft .NET Services SDK
    Note: If you installed to the default folder it should be C:\Program Files\Microsoft .NET Services (Nov 2008 CTP) SDK\Samples
  2. Locate the ServiceBus\GettingStarted\Echo sample and open your flavour of choice (C#/VB)
  3. Build the Solution using VS 2008
  4. Run the Client.exe
  5. Enter your Solution name and password.
  6. Enter some text to send to your service.
  7. Verify the service response includes BizTalk: <your echo text>

    testing

What did we just do?

Using only the new WCF features that were installed in the Microsoft .NET Services SDK we were able to configure a request-response receive port in BizTalk that exposed our orchestration to the cloud. This is very cool smile_shades.

At the very least, we could do away with the orchestration binding and just configure the receive port to drop messages into the BizTalk MsgBox. We then use content based routing to route the messages off to our existing orchestrations.

Think of the times you wanted to expose your BizTalk services to customers and clients outside your organisation, but had to jump all those hurdles the IT infrastructure team seams to magically come up with.

This is just the beginning...

Friday, November 28, 2008 10:35:49 PM (AUS Eastern Daylight Time, UTC+11:00)  #    - Trackback
BizTalk General | Cloud Services | Windows Azure
# Wednesday, November 12, 2008

Putting together BizTalk integration solutions can be complex and tricky at times. Debugging them is an art in itself. While onsite recently, I found myself (on more than one occasion) having *words* with BizTalk.

One example that tested our relationship (BizTalk and I) was an orchestration decision shape that appeared to be misbehaving. I had three branches in the decision shape, each branch testing the existence of a node in the message being processed using the xpath() function. For Example:

xpath(msgRequest, "string(count(/*[local-name()='root']/*[local-name()='parent']/*[local-name()='child' and code='some value']))") == "0"

Tip: use Dan Sharp's Xml Viewer to retrieve the correct xpath to use in these statements. BizTalk schemas will give you them to, but Dan's tool has some nice features thrown into the bargain smile_wink

One branch rule tested for a zero node count, another for exactly one, and the Else rule branch to handle multiple occurrences of the node. During testing and debugging we found the else branch was always being used despite the messages satisfying one of the other rule conditions (over different tests). Repeated checks, breakpoints, and logging soaked up 20 minutes or more and had me demanding satisfaction by challenging BizTalk to a duel with pistols at dawn. smile_angry

It was then, a bright beam of light breached the false ceiling above me and shone down in all is splendour. No, this was not a helping hand from god, but rather from a colleague working with me. Picking up on my frustrations, he calmly stood, moved over to me, and placing a soothing hand on my shoulder, utters two words that have changed my life...Kane Theory. I eagerly implemented a quick change (as guided by Kane Theory teachings) and my problem was solved! More cases arose during the project and each of them resolved with ease using this mystic and elegant theory.

Ok. That's a bit dramatic, but I am considering a professional self-help book exploring the practical uses of Kane Theory and wanted to get some practice in.

So what is Kane Theory?

Although only a novice in its teachings, I am fortunate to receive guidance from the enlighten one himself. Kane Adams (his real name used here to protect reveal his identity)  explains it in terms of Yin & Yang, Karma, and the Force. Reflecting on this I can best describe it as a derivative of keep it simple stupid (KISS).

In the example above, we declared an orchestration variable (System.String) to store the result of the xpath function in an Expression shape before entering the Decision shape. We then used the variable in the rule expression for the comparison. Eg:

strNodeCount == "0"

By powers understood only to the enlighten one, this worked a treat and we could all break for a quick cup of the worst coffee ever brewed. (Sceptics might argue that it has to do with the way the XLANG engine performs explicit type conversions during the comparison operation...but they would say that wouldn't they!)

As for the enlighten one himself:

Some say he is a direct descent of John Adams, author of the mystical theory of political architecture and founding father of the new Empire (there's the link to the Force we needed).
Some say, he meditates to the haunting chants of mid-level public servants.
We know him as The Stig!

Author of the enlighted

Wednesday, November 12, 2008 11:47:01 AM (AUS Eastern Daylight Time, UTC+11:00)  #    - Trackback
BizTalk General | Humour
# Monday, September 22, 2008

Had a strange error appear last week when using the WCF LOB Adapter for Oracle and spent an hour of my life I will never get back. When attempting to connect to an Oracle DB we kept getting the following error:

ORA-12154: TNS:could not resolve the connect identifier specified

This occurred when we:

  1. Tried to generate metadata in our BizTalk project using the Add Generated Items wizard.
  2. Tried to generate metadata in a Class Library project using the Add Adapter Service Reference wizard.
  3. Connect to an Oracle DB using the Oracle Explorer.

We had all the latest versions/patches of the Oracle client and WCF LOB Adapter (Oh, yeah. Thanks Oracle for packaging patches in easy to consume 1GB downloads...love your work!!)

We could however, connect to Oracle using the Oracle SQL Developer Tool. So we knew something was happening (or not happening inside of VS).

It turns out the issue relates to the install directory of VS2005. In our case it was

C:\Program Files (x86)\...

This triggers an *undocumented feature* in the Oracle Data Provider for .Net (ODP.NET) so that applications with a parenthesis in their (exe) path fail to connect to the server.

The solution was to uninstall VS2005 and reinstall using a different install directory *one that did not have (x86) in it*.

smile_confused ... I know, I did not want to believe it either, but if you want to save yourself time and hair try this solution first.

Monday, September 22, 2008 11:31:09 PM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
BizTalk General | WCF LOB Adapters
# Friday, June 06, 2008

Recently I implemented a BizTalk web services interface that required the need to support SoapFault messages. I quickly fell into a common trap and received a compiler error:

error X2162: must receive before sending a fault message on an implemented port

(see Scott Colestock's post that nicely outlines his experience with the same issue)

As Scott describes, the solution involved using the succeeded() function to first test if a transaction scope had succeeded or not in order to send out my soap-fault correctly. I vaguely recalled this function but never used it in anger before. After having spent a hour or so I will never get back, I made a note-to-self to seek out and reacquaint myself with the other operators and functions available to use in expression shapes within an orchestration.

Here is the full list taken from the online documentation:

Operator

Description

Example

checked()

raise error on arithmetic overflow

checked(x = y * 1000)

unchecked()

ignore arithmetic overflow

unchecked(x = y * 1000)

new

create an instance of a class

myObject = new MyClass;

typeof

Type retrieval

myMapType = typeof(myMap)

succeeded()

test for successful completion of transactional scope or orchestration

succeeded(<transaction ID for child transaction of current scope or service>)

exists

test for the existence of a message context property

BTS.RetryCount exists Message_In

+

unary plus

+(int x)

-

unary minus

-(int x)

!

logical negation

!myBool

~

bitwise complement

x = ~y

()

cast

(bool) myInt

*

times

Weight = MyMsg.numOrders * 20

/

divided by

x / y

+

plus

x + y

-

minus

x - y

<<

shift left

x << 2

>>

shift right

x >> 2

<

less than

If (MyMsg.numOrders < 10)...

>

greater than

If (MyMsg.numOrders > 10)...

<=

less than or equal to

If (MyMsg.numOrders <= 10)...

>=

greater than or equal to

If (MyMsg.numOrders >= 10)...

==

equal to

If (MyMsg.numOrders == 10)...

!=

not equal to

If (MyMsg.numOrders != 10)...

&

and

If (myByte & 255)...

^

exclusive or

If (myByte ^ 1)...

|

or

If (myByte | 1)...

&&

conditional and

If (MyMsg.numOrders > 10) && (MyMsg.numOrders < 100)

||

conditional or

If (MyMsg.numOrders < 10) || (MyMsg.numOrders > 100)

//

commenting

//This is the comment

Since then, this little exercise has helped in a few occasions, particularly the need for the exists function when working with optional property schema fields.

I knew I should of read the manufacturers instructions smile_wink

Friday, June 06, 2008 12:42:47 AM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
BizTalk General
# Tuesday, May 27, 2008

Today I was working on a BizTalk solution to intercept, transform, and relay emails sent from a LOB system. BizTalk polled a POP3 mailbox and my orchestration replaced the original plain/text email body with some fancy, template driven HTML content and sent it out a dynamic SMTP send port. Only the email body was to be modified, the rest of the email message was to replicate the original email message, including any attachments (that may or may not be present).

To aid in testing I wrote a simple .Net email client. (I got tired of composing a new email in Outlook every time I wanted to test the solution)

Breeze Simple Email Client

The solution worked well (and perhaps I may post about the details sometime later) accept for the fact the outbound message had lost the attachment filenames.

inbound showing attachment

outbound showing attachment

Note: The attachment on the outbound message has a filename of ATT00241.DAT smile_confused

A helper class in my orchestration inspected the inbound message for attachments and added them to the new outbound message. Each message part (attachment) was assigned the MIME message part context properties of the same inbound message part. What I found was the MIME.FileName property was not being populated by the MIME decoder.

The MIME decoder in the POP3 adapter (when configured to apply MIME decoding) populates the following message part context properties when a MIME encoded message is received:

MIME/SMIME Property Schema and Properties

I checked the message source of the email I was sending (via my DIY email client) to check the MIME headers were present.

incorrect message source

Appears OK right?...

content-type: application/octet-stream; name=SampleAttachment.zip
content-transfer-encoding: base64

Wrong smile_embaressed

It turns out the MIME decoder is looking for the content-disposition header values

content-type: application/octet-stream; name=SampleAttachment.zip
content-transfer-encoding: base64
content-disposition: attachment; filename=SampleAttachment.zip

So some quick changes to the Breeze Simple Email Client ...

attach.ContentDisposition.DispositionType = System.Net.Mime.DispositionTypeNames.Attachment
attach.ContentDisposition.FileName = Path.GetFileName(attachmentFileName)

...and we were back to cooking with gas.

correct message source

and now attachments on our outbound message retain their original filename...noysh!

outbound showing correct attachment

And BTW, not all commercial email clients populate these MIME headers correctly either (or so a friend of a friend who's aunt once knew someone that was talking to a girlfriend at the supermarket said). Check out the message source of items in your inbox. You might be surprised. smile_regular

Happy spamming er...umm...BizTalking

Tuesday, May 27, 2008 12:10:09 AM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
BizTalk General
Navigation
Archive
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012
Breeze
Sign In
Statistics
Total Posts: 44
This Year: 1
This Month: 0
This Week: 0
Comments: 182
Themes
Pick a theme:
All Content © 2012, Breeze
DasBlog theme 'Business' created by Christoph De Baene (delarou)