First set of videos from BizTalk Summit 2013, London

I probably don’t need to give any introduction about "BizTalk Summit 2013, London", one of the biggest BizTalk Server recently we conducted along with help of Microsoft product group and Microsoft UK. If in case you just bumped into this blog post, here are some background details Our experience organising BizTalk Summit London – 2013 […]

The post First set of videos from BizTalk Summit 2013, London appeared first on BizTalk360 Blog.

Blog Post by: Saravana Kumar

Windows Azure Virtual Machine and Virtual Hard Disk Management Tool – Can save you Money!

Did you know you are charged for a Windows Azure Virtual Machine every hour it is deployed even if it is not running?  I would guess many people are not using their Virtual Machines at night when they sleep so shouldn’t we have a simple way to take them offline?  Wouldn’t it be nice to have a simple GUI interface to view Virtual Machines (VM) and Virtual Hard Disks (VHD)?

This tool solves all those problems!  This tool can be used to easily reduce your monthly Windows Azure compute usage and SAVE YOU MONEY!

I am pleased to announce the release of a community project called the Windows Azure Virtual Machine and Virtual Hard Disk Management Tool.  I have put over 300 hours into researching, building, and testing this tool.

Download Link: Windows Azure Virtual Machine and Virtual Hard Disk Management Tool

Read the current list of Known Issues: Known Issues 
The list of issues currently relates to Virtual Machines, Disks, and Virtual Networks that were created more than a few months ago.

The purpose of this tool is to make working with Windows Azure Virtual Machines and Virtual Hard Disk easier to use, easier to understand, and more cost effective.  Take a look at the feature list below. 

Sure – things like taking a VM offline can be done via PowerShell, but I have made it so easy using a simple WinForm even my mom could take a VM offline (if she only knew what offline meant)!  Better yet, setting up and configuring PowerShell for Azure is not required to run this tool. All you need is .Net 4.0 or higher, a management certificate installed in Azure, and your subscription ID.

Features:

  • Virtual Machines
    • View the Service Name, Deployment Name, Virtual Machine Name, and Location of online Virtual Machines
    • Take a Virtual Machine offline to save on compute time charges (they are stored on your local file system as XML)
    • Bring a local Virtual Machine online to use it again
  • Virtual Hard Disks
    • View all the VHD’s in the Source and Destination storage account container
    • Copy a VHD from one account to another account, even in a different data center
    • View the Lease status of VHD’s in the Source or Destination storage account
    • Break the Lease of a VHD in the Source or Destination storage account (for orphaned VHDs)
    • Delete a VHD in the Source or Destination storage account
    • Download a VHD in the Source storage account (this is slow – do not close the form)
    • View all the Disks and Disk Details associated with a single Azure subscription
    • View all the Images and Image Details associated with a single Azure subscription
    • Prevents you from making a copy of a vhd with an existing Lease

See the download link or ReadMe.txt for more details and basic How To’s.

Please keep in mind this is a free tool without support or warranty of any kind.  In the event of “bad things happening” I store a backup of the raw exported XML in the local folder.  I also do not touch the underlying VHDs when taking a VM offline.  Worse case, the VMs would need to be recreated using the Windows Azure portal.   

If you run into any issues, please use the Email Me link inside the form to let me know so I can research the issue.  I want this to be the best tool possible.

Stay current with the latest information on Windows Azure Virtual Machines Management by joining our Windows Azure Virtual Machine and Virtual Hard Disk Management Newsletter.

To use this tool you need to setup on values in the App.Config file. 

  <!-- Enter the Source Storage Account Details here. -->
 <add key="SourceStorageConnection" value="DefaultEndpointsProtocol=https;AccountName=NAME;AccountKey=KEY" />
 
  <!-- Uncomment and Enter the Destination Storage Account Details here. To work with only one account leave commented out.  
      To copy to the same store set this to the same as Source Account above. -->
  <add key="DestinationStorageConnection" value="DefaultEndpointsProtocol=https;AccountName=NAME;AccountKey=KEY" />
 
  <!-- Select to enable REST API Advanced Features - Subscription ID and Certificate are Required for this feature.  true | false -->
  <add key='EnableRESTApi' value='true' />
    
  <!-- Enter the full path to the -->
  <add key='CertificatePath' value='--Required for REST API not for File Copy--'/>
 
  <!-- Your Windows Azure Subscription ID -->
  <add key='SourceSubscriptionID' value='--Required for REST API not for File Copy--' />
 
  <!-- Local folder for exported VMs -->
  <add key='LocalVMLocation' value='--Required for REST API not for File Copy--' />

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

