SlideShare a Scribd company logo
1 of 43
Integrating Windows Phone 7 to
Microsoft Dynamics NAV 2009R2

 Eric Wauters
 Development Manager
 iFacto Business Solutions NV
 Waldo’s blog (www.waldo.be)


                                1
Integrating Windows Phone 7 to
Microsoft Dynamics NAV 2009R2

 Eric Wauters
 Backup for Freddy Kristiansen




                                 2
Agenda
• Cloud? What is that all about? We’re all in .. but in what?
• Building a Windows Phone app that connects to NAV using
  the cloud.
Cloud computing?


       Cloud computing is a pay-per-use model for enabling
 available, convenient, on-demand network access to a shared
            pool of configurable computing resources
(e.g., networks, servers, storage, applications, services) that can
be rapidly provisioned and released with minimal management
               effort or service provider interaction.
Cloud Computing?
Cloud Computing?
                  On-demand self-service
Characteristics



                  Standard network access


                  Location independent resource pooling


                  Rapid elasticity


                  Pay per use
Enterprise Cloud Triggers – Drivers
    1   Speed to Value

    2   Flexibility

    3   Cross Organizational Collaboration

    4   Cost Reduction

    5   CapEx Avoidance

    6   Green IT
CapEx Avoidance – Traditional IT
                                                     Allocated        Load Forecast
                                                   IT-capacities
                               “Under-supply“
                                of capacities


                         “Waste“ of                                Fixed cost of IT-
           IT CAPACITY




                         capacities                                   capacities




 Barrier for
innovations                              Actual Load



                                                       TIME
CapEx Avoidance – Cloud
                                                                          Load
                                                    Allocated IT          Forecast
                                                     capacities

                          No “under-supply“
          IT CAPACITY




                           Reduction of                                Possible
                          “over-supply“                            reduction of IT-
                                                                     capacities in
                                                                   case of reduced
 Reduction                                                               load
  of initial
investments
                                          Actual Load



                                                        Time
Microsoft Online Services Platform
SERVICE ORDERS
Components in play
• NAV
  – Service Dispatchers RoleCenter
  – Customizations
  – Web Services, .net interop
• Proxy
  – C# Windows Service
  – Connecting to NAV Web Services
  – Exposing API on the Service Bus
• Windows Phone 7
  – Silverlight Application
• Cloud
  – Windows Azure Account
Components - flow
 Windows Azure




                               Firewall
    Storage
                    Services


                    Services
      Service Bus
                                          Proxy




                                               NAV
                                              Service
                                               Tier
SERVICE ORDERS – DEMO?
NAV customizations
• Service Order card
   – On Creating/Modifying Service Orders
       • Send notifications (.net interop)
   – Related Information – Images
       • Download images from Azure storage
       • Service Order Image table

• Exposes Web Services
   – For the Proxy
       • Customer Card Page
       • Service Order Card Page               NAV
                                              Service
       • Special build Codeunit                Tier
Windows Phone 7 Application
• Connecting to NAV Web Services
   – Via the Service Bus
       • Get Service Orders
       • Accept Service Order
       • Change status on Service Order
       • Attach images and notes to service orders
       • Register notification channel (plumbing)

• Connecting to Azure Storage
   – To storage images
Windows Phone 7
• Free Developer tools
   – http://create.msdn.com/en-US/
   – .net, C#, Silverlight
   – Microsoft
• A TON of stuff on how to develop applications for Windows
  Phone already out there
Https Web Services Proxy - API
[ServiceContract]
public interface IServiceOrderProxyClass
{
    [OperationContract]
    ServiceOrder[] GetServiceOrders(string username, string password);

    [OperationContract]
    bool AcceptServiceOrder(string username, string password, string no);

    [OperationContract]
    void ChangeServiceOrderStatus(string username, string password, string no, string
status);

    [OperationContract]
    void AttachServiceOrderImage(string username, string password, string no, string
blobName);

    [OperationContract]
    void AttachServiceOrderNote(string username, string password, string no, string note);

    [OperationContract]
    void RegisterWp7ChannelUri(string username, string password, string channelUri);
}
Https Web Services Proxy
• Exposes endpoint on the Service Bus
• Connects to NAV Web Services
• Dedicated for Service Orders scenario
• Only expose necessary API
   – Isolating NAV from attacks
• Removes complexity
• Reduces roundtrips
• Loose coupling (device / NAV)
   – Possible to use other devices
Windows Azure Account
• Windows Azure AppFabric (Service Bus)
   – For communication between phone and on-premise NAV
       • IssuerName, IssuerSecret

• Windows Azure Storage
   – For image storing / retrieving
       • AccountName, AccessKey
Walkthrough
STEP BY STEP
Exposing an API on Windows Azure AppFabric




                              Firewall
              Service Bus
                                         Proxy




                                              NAV
                                             Service
                                              Tier
