Table of Contents
Introduction ................................................................................................ 3
Running RFID simulation software........................................................................................... 3
Part II: Automated setup of BizTalk RFID with Microsoft Dynamics AX .... 12 Part III: Known issues and workarounds .................................................. 14
Tag length check causes an error ........................................................................................ 14 To remove the tag length dheck in the Contoso provider source code ...................................... 15 A timeout error occurs when starting the Contoso provider .................................................... 15
Introduction
This document describes how to set up Microsoft BizTalk RFID Server for Microsoft Dynamics AX 2009 to run a radio frequency identification (RFID) simulation. The first part of the document provides a detailed overview of the manual setup process and the second part of document provides instructions for applying a script to automate the setup tasks. Part III provides references to known errors and descriptions of solutions to the errors. For an overview of the setup requirements to run Microsoft BizTalk RFID with Microsoft Dynamics AX 2009 or earlier versions, see Setting up Dynamics AX with the Microsoft BizTalk RFID Server.
3. Add an entry for each additional device to simulate. Note Each section should have a unique name, a unique device name, and a unique port number. You do not need to change the IP address.
3 SETTING UP RFID IN DYNAMICS AX 2009
Example:
<section name="DeviceInformation_2"> <entry name="DeviceName">ContosoTestDevice2</entry> <entry name="ConnectionType">TCPIP</entry> <entry name="IpAddress">0.0.0.0</entry> <entry name="PortNumber">6667</entry> <entry name="ProviderId">Contoso</entry> <entry name="NotificationDataFile">ContosoNotificationConfig.xml</entry> <entry name="DeviceTranslatorAssemblyPath">Microsoft.Rfid.Test.ContosoDeviceTranslator.dll</entry> <entry name="DeviceTranslatorConfigFile"></entry> </section>
3. In the File name(s) field in the Add Provider dialog box, type Contoso Provider, and click Browse to locate the file titled Microsoft.Rfid.ContosoDeviceProvider.dll. 4. Click Register to add the provider to BizTalk RFID. 5. Select the Start the Provider check box to start the provider as soon as the Add Provider dialog box closes. 6. Click OK to install the Contoso Device Provider.
2. Select Add single device, and select a provider in the Add Device Wizard. 3. In the Connect using list, select the connection type that BizTalk RFID should use to connect to the device. 4. Provide the remaining connection information for the connection type. For example, if you specified TCP, you need to specify the IP address and port number information of the device. 5. Optionally, you can change the device group that this device should be added under. The default option is RootDeviceGroup, which is the root of the hierarchy. Note Do not specify anything when asked to enter user name and password for authentication. 6. If you do not succeed in creating a connection, select Add device to the RFID server and enter a name in the Name field to activate the device in offline mode.
2. In the Process Name field in New Process dialog box, enter the name of the new process. 3. In the Tag processing mode list, select a mode for the process you are creating. 4. Optionally, in the Description field, type a brief note that describes the new process. 5. Clear the Start Bind Wizard check box.
3. In the Logical Device Name field in the Add Logical Device dialog box, type the name of the new logical device.
4. Click OK to create the device and close the Add Logical Device dialog box. 5. On the Browse tab in the results pane, right-click the logical device, and then click Bind.
6. Select the device groups or devices from Devices and groups to bind to the logical device. 7. Click OK.
3. Click Register in the Add Component dialog box and select the file Microsoft.Rfid.OobComponents.dll file. 4. Note: If the file Microsoft.Rfid.OobComponents.dll file is already registered, an error occurs saying that the file is already registered. Ignore this error and close the windows. 5. Select the SqlServerSinkWithChronologicalReads component in the Add Component dialog box and click Add. 6. Name the instance SQLServerSink, and close the Add Component dialog box to add more new components.
Using the RFID infrastructure with Microsoft Dynamics AX To use the RFID infrastructure with Microsoft Dynamics AX you must be sure that the Contoso device is turned on and that an RFID server in Microsoft Dynamics AX is synchronized with the RFID infrastructure. To start the Contoso device
1. Select the Processes node in RFID Manager. 2. In the Processes pane, right-click the process, and click Start.
Note: To be sure that the status of the Contoso device is Open, right-click the Devices node.
3. If you work in a three-tier architecture, click the General tab, and enter the domain name in the Domain name field. 4. Click Devices and Processes to synchronize with the RFID infrastructure.
"%RFIDINSTALLDIR%\bin\rfidclientconsole.exe" RegisterProvider Contoso Microsoft.Rfid.ContosoDeviceProvider "%RFIDINSTALLDIR%\bin\rfidclientconsole.exe" CopyProviderFile Contoso "%RFIDINSTALLDIR%\bin\Microsoft.Rfid.ContosoDeviceProvider.dll" "%RFIDINSTALLDIR%\bin\rfidclientconsole.exe" StartProvider Contoso "%RFIDINSTALLDIR%\bin\rfidclientconsole.exe" ImportDevices device.xml false true "%RFIDINSTALLDIR%\bin\rfidclientconsole.exe" ImportProcesses processbinding.xml "%RFIDINSTALLDIR%\bin\rfidclientconsole.exe" DeployProcess ContosoTestProcess "%RFIDINSTALLDIR%\bin\rfidclientconsole.exe" StartProcess ContosoTestProcess
An XML file titled device.xml that contains the device information. For example, if the name of the device is ContosoTestDevice, the name of the provider is Contoso, the type of connection is TCP, the IP address is 127.0.0.1, and the port is 6666, the XML file will be as shown below:
<ArrayOfDeviceComplete xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MS.Internal.Rfid.ClientUtilities"> <DeviceComplete> <m_deviceDefinition xmlns:d3p1="http://schemas.datacontract.org/2004/07/Microsoft.SensorServices.Rfid.Design"> <d3p1:authenticationInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/Microsoft.SensorServices.Rfid.Dspi" i:nil="true" /> <d3p1:deviceInformation> <connectionInformation xmlns="http://schemas.datacontract.org/2004/07/Microsoft.SensorServices.Rfid.Dspi"> <provider>Contoso</provider> <transportSettings i:type="TcpTransportSettings"> <m_vendorSpecificData xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" /> <host>127.0.0.1</host> <port>6666</port> </transportSettings> </connectionInformation> <providerData xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Microsoft.SensorServices.Rfid.Dspi" /> </d3p1:deviceInformation> <d3p1:name>ContosoTestDevice</d3p1:name> </m_deviceDefinition>
<m_propertyProfile xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.IO.SensorServices.Rfid.Client" i:nil="true" /> <m_sourcePropertyProfile xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" /> </DeviceComplete> </ArrayOfDeviceComplete>
An XML file called ProcessBinding.xml that contains information about the process and binding. For example, if the name of the device is ContosoTestDevice, the name of the process is ContosoTestProcess, the name of the logical device is mylogicaldevice, and the name of the component instance is SQLServerSink, the XML file will be as shown below:
<ArrayOfProcessComplete xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MS.Internal.Rfid.ClientUtilities"> <ProcessComplete> <m_processBinding xmlns:d3p1="http://schemas.datacontract.org/2004/07/Microsoft.SensorServices.Rfid.Design"> <d3p1:ComponentBindingsForXml xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /> <d3p1:ErrorPercentageThreshold>0</d3p1:ErrorPercentageThreshold> <d3p1:MaxComponentInitializationTime>600000</d3p1:MaxComponentInitializationTime> <d3p1:MaxHungEvents>0</d3p1:MaxHungEvents> <d3p1:SingleEventProcessingTimeout>60000</d3p1:SingleEventProcessingTimeout> <d3p1:deviceBindings xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringDeviceBinding_Pyox4B_P_S> <d4p1:Key>mylogicaldevice</d4p1:Key> <d4p1:Value> <d3p1:RegexCollectionForXml /> <d3p1:deviceGroupList /> <d3p1:deviceList> <d4p1:anyType xmlns:d8p1="http://www.w3.org/2001/XMLSchema" i:type="d8p1:string">ContosoTestDevice</d4p1:anyType> </d3p1:deviceList> <d3p1:sourceBindingList /> </d4p1:Value> </d4p1:KeyValueOfstringDeviceBinding_Pyox4B_P_S> </d3p1:deviceBindings> </m_processBinding> <m_rfidProcess xmlns:d3p1="http://schemas.datacontract.org/2004/07/Microsoft.SensorServices.Rfid.Design"> <d3p1:description i:nil="true" /> <d3p1:logicalSource> <d3p1:componentList> <d3p1:EventHandlerDefinition> <d3p1:componentName>SqlServerSink</d3p1:componentName> <d3p1:eventHandlerInfo> <d3p1:assembly>Microsoft.Rfid.OobComponents, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</d3p1:assembly> <d3p1:className>Microsoft.SensorServices.Rfid.ProcessComponents.SqlServerSink</d3p1:class Name> <d3p1:description i:nil="true" /> </d3p1:eventHandlerInfo> </d3p1:EventHandlerDefinition> </d3p1:componentList> 13 SETTING UP RFID IN DYNAMICS AX 2009
<d3p1:logicalDeviceList> <d3p1:LogicalDevice> <d3p1:description>all the devices that I am interested in</d3p1:description> <d3p1:name>mylogicaldevice</d3p1:name> </d3p1:LogicalDevice> </d3p1:logicalDeviceList> <d3p1:logicalSourceList /> </d3p1:logicalSource> <d3p1:messageHandlingReliability>Transactional</d3p1:messageHandlingReliability> <d3p1:name>ContosoTestProcess</d3p1:name> </m_rfidProcess> </ProcessComplete> </ArrayOfProcessComplete>
2. Click Start and then Run and type cmd to open the Command Prompt window. 3. Go to the directory where you saved the three files, setup.cmd, device.xml, and processbinding.xml. 4. Type setup.cmd and press ENTER. The following activities take place: Loads the provider, ContosoProvider, by using RFID Client Console from the following location: C:\Program Files\Microsoft BizTalk RFID \bin\ Microsoft.Rfid.ContosoDeviceProvider.dll file. Imports a device to the root device group from the device.xml file by using RFID Client Console. Imports a process from the processbinding.xml file by using RFID Client Console. Imports binding information from the processbinding.xml to the process by using RFID Client Console. Starts the process by using RFID Client Console.
5. Click Start > Programs > Microsoft BizTalk RFID > RFID Manager to open RFID Manager. The following information is displayed. Tip: If RFID Manager is already running, refresh the RFID Manager Console. A new process, ContosoTestProcess, under the Processes node with the status appearing as Started. A new device, ContosoTestDevice, under the Devices node and under the All Devices Group node. A new provider, Contoso, under the Device Providers node.
To remove the tag length dheck in the Contoso provider source code
1. Open the file ContosoReaderLayer.cs under %RFIDINSTALLDIR%Samples\Device Service Provider\Contoso\Contoso Provider Source Code. 2. Comment out the tag length section of the code as follows:
private void handleAsynchronousReadDetect(TagReadEvent tagReadEvent) { //if (tagReadEvent.GetId().Length <= 8) //{ Notification notification = new Notification(tagReadEvent); m_ContosoReader.raiseNotificationEvent(new NotificationEventArgs(notification)); //} //else //{ // //} } logger.Info("invalid tag id " + tagReadEvent.ToString());
Microsoft Dynamics is a line of integrated, adaptable business management solutions that enables you and your people to make business decisions with greater confidence. Microsoft Dynamics works like and with familiar Microsoft software, automating and streamlining financial, customer relationship and supply chain processes in a way that helps you drive business success. U.S. and Canada Toll Free 1-888-477-7989 Worldwide +1-701-281-6500 www.microsoft.com/dynamics
The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, this document should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. 2008 Microsoft Corporation. All rights reserved. Microsoft, the Microsoft Dynamics Logo, Microsoft BizTalk Server, and Windows are either registered trademarks or trademarks of Microsoft Corporation.