Basic Steps to take a Virtual Machine Offline Note – the Disk and VHD are not touched in this process

  1. Ensure the 4 REST related configuration values are set in the App.config file
  2. Make sure you have clicked Start Query on the Manage and Copy VHD tab
  3. On the Manage Virtual Machines, select the VMs you want to take offline
  4. Click Take Selected VMs Offline
  5. Process will run in more than one thread unless you have more than one operation on the same service, those will queue
  6. Output is stored on the file system in the Local VM Location defined in the App.config
  7. Watch for Status and Error messages in the Status window

Basic Steps to take a Virtual Machine Online Note – the Disk and VHD are not touched in this process

  1. Launch the tool and click on the Manage Virtual Machine tab
  2. Select the VMs you want to bring online
  3. Click Restore Selected VMs
  4. Process will run in more than one thread unless you have more than one operation on the same service, those will queue
  5. Watch for Status and Error messages in the Status window

Download Link: Windows Azure Virtual Machine and Virtual Hard Disk Management Tool

XMLPolling with the WCF-SQL adapter only returning the first record when selecting an XML type column

XMLPolling with the WCF-SQL adapter only returning the first record when selecting an XML type column

Of late I have been working on a BizTalk project that requires me to pick up XML data from a queue type table in a SQL Database. The table in question contains records which containsome metadata columnsas well as an XML type column. Data, including the already formatted XML,is loaded into the table by an […]
Blog Post by: Johann

Oporto BizTalk Innovation Day will take place in Casa do Infante (14th March 2013 – Oporto, Portugal)

Oporto BizTalk Innovation Day will take place in Casa do Infante (14th March 2013 – Oporto, Portugal)

We’re still finalizing some of the arrangements (site and registration process), but today me and the team behind the preparation of this event, we visited the event location for the first time and I can say that besides being extremely well located is a place full of history and culture – Oporto BizTalk Innovation Day […]
Blog Post by: Sandro Pereira

SP2013: Updating a List using REST in OData format from JavaScript

After wrestling with this tonight for sometime I’ve finally cracked it. SP2013 RTMed
and alot of the sample code fails due to the fact that you need to now add ’..;odata=verbose’
onto pretty much every call to SharePoint.

Basically you get a series of errors such as:

MIME type could not be
found
that matches the content type of
the response
. None of the supported type(s)
application/atom+xml;type=entry, application/atom+xml, application/json;odata=verbose

 

Previously alot of the sample code has

$.getJSON(.) as part of the call to the server – as mentioned we now need to add
some custom header values of ’odata=verbose’, so to save you hours
of slogging on this, the getJSON call doesn’t allow custom header values. You need
to use the $.ajax() for these calls.

READING FROM A LIST

function getCustomers() {
 

  // begin work to call across network
  var requestUri = _spPageContextInfo.webAbsoluteUrl +
               
“/_api/Web/Lists/getByTitle(‘CustomersREST’)/items/” +
               
“?$select=Id,FirstName,Title,WorkPhone” +
               
“&$orderby=Title,FirstName”;
   

  var requestHeaders = {
      “accept”: “application/json;odata=verbose”
  }
    // execute AJAX request

  $.ajax({
      url: requestUri,
      type: ‘GET’,
      dataType: ‘json’,
      headers: requestHeaders,
      success: onDataReturned,
      error: onError
  });
}

 

UPDATING A LIST ITEM

//Sample code to update a Customer List Item in a Customer List called ’CustomersREST’