Exposing an API on Windows Azure AppFabric
  var serviceHost = new ServiceHost(new ServiceOrderProxyClass());

  // sb:// binding
  Uri sbUri = ServiceBusEnvironment.CreateServiceUri("sb", "iFactoCloudDemo
• Proxy
  ", instanceId);
  var sbBinding = new
   – Create ServiceHost
  NetTcpRelayBinding(EndToEndSecurityMode.Transport, RelayClientAuthenticationType
  .None);
   – Add ServiceBus Endpoints
  serviceHost.AddServiceEndpoint(typeof(IServiceOrderProxyClass), sbBinding, sbUri
  );
   – Set Shared Secret credentials on endpoints
  // https:// binding (for Windows Phone etc.)
        • IssuerName, IssuerSecret
  Uri httpsUri = ServiceBusEnvironment.CreateServiceUri("https", "iFactoCloudDemo
  ", "https/" + instanceId);
   – httpsBinding = new
  var Start Servicehost
  BasicHttpRelayBinding(EndToEndBasicHttpSecurityMode.Transport,
• Windows Azure AppFabric SDK
    RelayClientAuthenticationType.None);
  serviceHost.AddServiceEndpoint(typeof(IServiceOrderProxyClass), httpsBinding, ht
  tpsUri);
   – http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3985
      6a03-1490-4283-908f-c8bf0bfad8a5
  // Setup Shared Secret Credentials for hosting endpoints on the Service Bus
  TransportClientEndpointBehavior sharedSecretServiceBusCredential = new
  TransportClientEndpointBehavior();
  sharedSecretServiceBusCredential.CredentialType =
  TransportClientCredentialType.SharedSecret;
  sharedSecretServiceBusCredential.Credentials.SharedSecret.IssuerName =
  issuerName;
  sharedSecretServiceBusCredential.Credentials.SharedSecret.IssuerSecret =
Register Notification Channel




                       Firewall
         Service Bus
                                  Proxy




                                       NAV
                                      Service
                                       Tier
Register Notification Channel
           RegisterWp7ChannelUri(Application :
           Text[40];ChannelUri : Text[250])
• Phone
  public void RegisterWp7ChannelUri(string username, string password, string channelUri
           Wp7Channel.SETRANGE(UserID, USERID);
  {        Wp7Channel.SETRANGE(Application, Application);
    – CreatesWp7Channel.FINDFIRST THEN
    var servicea= new ServiceOrderRef.ServiceOrder(); Phone API
           IF    NotificationChannel using Windows
    Authenticate(service, username, password);
           BEGIN
    – Invokes RegisterWp7ChannelUri in Proxy through Web Services
    service.RegisterWp7ChannelUri("ServiceOrders", channelUri);
             Wp7Channel.ChannelUri := ChannelUri;
  }          Wp7Channel.MODIFY();
• Proxy
    ...    END ELSE
           BEGIN
    HttpNotificationChannel.Find("waldo.ServiceOrders");
             CLEAR(Wp7Channel);
    – Authenticates null) user
    if (myChannel == phone
             Wp7Channel.INIT();
    {
             Wp7Channel.UserID := USERID;
    – myChannelRegisterWp7ChannelUri in Codeunit through Web Services
      Invokes = new HttpNotificationChannel("waldo.ServiceOrders");
             Wp7Channel.Application := Application;
    }
             Wp7Channel.ChannelUri := ChannelUri;
• NAV
    SendURIToService(myChannel.ChannelUri);
    ...      Wp7Channel.INSERT();
           END;
    – Update/Insert record in Wp7Channel table
  private void SendURIToService(Uri uri)
  {
    var client = App.GetServiceOrderProxyClient();
    client.RegisterWp7ChannelUriAsync(App.Settings.UserName, App.Settings.Password, uri
  }
Send Notification




                 Firewall
   Service Bus
                            Proxy




                                 NAV
                                Service
                                 Tier
Send Toast Notification
• DoSendToastNotification(Wp7Channel
   NAV                                 : Record Wp7Channel;Priority : Integer;Text1 :
  Text[40];Text2 : Text[40])
  IF – Loop through Wp7Channel table
     Wp7Channel.NextAttempt > CURRENTDATETIME THEN
    EXIT;
     – Using a WP7Helper class to send the notification (.Net Interop)
  status :=
  Wp7Helper.SendToastNotification(Wp7Channel.ChannelUri, Priority, Text1, Text2);
          • Create XML Document
  //MESSAGE(FORMAT(status));
  CASE status OF
          • Error handling
  1: BEGIN // Invalid Uri
        Wp7Channel.DELETE();
          • Send request using HttpWebRequest / HttpWebResponse
     END;
  2: BEGIN // Queue Full - Wait one hour before reattempting this Uri
        Wp7Channel.NextAttempt := CURRENTDATETIME + 3600000;
  BroadcastToastNotification(Application : Text[40];Header : Text[40];Text :
        Wp7Channel.MODIFY;
  Text[40])
     END;
  Wp7Channel.SETRANGE(Wp7Channel.Application, Application);
  3: BEGIN // Service Unavailable - Wait one hour before reattempting this Uri
  IF Wp7Channel.FINDSET THEN BEGIN
        Wp7Channel.NextAttempt := CURRENTDATETIME + 3600000;
    REPEAT
        Wp7Channel.MODIFY;
       Wp7Notifications.DoSendToastNotification(Wp7Channel.ChannelUri,2,Header,Text);
     END;
    UNTIL Wp7Channel.NEXT = 0;
  END;
  END;
Get Service Orders




                 Firewall
   Service Bus
                            Proxy




                                 NAV
                                Service
                                 Tier
GetServiceOrders
  public ServiceOrder[] GetServiceOrders(string username, string password)
              private double CalculateDistance(double lat1, double lon1, double lat2, dou
  {
• Phone
    ...
              {
                double theta = lon1 - lon2;
    var myFilter = new ServiceOrderCardRef.ServiceOrderCard_Filter();
                double dist = Math.Sin(deg2rad(lat1)) * Math.Sin(deg2rad(lat2)) +
    – Invoke GetServiceOrders in Proxy through Web Services
    myFilter.Field = ServiceOrderCardRef.ServiceOrderCard_Fields.Assigned_User_ID;
                               Math.Cos(deg2rad(lat1)) * Math.Cos(deg2rad(lat2)) * Math.Co
    myFilter.Criteria rad2deg(Math.Acos(dist)) * 60 * 1.1515;
                dist =  = "@" + service.GetMyUserID();
• Proxy
    varLoadServiceOrders() 'K')
  void   myFilters (unit ==
                if = new ServiceOrderCardRef.ServiceOrderCard_Filter[] { myFilter };
  { var myOrders dist = dist * 1.609344;
                   = serviceOrderService.ReadMultiple(myFilters, null, 0);
  void client_GetServiceOrdersCompleted(object
  sender, ServiceOrderProxy.GetServiceOrdersCompletedEventArgs e)
    – Reads Service (dist); from card page
    var client return Orders
                 = App.GetServiceOrderProxyClient();
  { var unassignedFilter = new ServiceOrderCardRef.ServiceOrderCard_Filter();
    client.GetServiceOrdersCompleted +=
              }
    unassignedFilter.Field =
    this.All.Clear();
         •
       new Assigned to me
  ServiceOrderCardRef.ServiceOrderCard_Fields.Assigned_User_ID;
    foreach (ServiceOrderProxy.ServiceOrder serviceOrder in e.Result)
  EventHandler<ServiceOrderProxy.GetServiceOrdersCompletedEventArgs>(client_GetServi
              private double deg2rad(double deg)
    unassignedFilter.Criteria = "=''";
    {    • Assigned to
  ceOrdersCompleted); nobody
              {
    var unassignedFilters = =
       serviceOrder.Distance new ServiceOrderCardRef.ServiceOrderCard_Filter[] {
    client.GetServiceOrdersAsync(App.Settings.UserName, App.Settings.Password);
                return (deg * Math.PI / 180.0);
  unassignedFilter };
  } – Builds and returns ServiceOrderProxyClass collection
  CalculateDistance(CurrentLocation.Latitude, CurrentLocation.Longitude,
              }
    var unassignedOrders =
  serviceOrderService.ReadMultiple(unassignedFilters, null, 0);
         • With Customer info read from Customer Card
  serviceOrder.Latitude, serviceOrder.Longitude, unit);
       this.All.Add(serviceOrder);
    var serviceOrders = new ServiceOrder[myOrders.Length + unassignedOrders.Length];
• Phone
    }
    for (int i = 0; i <
    UpdateCollections(); myOrders.Length; i++)
  }    serviceOrders[i] = ServiceOrder.CreateServiceOrderClass(myOrders[i],
    – Calculate distance from current location to each service location
         customerCardService.Read(myOrders[i].Customer_No));

   – Update Collections (assigned, prioritized,i++)
   for (int i = 0; i < unassignedOrders.Length; closest)
      serviceOrders[i + myOrders.Length] =
  ServiceOrder.CreateServiceOrderClass(unassignedOrders[i],
Accept Service Order




                  Firewall
    Service Bus
                             Proxy




                                  NAV
                                 Service
                                  Tier
Accept Service Order
     public bool AcceptServiceOrder(string username, string
  • Phone
     password, string no)
     {
        var service = new ServiceOrderRef.ServiceOrder();
        – Ask user if he wants to accept the
void client_AcceptServiceOrderCompleted(objectService Order
        Authenticate(service, username, password);
sender, ServiceOrderProxy.AcceptServiceOrderCompletedEventArgs e)
{       – serviceOrderService = new
        var Invoke AcceptServiceOrder in Proxy through Web Services
  Deployment.Current.Dispatcher.BeginInvoke(() =>
     ServiceOrderCardRef.ServiceOrderCard_Service();
  • Proxy
  {
void acceptAction_Click(object sender, EventArgs e)password);
        Authenticate(serviceOrderService, username,
    if (e.Result)
{
        – serviceOrder = you want to accept this Service Order?", "Accept",
  if{(MessageBox.Show("Do serviceOrderService.Read(no); through Web Services
        var Read the Service Order from the Card Page
    MessageBoxButton.OKCancel) == MessageBoxResult.OK) you!");
       MessageBox.Show("ServiceOrder is now assigned to
        if (!string.IsNullOrEmpty(serviceOrder.Assigned_User_ID))
  {    this.AssignedToMe = true;
    }
        –client =false; Order is assigned already – return false
          return Service
            If the App.GetServiceOrderProxyClient();
    varserviceOrder.Assigned_User_ID = service.GetMyUserID();
    else
    client.AcceptServiceOrderCompleted +=
        –
        try Set the Assigned_User_ID
       MessageBox.Show("ServiceOrder was already assigned to someone else");
       new
        {
    App.ViewModel.LoadData();
EventHandler<ServiceOrderProxy.AcceptServiceOrderCompletedEventArgs>(client_AcceptServi
        – serviceOrderService.Update(ref serviceOrder);
ceOrderCompleted); Service Order again – if error – return false
            Write the
    UpdateApplicationBarButtons();
          return true;
  }); }
} • Phone
client.AcceptServiceOrderAsync(App.Settings.UserName, App.Settings.Password, this.Servi
        catch
ceOrder.No);
        {
  }     – return false;
            Display message and refresh data
}       }
     }
Change Service Order Status




                     Firewall
       Service Bus
                                Proxy




                                     NAV
                                    Service
                                     Tier
Change Service Order Status
public void ChangeServiceOrderStatus(string username, string password, string
• Phone
no, string statusStr)
{
  var– Change status on = new ServiceOrderCardRef.ServiceOrderCard_Service();
      serviceOrderService Service Order internally
  Authenticate(serviceOrderService, username, password);
    – Invoke ChangeServiceOrderStatus in Proxy through Web Services
  var status = (Status)Enum.Parse(typeof(Status), statusStr.Replace('
• Proxy
', '_'),void ChangeServiceOrderStatus(ServiceOrderProxy.ServiceOrder
private true);
serviceOrder, string serviceOrderService.Read(no);
  var serviceOrder = status)
{ serviceOrder.Status = status;
     – Read Service Order from the Card Page through Web Services
  serviceOrderService.Update(ref
  serviceOrder.Status = status; serviceOrder);
} var client = App.GetServiceOrderProxyClient();
    – Set the Status
client.ChangeServiceOrderStatusAsync(App.Settings.UserName, App.Settings.Password,
     – Update Starting Date/Time or Finishing Date/Time if necessary
 serviceOrder.No, status);
}
    – Write the Service Order again
Capture and Upload Image




                      Firewall
      Storage




        Service Bus
                                 Proxy




                                      NAV
                                     Service
                                      Tier
Capture and upload Image
void cameraTask_Completed(object sender, PhotoResult e)
 ...
 • Delay’s Blog
{CameraCaptureTask cameraTask;
 ... (e.TaskResult == TaskResult.OK)
  if
  {     – http://blogs.msdn.com/b/delay/
 cameraTask = new CameraCaptureTask();
void// Using WriteableBitmap's SaveJpeg to resize
      PutBlobAction(Stream s, byte[] photo)
 cameraTask.Completed += new EventHandler<PhotoResult>(cameraTask_Completed);
        – Blob API for Windows Phone
{...var bitmapImage = new BitmapImage();7
     bitmapImage.SetSource(e.ChosenPhoto);
  s.Write(photo, 0, photo.Length);
}            • Ms-PL (http://opensource.org/licenses/ms-pl.html)
voidvar bitmap = new WriteableBitmap(bitmapImage);
      cameraAction_Click(object sender, EventArgs e)
{    var ms = new MemoryStream();

{
}
 • Phone
voidbitmap.SaveJpeg(ms, 1024,camera0, 90); the picture
  cameraTask.Show(); //shows 768, to take
      PutBlobCompleted()
     var photo = ms.ToArray();
  Deployment.Current.Dispatcher.BeginInvoke(() =>
     // – Capture Image
         Upload photo
AttachServiceOrderImage(this.ServiceOrder, blobInfo.Name));
}    blobClient = new
        – Resize image
AzureBlobStoreClient(AzureStorageAccountName, AzureStoragePrimaryAccessKey, "image
s");
private void PutBlobFailed(Exception ex)
{            • to save time when uploading
     blobInfo = new BlobInfo(Guid.NewGuid().ToString());
  Deployment.Current.Dispatcher.BeginInvoke(() (s)MessageBox.Show("No photo),
     blobClient.PutBlob(blobInfo, photo.Length, => => PutBlobAction(s,
        – Upload
connectivity.”)); image (ex) => PutBlobFailed(ex));
       PutBlobCompleted, to Azure Storage
} }
}
Attach Image / Note




                   Firewall
   Storage




     Service Bus
                              Proxy




                                   NAV
                                  Service
                                   Tier
Attach Image / Note
   AttachServiceOrderImage(No : Code[20];Image : Text[40])
   ServiceOrderImage.INIT;
• Phone
   ServiceOrderImage."Document No." := No;
   ServiceOrderImage."Image ID" := Image;
   ServiceOrderImage.INSERT(TRUE);
     – Invoke AttachServiceOrderImage/Note in Proxy through Web Services
        with Uri to Azure Storage blob or note
   AttachServiceOrderNote(No : Code[20];Note : Text[250])
    ServiceHeader.GET(ServiceHeader."Document Type"::Order, No);
      – Display message box when
    RecRef.GETTABLE(ServiceHeader); image uploaded
    RecordLink.INIT();
• Proxy
    RecordLink.Type := RecordLink.Type::Note;
privatevoid AttachServiceOrderImage(string username, string password, string
public void AttachServiceOrderImage(ServiceOrderProxy.ServiceOrder
               Save_Click(object sender, EventArgs e)
    RecordLink.Created := CURRENTDATETIME;
serviceOrder, string ID" := USERID;
{ RecordLink."User blobName)
no, string blobName)
{ var – InvokeApp.GetServiceOrderProxyClient(); in NAV Codeunit through Web
       client = AttachServiceOrderImage/Note
    RecordLink.URL1 := 'dynamicsnav://freddyk-
  var client ==App.GetServiceOrderProxyClient();
       service    new ServiceOrderRef.ServiceOrder();
          Services with Uri or notepassword);
    appfabr:7047/DynamicsNAV/'+COMPANYNAME+'/runpage?page=5900&pers
  client.AttachServiceOrderImageCompleted +=
client.AttachServiceOrderNoteAsync(App.Settings.UserName, App.Settings.Password, ID,
  Authenticate(service, username,
    onalization=5900&'+
    new
this.textBox1.Text);
  service.AttachServiceOrderImage(no, blobName);
• NAV
EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_AttachServiceOrder
} NavigationService.GoBack();
    'bookmark='+FORMAT(RecRef.RECORDID,0,10)+'&mode=edit';
ImageCompleted);
} RecordLink.Description := 'Service Order - '+No;
      – Insert Image := in ServiceOrderImage Table or password, string
public void AttachServiceOrderNote(string username, string add note to RecordLink
    RecordLink.Company Uri COMPANYNAME;
client.AttachServiceOrderImageAsync(App.Settings.UserName, App.Settings.Password, ser
no, RecordLink."Record ID" := RecRef.RECORDID;
    string note)
          table
viceOrder.No, blobName);
{ CLEAR(RecordLink.Note);
} var service '+Note;
    Note := ' = new ServiceOrderRef.ServiceOrder();
  Authenticate(service, username, password);
    Note[1] := STRLEN(Note)-1;
void client_AttachServiceOrderImageCompleted(object
  service.AttachServiceOrderNote(no, note);
    NoteText.ADDTEXT(Note);
sender, System.ComponentModel.AsyncCompletedEventArgs e)
} RecordLink.Note.CREATEOUTSTREAM(NoteStream);
{ NoteText.WRITE(NoteStream);
Download and display image




                       Firewall
       Storage




         Service Bus
                                  Proxy




                                       NAV
                                      Service
                                       Tier
Download and display image
public class AzureStorage
{• NAV
  string AccountName;
      – Create .net
  string AccessKey; class   AzureStorage
           • Using AccountName and AccessKey
  public AzureStorage(string AccountName, string AccessKey)
  {
           • Wrapper AccountName;
    this.AccountName =for AzureBlobStoreClient (Delay’s Blog)
    this.AccessKey = AccessKey;
       – Download OnAction()
<Action1170000001> - all blobs for a specific Service Order to the Service Tier
  }
AzureStorage :=
       – Use GetBlob(string to show images name, Client
AzureStorage.AzureStorage(AzureStorageAccountName, AzureStorageAccessKey);
  public void File.Download container, string on the string filename)
ServiceOrderImage.SETRANGE(ServiceOrderImage."Document No.", "No.");
  {
IF NOT ServiceOrderImage.FIND('-') THEN
    EnsureContainerIsCreated(container);
BEGIN
    var blobClient = new AzureBlobStoreClient(AccountName, AccessKey, container);
  MESSAGE('No Images attached');
    var blobInfo = new BlobInfo(name);
END blobClient.GetBlob(blobInfo, (s) => GetBlobAction(s, filename));
    ELSE
REPEAT
  }
  AzureStorage.GetBlob('images', ServiceOrderImage."Image
ID", TEMPORARYPATH+ServiceOrderImage."Image ID"+'.jpg');
  ...
  toFile := ServiceOrderImage."Image ID"+'.jpg';
  FILE.DOWNLOAD(TEMPORARYPATH+ServiceOrderImage."Image ID"+'.jpg', 'Service Order
Image','', '', toFile);
UNTIL ServiceOrderImage.NEXT = 0;
More info
• Will soon be published on:
   – http://blogs.msdn.com/b/freddyk
• Related info:
   – Vjeko’s blog (navigateintosuccess.com)
   – Waldo’s blog (www.waldo.be)
   – Mibuso
   – Dynamicsuser.net
   – ...




                                              44
Questions?



             45
Thanks to
• Diamond Sponsors




• Gold Sponsors

More Related Content

Similar to Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters

Getting started with Cloud Foundry
Getting started with Cloud FoundryGetting started with Cloud Foundry
Getting started with Cloud FoundryLode Vermeiren
 
Getting started with Cloud Foundry
Getting started with Cloud FoundryGetting started with Cloud Foundry
Getting started with Cloud FoundryLode Vermeiren
 
The Application Development Landscape - 2011
The Application Development Landscape -  2011The Application Development Landscape -  2011
The Application Development Landscape - 2011David Skok
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptOpenSourceIndia
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptsuniltomar04
 
Intro to Table-Grouping™ technology
Intro to Table-Grouping™ technologyIntro to Table-Grouping™ technology
Intro to Table-Grouping™ technologyDavid McFarlane
 
Mobile Cloud Architectures
Mobile Cloud ArchitecturesMobile Cloud Architectures
Mobile Cloud ArchitecturesDavid Coallier
 
Bigdata Final NSF I-Corps Presentation
Bigdata Final NSF I-Corps PresentationBigdata Final NSF I-Corps Presentation
Bigdata Final NSF I-Corps PresentationStanford University
 
Intersolv Mid-Market Business Cloud Analysis
Intersolv Mid-Market Business Cloud AnalysisIntersolv Mid-Market Business Cloud Analysis
Intersolv Mid-Market Business Cloud Analysisbfmx3js
 
iOS Architecture and MVC
iOS Architecture and MVCiOS Architecture and MVC
iOS Architecture and MVCMarian Ignev
 
Firefox3.5 And Next
Firefox3.5 And NextFirefox3.5 And Next
Firefox3.5 And NextChanny Yun
 
AlphaBox Technology Overview
AlphaBox Technology OverviewAlphaBox Technology Overview
AlphaBox Technology Overviewmonica_singh
 
Colaboración - la Nueva Plataforma para los Negocios
Colaboración - la Nueva Plataforma para los NegociosColaboración - la Nueva Plataforma para los Negocios
Colaboración - la Nueva Plataforma para los NegociosMundo Contact
 
Troubleshooting Wireless LANs with Centralized Controllers
Troubleshooting Wireless LANs with Centralized ControllersTroubleshooting Wireless LANs with Centralized Controllers
Troubleshooting Wireless LANs with Centralized ControllersCisco Mobility
 
1112 agile approach to pci dss development
1112 agile approach to pci dss development1112 agile approach to pci dss development
1112 agile approach to pci dss developmentbezpiecznik
 
OSC11 - The future is now for all your Business Processes
OSC11 - The future is now for all your Business ProcessesOSC11 - The future is now for all your Business Processes
OSC11 - The future is now for all your Business ProcessesEric D. Schabell
 
Cloud Computing with InduSoft
Cloud Computing with InduSoftCloud Computing with InduSoft
Cloud Computing with InduSoftAVEVA
 

Similar to Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters (20)

Getting started with Cloud Foundry
Getting started with Cloud FoundryGetting started with Cloud Foundry
Getting started with Cloud Foundry
 
Getting started with Cloud Foundry
Getting started with Cloud FoundryGetting started with Cloud Foundry
Getting started with Cloud Foundry
 
The Application Development Landscape - 2011
The Application Development Landscape -  2011The Application Development Landscape -  2011
The Application Development Landscape - 2011
 
Ipanema
IpanemaIpanema
Ipanema
 
Ubiquisys at Femtocells Americas 11
Ubiquisys at Femtocells Americas 11Ubiquisys at Femtocells Americas 11
Ubiquisys at Femtocells Americas 11
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-ppt
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-ppt
 
Intro to Table-Grouping™ technology
Intro to Table-Grouping™ technologyIntro to Table-Grouping™ technology
Intro to Table-Grouping™ technology
 
SOA OSB BPEL BPM Presentation
SOA OSB BPEL BPM PresentationSOA OSB BPEL BPM Presentation
SOA OSB BPEL BPM Presentation
 
Mobile Cloud Architectures
Mobile Cloud ArchitecturesMobile Cloud Architectures
Mobile Cloud Architectures
 
Bigdata Final NSF I-Corps Presentation
Bigdata Final NSF I-Corps PresentationBigdata Final NSF I-Corps Presentation
Bigdata Final NSF I-Corps Presentation
 
Intersolv Mid-Market Business Cloud Analysis
Intersolv Mid-Market Business Cloud AnalysisIntersolv Mid-Market Business Cloud Analysis
Intersolv Mid-Market Business Cloud Analysis
 
iOS Architecture and MVC
iOS Architecture and MVCiOS Architecture and MVC
iOS Architecture and MVC
 
Firefox3.5 And Next
Firefox3.5 And NextFirefox3.5 And Next
Firefox3.5 And Next
 
AlphaBox Technology Overview
AlphaBox Technology OverviewAlphaBox Technology Overview
AlphaBox Technology Overview
 
Colaboración - la Nueva Plataforma para los Negocios
Colaboración - la Nueva Plataforma para los NegociosColaboración - la Nueva Plataforma para los Negocios
Colaboración - la Nueva Plataforma para los Negocios
 
Troubleshooting Wireless LANs with Centralized Controllers
Troubleshooting Wireless LANs with Centralized ControllersTroubleshooting Wireless LANs with Centralized Controllers
Troubleshooting Wireless LANs with Centralized Controllers
 
1112 agile approach to pci dss development
1112 agile approach to pci dss development1112 agile approach to pci dss development
1112 agile approach to pci dss development
 
OSC11 - The future is now for all your Business Processes
OSC11 - The future is now for all your Business ProcessesOSC11 - The future is now for all your Business Processes
OSC11 - The future is now for all your Business Processes
 
Cloud Computing with InduSoft
Cloud Computing with InduSoftCloud Computing with InduSoft
Cloud Computing with InduSoft
 

More from dynamicscom

Plm & erp their respective roles in marketing
Plm & erp   their respective roles in marketingPlm & erp   their respective roles in marketing
Plm & erp their respective roles in marketingdynamicscom
 
Map your best_route_to_product_value_ebook
Map your best_route_to_product_value_ebookMap your best_route_to_product_value_ebook
Map your best_route_to_product_value_ebookdynamicscom
 
Is plm more important than erp (question mark)
Is plm more important than erp (question mark)Is plm more important than erp (question mark)
Is plm more important than erp (question mark)dynamicscom
 
Ptc & microsoft partnership
Ptc & microsoft partnershipPtc & microsoft partnership
Ptc & microsoft partnershipdynamicscom
 
Dynamics CRM2011 Update 7, Tim Schaeps
Dynamics CRM2011 Update 7, Tim SchaepsDynamics CRM2011 Update 7, Tim Schaeps
Dynamics CRM2011 Update 7, Tim Schaepsdynamicscom
 
Keynote - Cloud Transformation, Guus Krabbenborg
Keynote - Cloud Transformation, Guus KrabbenborgKeynote - Cloud Transformation, Guus Krabbenborg
Keynote - Cloud Transformation, Guus Krabbenborgdynamicscom
 
AX2012 Technical Track - Infrastructure, Davy Vliegen
AX2012 Technical Track - Infrastructure, Davy VliegenAX2012 Technical Track - Infrastructure, Davy Vliegen
AX2012 Technical Track - Infrastructure, Davy Vliegendynamicscom
 
AX2012 Technical Track - Entreprise portal, Czesia Langoswka
AX2012 Technical Track -  Entreprise portal, Czesia LangoswkaAX2012 Technical Track -  Entreprise portal, Czesia Langoswka
AX2012 Technical Track - Entreprise portal, Czesia Langoswkadynamicscom
 
AX2012 Functional track - Steven Eggermont
AX2012 Functional track - Steven EggermontAX2012 Functional track - Steven Eggermont
AX2012 Functional track - Steven Eggermontdynamicscom
 
AX2012 - Keynote from Rudi America, Theuma
AX2012 - Keynote from Rudi America, TheumaAX2012 - Keynote from Rudi America, Theuma
AX2012 - Keynote from Rudi America, Theumadynamicscom
 
AX 2012 Functional Track - Steven Hermans
AX 2012 Functional Track - Steven HermansAX 2012 Functional Track - Steven Hermans
AX 2012 Functional Track - Steven Hermansdynamicscom
 
Microsoft Worldwide Partnerconference 2011 - CRM recap for the BDC
Microsoft Worldwide Partnerconference 2011 - CRM recap for the BDCMicrosoft Worldwide Partnerconference 2011 - CRM recap for the BDC
Microsoft Worldwide Partnerconference 2011 - CRM recap for the BDCdynamicscom
 

More from dynamicscom (12)

Plm & erp their respective roles in marketing
Plm & erp   their respective roles in marketingPlm & erp   their respective roles in marketing
Plm & erp their respective roles in marketing
 
Map your best_route_to_product_value_ebook
Map your best_route_to_product_value_ebookMap your best_route_to_product_value_ebook
Map your best_route_to_product_value_ebook
 
Is plm more important than erp (question mark)
Is plm more important than erp (question mark)Is plm more important than erp (question mark)
Is plm more important than erp (question mark)
 
Ptc & microsoft partnership
Ptc & microsoft partnershipPtc & microsoft partnership
Ptc & microsoft partnership
 
Dynamics CRM2011 Update 7, Tim Schaeps
Dynamics CRM2011 Update 7, Tim SchaepsDynamics CRM2011 Update 7, Tim Schaeps
Dynamics CRM2011 Update 7, Tim Schaeps
 
Keynote - Cloud Transformation, Guus Krabbenborg
Keynote - Cloud Transformation, Guus KrabbenborgKeynote - Cloud Transformation, Guus Krabbenborg
Keynote - Cloud Transformation, Guus Krabbenborg
 
AX2012 Technical Track - Infrastructure, Davy Vliegen
AX2012 Technical Track - Infrastructure, Davy VliegenAX2012 Technical Track - Infrastructure, Davy Vliegen
AX2012 Technical Track - Infrastructure, Davy Vliegen
 
AX2012 Technical Track - Entreprise portal, Czesia Langoswka
AX2012 Technical Track -  Entreprise portal, Czesia LangoswkaAX2012 Technical Track -  Entreprise portal, Czesia Langoswka
AX2012 Technical Track - Entreprise portal, Czesia Langoswka
 
AX2012 Functional track - Steven Eggermont
AX2012 Functional track - Steven EggermontAX2012 Functional track - Steven Eggermont
AX2012 Functional track - Steven Eggermont
 
AX2012 - Keynote from Rudi America, Theuma
AX2012 - Keynote from Rudi America, TheumaAX2012 - Keynote from Rudi America, Theuma
AX2012 - Keynote from Rudi America, Theuma
 
AX 2012 Functional Track - Steven Hermans
AX 2012 Functional Track - Steven HermansAX 2012 Functional Track - Steven Hermans
AX 2012 Functional Track - Steven Hermans
 
Microsoft Worldwide Partnerconference 2011 - CRM recap for the BDC
Microsoft Worldwide Partnerconference 2011 - CRM recap for the BDCMicrosoft Worldwide Partnerconference 2011 - CRM recap for the BDC
Microsoft Worldwide Partnerconference 2011 - CRM recap for the BDC
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters

  • 1. Integrating Windows Phone 7 to Microsoft Dynamics NAV 2009R2 Eric Wauters Development Manager iFacto Business Solutions NV Waldo’s blog (www.waldo.be) 1
  • 2. Integrating Windows Phone 7 to Microsoft Dynamics NAV 2009R2 Eric Wauters Backup for Freddy Kristiansen 2
  • 3. Agenda • Cloud? What is that all about? We’re all in .. but in what? • Building a Windows Phone app that connects to NAV using the cloud.
  • 4. Cloud computing? Cloud computing is a pay-per-use model for enabling available, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.
  • 6. Cloud Computing? On-demand self-service Characteristics Standard network access Location independent resource pooling Rapid elasticity Pay per use
  • 7. Enterprise Cloud Triggers – Drivers 1 Speed to Value 2 Flexibility 3 Cross Organizational Collaboration 4 Cost Reduction 5 CapEx Avoidance 6 Green IT
  • 8. CapEx Avoidance – Traditional IT Allocated Load Forecast IT-capacities “Under-supply“ of capacities “Waste“ of Fixed cost of IT- IT CAPACITY capacities capacities Barrier for innovations Actual Load TIME
  • 9. CapEx Avoidance – Cloud Load Allocated IT Forecast capacities No “under-supply“ IT CAPACITY Reduction of Possible “over-supply“ reduction of IT- capacities in case of reduced Reduction load of initial investments Actual Load Time
  • 12. Components in play • NAV – Service Dispatchers RoleCenter – Customizations – Web Services, .net interop • Proxy – C# Windows Service – Connecting to NAV Web Services – Exposing API on the Service Bus • Windows Phone 7 – Silverlight Application • Cloud – Windows Azure Account
  • 13. Components - flow Windows Azure Firewall Storage Services Services Service Bus Proxy NAV Service Tier
  • 15. NAV customizations • Service Order card – On Creating/Modifying Service Orders • Send notifications (.net interop) – Related Information – Images • Download images from Azure storage • Service Order Image table • Exposes Web Services – For the Proxy • Customer Card Page • Service Order Card Page NAV Service • Special build Codeunit Tier
  • 16. Windows Phone 7 Application • Connecting to NAV Web Services – Via the Service Bus • Get Service Orders • Accept Service Order • Change status on Service Order • Attach images and notes to service orders • Register notification channel (plumbing) • Connecting to Azure Storage – To storage images
  • 17. Windows Phone 7 • Free Developer tools – http://create.msdn.com/en-US/ – .net, C#, Silverlight – Microsoft • A TON of stuff on how to develop applications for Windows Phone already out there
  • 18. Https Web Services Proxy - API [ServiceContract] public interface IServiceOrderProxyClass { [OperationContract] ServiceOrder[] GetServiceOrders(string username, string password); [OperationContract] bool AcceptServiceOrder(string username, string password, string no); [OperationContract] void ChangeServiceOrderStatus(string username, string password, string no, string status); [OperationContract] void AttachServiceOrderImage(string username, string password, string no, string blobName); [OperationContract] void AttachServiceOrderNote(string username, string password, string no, string note); [OperationContract] void RegisterWp7ChannelUri(string username, string password, string channelUri); }
  • 19. Https Web Services Proxy • Exposes endpoint on the Service Bus • Connects to NAV Web Services • Dedicated for Service Orders scenario • Only expose necessary API – Isolating NAV from attacks • Removes complexity • Reduces roundtrips • Loose coupling (device / NAV) – Possible to use other devices
  • 20. Windows Azure Account • Windows Azure AppFabric (Service Bus) – For communication between phone and on-premise NAV • IssuerName, IssuerSecret • Windows Azure Storage – For image storing / retrieving • AccountName, AccessKey
  • 22. Exposing an API on Windows Azure AppFabric Firewall Service Bus Proxy NAV Service Tier
  • 23. Exposing an API on Windows Azure AppFabric var serviceHost = new ServiceHost(new ServiceOrderProxyClass()); // sb:// binding Uri sbUri = ServiceBusEnvironment.CreateServiceUri("sb", "iFactoCloudDemo • Proxy ", instanceId); var sbBinding = new – Create ServiceHost NetTcpRelayBinding(EndToEndSecurityMode.Transport, RelayClientAuthenticationType .None); – Add ServiceBus Endpoints serviceHost.AddServiceEndpoint(typeof(IServiceOrderProxyClass), sbBinding, sbUri ); – Set Shared Secret credentials on endpoints // https:// binding (for Windows Phone etc.) • IssuerName, IssuerSecret Uri httpsUri = ServiceBusEnvironment.CreateServiceUri("https", "iFactoCloudDemo ", "https/" + instanceId); – httpsBinding = new var Start Servicehost BasicHttpRelayBinding(EndToEndBasicHttpSecurityMode.Transport, • Windows Azure AppFabric SDK RelayClientAuthenticationType.None); serviceHost.AddServiceEndpoint(typeof(IServiceOrderProxyClass), httpsBinding, ht tpsUri); – http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3985 6a03-1490-4283-908f-c8bf0bfad8a5 // Setup Shared Secret Credentials for hosting endpoints on the Service Bus TransportClientEndpointBehavior sharedSecretServiceBusCredential = new TransportClientEndpointBehavior(); sharedSecretServiceBusCredential.CredentialType = TransportClientCredentialType.SharedSecret; sharedSecretServiceBusCredential.Credentials.SharedSecret.IssuerName = issuerName; sharedSecretServiceBusCredential.Credentials.SharedSecret.IssuerSecret =
  • 24. Register Notification Channel Firewall Service Bus Proxy NAV Service Tier
  • 25. Register Notification Channel RegisterWp7ChannelUri(Application : Text[40];ChannelUri : Text[250]) • Phone public void RegisterWp7ChannelUri(string username, string password, string channelUri Wp7Channel.SETRANGE(UserID, USERID); { Wp7Channel.SETRANGE(Application, Application); – CreatesWp7Channel.FINDFIRST THEN var servicea= new ServiceOrderRef.ServiceOrder(); Phone API IF NotificationChannel using Windows Authenticate(service, username, password); BEGIN – Invokes RegisterWp7ChannelUri in Proxy through Web Services service.RegisterWp7ChannelUri("ServiceOrders", channelUri); Wp7Channel.ChannelUri := ChannelUri; } Wp7Channel.MODIFY(); • Proxy ... END ELSE BEGIN HttpNotificationChannel.Find("waldo.ServiceOrders"); CLEAR(Wp7Channel); – Authenticates null) user if (myChannel == phone Wp7Channel.INIT(); { Wp7Channel.UserID := USERID; – myChannelRegisterWp7ChannelUri in Codeunit through Web Services Invokes = new HttpNotificationChannel("waldo.ServiceOrders"); Wp7Channel.Application := Application; } Wp7Channel.ChannelUri := ChannelUri; • NAV SendURIToService(myChannel.ChannelUri); ... Wp7Channel.INSERT(); END; – Update/Insert record in Wp7Channel table private void SendURIToService(Uri uri) { var client = App.GetServiceOrderProxyClient(); client.RegisterWp7ChannelUriAsync(App.Settings.UserName, App.Settings.Password, uri }
  • 26. Send Notification Firewall Service Bus Proxy NAV Service Tier
  • 27. Send Toast Notification • DoSendToastNotification(Wp7Channel NAV : Record Wp7Channel;Priority : Integer;Text1 : Text[40];Text2 : Text[40]) IF – Loop through Wp7Channel table Wp7Channel.NextAttempt > CURRENTDATETIME THEN EXIT; – Using a WP7Helper class to send the notification (.Net Interop) status := Wp7Helper.SendToastNotification(Wp7Channel.ChannelUri, Priority, Text1, Text2); • Create XML Document //MESSAGE(FORMAT(status)); CASE status OF • Error handling 1: BEGIN // Invalid Uri Wp7Channel.DELETE(); • Send request using HttpWebRequest / HttpWebResponse END; 2: BEGIN // Queue Full - Wait one hour before reattempting this Uri Wp7Channel.NextAttempt := CURRENTDATETIME + 3600000; BroadcastToastNotification(Application : Text[40];Header : Text[40];Text : Wp7Channel.MODIFY; Text[40]) END; Wp7Channel.SETRANGE(Wp7Channel.Application, Application); 3: BEGIN // Service Unavailable - Wait one hour before reattempting this Uri IF Wp7Channel.FINDSET THEN BEGIN Wp7Channel.NextAttempt := CURRENTDATETIME + 3600000; REPEAT Wp7Channel.MODIFY; Wp7Notifications.DoSendToastNotification(Wp7Channel.ChannelUri,2,Header,Text); END; UNTIL Wp7Channel.NEXT = 0; END; END;
  • 28. Get Service Orders Firewall Service Bus Proxy NAV Service Tier
  • 29. GetServiceOrders public ServiceOrder[] GetServiceOrders(string username, string password) private double CalculateDistance(double lat1, double lon1, double lat2, dou { • Phone ... { double theta = lon1 - lon2; var myFilter = new ServiceOrderCardRef.ServiceOrderCard_Filter(); double dist = Math.Sin(deg2rad(lat1)) * Math.Sin(deg2rad(lat2)) + – Invoke GetServiceOrders in Proxy through Web Services myFilter.Field = ServiceOrderCardRef.ServiceOrderCard_Fields.Assigned_User_ID; Math.Cos(deg2rad(lat1)) * Math.Cos(deg2rad(lat2)) * Math.Co myFilter.Criteria rad2deg(Math.Acos(dist)) * 60 * 1.1515; dist = = "@" + service.GetMyUserID(); • Proxy varLoadServiceOrders() 'K') void myFilters (unit == if = new ServiceOrderCardRef.ServiceOrderCard_Filter[] { myFilter }; { var myOrders dist = dist * 1.609344; = serviceOrderService.ReadMultiple(myFilters, null, 0); void client_GetServiceOrdersCompleted(object sender, ServiceOrderProxy.GetServiceOrdersCompletedEventArgs e) – Reads Service (dist); from card page var client return Orders = App.GetServiceOrderProxyClient(); { var unassignedFilter = new ServiceOrderCardRef.ServiceOrderCard_Filter(); client.GetServiceOrdersCompleted += } unassignedFilter.Field = this.All.Clear(); • new Assigned to me ServiceOrderCardRef.ServiceOrderCard_Fields.Assigned_User_ID; foreach (ServiceOrderProxy.ServiceOrder serviceOrder in e.Result) EventHandler<ServiceOrderProxy.GetServiceOrdersCompletedEventArgs>(client_GetServi private double deg2rad(double deg) unassignedFilter.Criteria = "=''"; { • Assigned to ceOrdersCompleted); nobody { var unassignedFilters = = serviceOrder.Distance new ServiceOrderCardRef.ServiceOrderCard_Filter[] { client.GetServiceOrdersAsync(App.Settings.UserName, App.Settings.Password); return (deg * Math.PI / 180.0); unassignedFilter }; } – Builds and returns ServiceOrderProxyClass collection CalculateDistance(CurrentLocation.Latitude, CurrentLocation.Longitude, } var unassignedOrders = serviceOrderService.ReadMultiple(unassignedFilters, null, 0); • With Customer info read from Customer Card serviceOrder.Latitude, serviceOrder.Longitude, unit); this.All.Add(serviceOrder); var serviceOrders = new ServiceOrder[myOrders.Length + unassignedOrders.Length]; • Phone } for (int i = 0; i < UpdateCollections(); myOrders.Length; i++) } serviceOrders[i] = ServiceOrder.CreateServiceOrderClass(myOrders[i], – Calculate distance from current location to each service location customerCardService.Read(myOrders[i].Customer_No)); – Update Collections (assigned, prioritized,i++) for (int i = 0; i < unassignedOrders.Length; closest) serviceOrders[i + myOrders.Length] = ServiceOrder.CreateServiceOrderClass(unassignedOrders[i],
  • 30. Accept Service Order Firewall Service Bus Proxy NAV Service Tier
  • 31. Accept Service Order public bool AcceptServiceOrder(string username, string • Phone password, string no) { var service = new ServiceOrderRef.ServiceOrder(); – Ask user if he wants to accept the void client_AcceptServiceOrderCompleted(objectService Order Authenticate(service, username, password); sender, ServiceOrderProxy.AcceptServiceOrderCompletedEventArgs e) { – serviceOrderService = new var Invoke AcceptServiceOrder in Proxy through Web Services Deployment.Current.Dispatcher.BeginInvoke(() => ServiceOrderCardRef.ServiceOrderCard_Service(); • Proxy { void acceptAction_Click(object sender, EventArgs e)password); Authenticate(serviceOrderService, username, if (e.Result) { – serviceOrder = you want to accept this Service Order?", "Accept", if{(MessageBox.Show("Do serviceOrderService.Read(no); through Web Services var Read the Service Order from the Card Page MessageBoxButton.OKCancel) == MessageBoxResult.OK) you!"); MessageBox.Show("ServiceOrder is now assigned to if (!string.IsNullOrEmpty(serviceOrder.Assigned_User_ID)) { this.AssignedToMe = true; } –client =false; Order is assigned already – return false return Service If the App.GetServiceOrderProxyClient(); varserviceOrder.Assigned_User_ID = service.GetMyUserID(); else client.AcceptServiceOrderCompleted += – try Set the Assigned_User_ID MessageBox.Show("ServiceOrder was already assigned to someone else"); new { App.ViewModel.LoadData(); EventHandler<ServiceOrderProxy.AcceptServiceOrderCompletedEventArgs>(client_AcceptServi – serviceOrderService.Update(ref serviceOrder); ceOrderCompleted); Service Order again – if error – return false Write the UpdateApplicationBarButtons(); return true; }); } } • Phone client.AcceptServiceOrderAsync(App.Settings.UserName, App.Settings.Password, this.Servi catch ceOrder.No); { } – return false; Display message and refresh data } } }
  • 32. Change Service Order Status Firewall Service Bus Proxy NAV Service Tier
  • 33. Change Service Order Status public void ChangeServiceOrderStatus(string username, string password, string • Phone no, string statusStr) { var– Change status on = new ServiceOrderCardRef.ServiceOrderCard_Service(); serviceOrderService Service Order internally Authenticate(serviceOrderService, username, password); – Invoke ChangeServiceOrderStatus in Proxy through Web Services var status = (Status)Enum.Parse(typeof(Status), statusStr.Replace(' • Proxy ', '_'),void ChangeServiceOrderStatus(ServiceOrderProxy.ServiceOrder private true); serviceOrder, string serviceOrderService.Read(no); var serviceOrder = status) { serviceOrder.Status = status; – Read Service Order from the Card Page through Web Services serviceOrderService.Update(ref serviceOrder.Status = status; serviceOrder); } var client = App.GetServiceOrderProxyClient(); – Set the Status client.ChangeServiceOrderStatusAsync(App.Settings.UserName, App.Settings.Password, – Update Starting Date/Time or Finishing Date/Time if necessary serviceOrder.No, status); } – Write the Service Order again
  • 34. Capture and Upload Image Firewall Storage Service Bus Proxy NAV Service Tier
  • 35. Capture and upload Image void cameraTask_Completed(object sender, PhotoResult e) ... • Delay’s Blog {CameraCaptureTask cameraTask; ... (e.TaskResult == TaskResult.OK) if { – http://blogs.msdn.com/b/delay/ cameraTask = new CameraCaptureTask(); void// Using WriteableBitmap's SaveJpeg to resize PutBlobAction(Stream s, byte[] photo) cameraTask.Completed += new EventHandler<PhotoResult>(cameraTask_Completed); – Blob API for Windows Phone {...var bitmapImage = new BitmapImage();7 bitmapImage.SetSource(e.ChosenPhoto); s.Write(photo, 0, photo.Length); } • Ms-PL (http://opensource.org/licenses/ms-pl.html) voidvar bitmap = new WriteableBitmap(bitmapImage); cameraAction_Click(object sender, EventArgs e) { var ms = new MemoryStream(); { } • Phone voidbitmap.SaveJpeg(ms, 1024,camera0, 90); the picture cameraTask.Show(); //shows 768, to take PutBlobCompleted() var photo = ms.ToArray(); Deployment.Current.Dispatcher.BeginInvoke(() => // – Capture Image Upload photo AttachServiceOrderImage(this.ServiceOrder, blobInfo.Name)); } blobClient = new – Resize image AzureBlobStoreClient(AzureStorageAccountName, AzureStoragePrimaryAccessKey, "image s"); private void PutBlobFailed(Exception ex) { • to save time when uploading blobInfo = new BlobInfo(Guid.NewGuid().ToString()); Deployment.Current.Dispatcher.BeginInvoke(() (s)MessageBox.Show("No photo), blobClient.PutBlob(blobInfo, photo.Length, => => PutBlobAction(s, – Upload connectivity.”)); image (ex) => PutBlobFailed(ex)); PutBlobCompleted, to Azure Storage } } }
  • 36. Attach Image / Note Firewall Storage Service Bus Proxy NAV Service Tier
  • 37. Attach Image / Note AttachServiceOrderImage(No : Code[20];Image : Text[40]) ServiceOrderImage.INIT; • Phone ServiceOrderImage."Document No." := No; ServiceOrderImage."Image ID" := Image; ServiceOrderImage.INSERT(TRUE); – Invoke AttachServiceOrderImage/Note in Proxy through Web Services with Uri to Azure Storage blob or note AttachServiceOrderNote(No : Code[20];Note : Text[250]) ServiceHeader.GET(ServiceHeader."Document Type"::Order, No); – Display message box when RecRef.GETTABLE(ServiceHeader); image uploaded RecordLink.INIT(); • Proxy RecordLink.Type := RecordLink.Type::Note; privatevoid AttachServiceOrderImage(string username, string password, string public void AttachServiceOrderImage(ServiceOrderProxy.ServiceOrder Save_Click(object sender, EventArgs e) RecordLink.Created := CURRENTDATETIME; serviceOrder, string ID" := USERID; { RecordLink."User blobName) no, string blobName) { var – InvokeApp.GetServiceOrderProxyClient(); in NAV Codeunit through Web client = AttachServiceOrderImage/Note RecordLink.URL1 := 'dynamicsnav://freddyk- var client ==App.GetServiceOrderProxyClient(); service new ServiceOrderRef.ServiceOrder(); Services with Uri or notepassword); appfabr:7047/DynamicsNAV/'+COMPANYNAME+'/runpage?page=5900&pers client.AttachServiceOrderImageCompleted += client.AttachServiceOrderNoteAsync(App.Settings.UserName, App.Settings.Password, ID, Authenticate(service, username, onalization=5900&'+ new this.textBox1.Text); service.AttachServiceOrderImage(no, blobName); • NAV EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_AttachServiceOrder } NavigationService.GoBack(); 'bookmark='+FORMAT(RecRef.RECORDID,0,10)+'&mode=edit'; ImageCompleted); } RecordLink.Description := 'Service Order - '+No; – Insert Image := in ServiceOrderImage Table or password, string public void AttachServiceOrderNote(string username, string add note to RecordLink RecordLink.Company Uri COMPANYNAME; client.AttachServiceOrderImageAsync(App.Settings.UserName, App.Settings.Password, ser no, RecordLink."Record ID" := RecRef.RECORDID; string note) table viceOrder.No, blobName); { CLEAR(RecordLink.Note); } var service '+Note; Note := ' = new ServiceOrderRef.ServiceOrder(); Authenticate(service, username, password); Note[1] := STRLEN(Note)-1; void client_AttachServiceOrderImageCompleted(object service.AttachServiceOrderNote(no, note); NoteText.ADDTEXT(Note); sender, System.ComponentModel.AsyncCompletedEventArgs e) } RecordLink.Note.CREATEOUTSTREAM(NoteStream); { NoteText.WRITE(NoteStream);
  • 38. Download and display image Firewall Storage Service Bus Proxy NAV Service Tier
  • 39. Download and display image public class AzureStorage {• NAV string AccountName; – Create .net string AccessKey; class AzureStorage • Using AccountName and AccessKey public AzureStorage(string AccountName, string AccessKey) { • Wrapper AccountName; this.AccountName =for AzureBlobStoreClient (Delay’s Blog) this.AccessKey = AccessKey; – Download OnAction() <Action1170000001> - all blobs for a specific Service Order to the Service Tier } AzureStorage := – Use GetBlob(string to show images name, Client AzureStorage.AzureStorage(AzureStorageAccountName, AzureStorageAccessKey); public void File.Download container, string on the string filename) ServiceOrderImage.SETRANGE(ServiceOrderImage."Document No.", "No."); { IF NOT ServiceOrderImage.FIND('-') THEN EnsureContainerIsCreated(container); BEGIN var blobClient = new AzureBlobStoreClient(AccountName, AccessKey, container); MESSAGE('No Images attached'); var blobInfo = new BlobInfo(name); END blobClient.GetBlob(blobInfo, (s) => GetBlobAction(s, filename)); ELSE REPEAT } AzureStorage.GetBlob('images', ServiceOrderImage."Image ID", TEMPORARYPATH+ServiceOrderImage."Image ID"+'.jpg'); ... toFile := ServiceOrderImage."Image ID"+'.jpg'; FILE.DOWNLOAD(TEMPORARYPATH+ServiceOrderImage."Image ID"+'.jpg', 'Service Order Image','', '', toFile); UNTIL ServiceOrderImage.NEXT = 0;
  • 40.
  • 41. More info • Will soon be published on: – http://blogs.msdn.com/b/freddyk • Related info: – Vjeko’s blog (navigateintosuccess.com) – Waldo’s blog (www.waldo.be) – Mibuso – Dynamicsuser.net – ... 44
  • 43. Thanks to • Diamond Sponsors • Gold Sponsors

Editor's Notes

  1. Key Characteristics:On-demand self-service. A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed without requiring human interaction with each service’s provider. Standard network access. Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, laptops, and PDAs).Location independent resource pooling. The provider’s computing resources are pooled to serve all consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand. The customer generally has no control or knowledge over the exact location of the provided resources. Examples of resources include storage, processing, memory, network bandwidth, and virtual machines.Rapid elasticity. Capabilities can be rapidly and elastically provisioned to quickly scale up and rapidly released to quickly scale down. To the consumer, the capabilities available for rent often appear to be infinite and can be purchased in any quantity at any time.Pay per use.Capabilities are charged using a metered, fee-for-service, or advertising based billing model to promote optimization of resource use. Examples are measuring the storage, bandwidth, and computing resources consumed and charging for the number of active user accounts per month. Clouds within an organization accrue cost between business units and may or may not use actual currency.
  2. 1. Speed to ValueProbably the most important advantage of Cloud Computing is its ability to deploy live applications rapidly without the traditional procurement and deploy-ment cycles required to get an application into production. In pilots for our clients, we have reduced deployment times by up to seventy percent.2. FlexibilityAzure has a massive capacity, allowing for easy flex up (and down) of application workload. This flexibility opens the door to solutions not previously possible: we now can develop a hybrid approach in which you maintain fixed compute capacity in Capgemini or your own data centers while using the cloud to cope with spikes.3. Cost ReductionThe shared use of Cloud Computing infrastructure yields unmatched economies of scale in data center delivery. Speed of deployment combined with a pay-as-you-go approach means much lower costs compared to traditional models.4. CapEx AvoidanceWith a pay-per-use pricing model free of upfront investment in servers or other hardware and software, this service allows IT spending to be shifted from capital to operational expenditure and reduces barriers to adoption. Barriers to exit are also eliminated as it is possible to switch off projects and applications at any time. With up to 80% of enterprise IT budgets spent on maintenance, you can free up funding for other areas.5. Cross organizational collaboration6. Greener ITThe compute density, optimization, and capacity utilization of the cloud is much higher than that of traditional data centers. Cloud Computing represents a way today to provide compute capacity to enterprises concerned about energy efficiency and reducing carbon emissions.
  3. Windows Phone app: Settings.cs https://ifactoclouddemo.servicebus.windows.net/https/ServiceOrderProxy/
  4. Please do not delete thisslide – On Screen whenpresentationended.