AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 16.01.2010, 18:07   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
Arijit Basu: AX on Cloud 9
Источник: http://daxguy.blogspot.com/2010/01/ax-on-cloud-9.html
==============

Lately there has been a lot of activity related to cloud computing with introduction of Windows AZURE. It truly is an interesting technology providing businesses wider opportunities. Well I decided to explore AZURE a bit and did a small POC on AX integration with AZURE. Well I hit on many roadblocks but was able to overcome them. In my POC I have created a simple WCF service on AZURE Platform and I'm calling that service from AX. The steps are as follows:

1. Setup and configure the AZURE Development prerequisites.
AZURE Account can be obtained at http://windows.azure.com
AZURE Getting Started http://www.microsoft.com/windowsazure/getstarted/
It is important you download the AZURE Platform Training Kit from MSDN. Really helpful.

2. Create the AZURE WCF Service using Visual Studio 2008 or 2010.
I created a very simple service which accepts employee code and returns the credit rating.


When I went to deploy the service, I got an error and on further investigating I found that SQL Express is required . I was on SQL 2008. Well there is a workaround for this in case you are on SQL 2008. Open AZURE SDK Command Prompt and key in the following as shown and press enter. This will allow you to use SQL Server 2008 for your AZURE Developments.
DSInit /sqlInstance:. /forceCreate





3. Deploy the Service on the Cloud.
Use the demos and the instruction in AZURE Platform Training Kit to deploy the service in the cloud in the Production instance.


My service was called http://daxguy.cloudapp.net/Service1.svc (My Local Service was http://localhost:50026/Service1.svc)
Browse the service by providing the service name on your browser. You will be able to see the service.


One important thing to notice here is that service name marked above in red.
svcutil.exe http://rd00155d3414bb:20000/Service1.svc?wsdl
This is something which will give you issues when you want to generate proxy using wcftestclient or svcutil and also with Dynamics AX :-). There is a hotfix available from Microsoft KB971842 . I could however not use this hotfix as I got an error while trying to install. Im on WIN 2008. Nevertheless the show must go on. My service was up in the cloud and I needed to now access it from AX.

4. Consume the service from AX 2009.
As with general wsdl files, in AX when you go to add a service reference using http://daxguy.cloudapp.net/Service1.svc, you will get an error as shown. There is a issue with AZURE wcf services and proxy generation :-(


Well the workaround is to use your local service http://localhost:50026/Service1.svc to generate the proxy in AX 2009 and then configure the Service Reference using the MS WCF Service Configuration editor to change the service reference. See the screenshot below.



This will change the config file in the Service References folder in your AX 2009 Application Instance folder.
Now write some code to call the service. I created a small form where I pass an employee code and get the credit rating of the employee. Just to be on the safe side, I shut down my local IIS server just to ensure that I was really referring to the cloud.


The code sample is as follows in AX 2009.



And it was working. Really cool. I was consuming a AZURE WCF Service from Dynamics AX. There is a lot of potential in this. Maybe in next generation AIF , developers will be able to generate Cloud AIF directly from AX :-).
I had also created a Windows Application to test this out in similar ways and it worked nicely.


Happy *#**#**#**#**#**#* :-)










Источник: http://daxguy.blogspot.com/2010/01/ax-on-cloud-9.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Arijit Basu: AX 2009 Document Management & MOSS / WSS Blog bot DAX Blogs 0 23.01.2009 01:07
Arijit Basu: AX 2009 Documents Blog bot DAX Blogs 0 30.08.2008 13:05
Arijit Basu: AX 2009 - Quick Overview Blog bot DAX Blogs 4 19.05.2008 14:47
Arijit Basu: Reporting & BI in AX: An Overview [Level 100] Blog bot DAX Blogs 0 07.01.2008 16:01
Dynamics AX: Microsoft Dynamics AX (DAX): Known Issues when upgrading to Microsoft Dynamics™ AX 4.0 - Arijit Basu | AX MVP Blog bot DAX Blogs 0 31.05.2007 03:30

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 07:01.