function updateCustomer(dialogResult, returnValue) {

  if (dialogResult == SP.UI.DialogResult.OK) {
    var Id = returnValue.Id;
    var FirstName = returnValue.FirstName;
    var LastName = returnValue.LastName;
    var WorkPhone = returnValue.WorkPhone;
    var etag = returnValue.etag;

    var requestUri = _spPageContextInfo.webAbsoluteUrl +
              “/_api/Web/Lists/getByTitle(‘CustomersREST’)/items(”
+ Id + “)”;

    var customerData = {
      __metadata: { “type”: “SP.Data.CustomersRESTListItem”
},
      Title: LastName,
      FirstName: FirstName,
      WorkPhone: WorkPhone
    };

    requestBody = JSON.stringify(customerData);

    var requestHeaders = {
        “accept”: “application/json;odata=verbose”,
        “X-RequestDigest”: $(“#__REQUESTDIGEST”).val(),
        “X-HTTP-Method”: “MERGE”,
        “content-length”: requestBody.length,
        “content-type” : “application/json;odata=verbose”,
        “If-Match”: etag
    }

    $.ajax({
      url: requestUri,
      type: “POST”,
      contentType: “application/json;odata=verbose”,
      headers: requestHeaders,
      data: requestBody,
      success: onSuccess,
      error: onError
    });

  }

}

Blog Post by: Mick Badran

Using EDI Bridge to exchange B2B messages in Windows Azure Service Bus

Using EDI Bridge to exchange B2B messages in Windows Azure Service Bus

My last demo will be an Electronic Data Interchange (EDI) Demo: This demo intends to show how to configure trading partners, agreements and the creation of EDI Bridges to process and exchange EDI messages to your partners. We will sends a Sales Order message in an X12 Electronic Data Interchange (EDI) format using the X12 […]
Blog Post by: Sandro Pereira

Creating a MessageBox On-Ramp for the ESB Toolkit in BizTalk 2013

In an environment where Microsoft BizTalk ESB Toolkit is deployed, a BizTalk receive location responsible for receiving ESB-destined messages is referred to as an "on-ramp." In the receive location you have to use one of the pipelines provided as part of the toolkit, and then correctly configure the components of that pipeline to determine the itinerary and link it to the message. So you can use almost any location outside BizTalk as an on-ramp but what if you want to pick up a message from the MessageBox database and use an itinerary to process that message? You can’t use pipeline components once a message is picked up by BizTalk and is already in the MessageBox. Therefore you have to create custom code that must be invoked in an orchestration to perform the steps that are normally made inside the pipeline. The objects that are used inside the ESB Toolkit are not described on MSDN so Reflector is you best friend to figure out which objects have to be used and how to invoke them.

Steps

In the following example I’m going to process a sales order message in BizTalk with an orchestration. In the orchestration is an event message created that is sent to the MessageBox and picked up by an itinerary. (The same itinerary can be used to process multiple event types.)

The following steps are necessary to make it work:

  • Create a custom component in .NET to set the context properties that are needed for the ESB Toolkit
    • In the custom component:
      • Resolve the itinerary from the Itinerary Store database
      • Determine the first Itinerary Service in the itinerary
      • Write the properties of the Itinerary Service as context properties on the message
      • Attach the itinerary to the message
  • Create a map to transform the SalesOrder to an OrderEvent message
  • Create an Orchestration to process SalesOrder messages
    • In the Orchestration:
      • Receive the SalesOrder message
      • Use the map to transform the SalesOrder to an OrderEvent message
      • Set the ESB properties with the custom componen
      • Promote the Create a Correclation Se
      • Send the OrderEvent message to the MessageBox database with a Direct Port
  • Create an itinerary to process Event messages

 

Create a custom component in .NET to set the context properties that are needed for the
ESB Toolkit
Create a class in .NET with a method that receives a XLANGMessage and the name of the itinerary. 
In the method perform the following activities:
– Resolve the itinerary from the Itinerary Store database with the ResolverMgr class.
– Serialize it into an Itinerary object and get the first Itinerary Service from the itinerary.
– Set the necessary properties of the itinerary like beginTime and the interchangeId of the message.
– Write the ServiceName, ServiceType and ServiceState properties of the first Itinerary Service as
   promoted properties on the XLANGMessage
– Write the created Itinerary object as a promoted propery on the XLANGMessage
 
 
Create a map to transform the SalesOrder to an OrderEvent message
 
 
Create an Orchestration to process SalesOrder messages
Create an Orchestration that receives the SalesOrder message, use the map to transform it to an OrderEvent message, set the properties for the ESB Toolkit and send the OrderEvent message to
the MessageBox with a Direct Port
 
Set the ESB properties on the message with the custom .NET component
 
Create a Correlation Set so that context properties on the message are also promoted.
 
Use the Correlation Set in the Send Shape when sending the OrderEvent message to the MessageBox
 
 
Create an itinerary to process Event messages
The first Itinerary Service in the Itinerary must be an orchestration and can’t be a Messaging Service because in fact that are pipeline components. My itinerary is very simple and only has a Routing Service that writes the message to an output folder.

 

Testing the sample

Once the schemas, map and orchestration is deployed to BizTalk, the itinerary is deployed to the Itinerary Store database and de custom component is placed in the GAC, the solution is ready to be tested. Create a simple Receive Port in the Administration Console and drop a SalesOrder message in it. I’ve used the Trace class in System.Diagnostics to trace the steps but you can also use another component for it like ETW tracing.

Run DebugView to watch the trace output.
 
The Itinerary picks up the event message and writes it to an output folder.

 

Conclusion

It took me quite some time to figure out which objects are necessary for the ESB Toolkit and how they work, but as always, once that is done, it is not very difficult to create the code and get it working!

You can download the Solution with the .XSD schemas, Map, Orchestration, Custom Component and Itinerary here:

Note
The sample is in BizTalk 2013 but this is also possible in BizTalk 2010