Sei sulla pagina 1di 14

LS Ret ail Mob ile In vent or y

Sup p or t Not es

Copyright 2012, LSRetail ehf. All rights reserved. All trademarks belong to their respective holders.
Cont ent s
1 Intr oduction ............................................................................................................................... 1
2 Pr e-r equir ements..................................................................................................................... 1
3 Connect to NAV web ser vice fr om your desktop machine ......................................... 2
4 Connect to NAV web ser vice fr om the mobile device .................................................. 4
5 Mobile Inventor y application on the mobile device .................................................... 6
6 Tips ................................................................................................................................................ 7
7 Er r or s encounter ed ................................................................................................................. 9
8 Emulator installation on Windows 7 ...............................................................................11
9 Emulator installation notes for Vir tualBox 4.2.0 ........................................................12

Revision Hi st or y

No. Date Changes Changes


1.0 17.08.2012 First version

LS Retail ehf.
Katrnartn 2, 105 Reykjavk, Iceland
Tel: +354 414 5700 Fax: +354 571 2728
LS Retail Mobile Inventory Support Notes

1 Int r od uct ion


This support note describes the best approach to install the Mobile Inventory
Application version 1.0.1 (SP1) and above. It covers the client and server configuration
so that the Mobile Inventory application and the NAV web service can communicate
successfully. This is not a guide on how the Mobile Inventory application and LS Retail
NAV 6.4 are designed or how they function.

Download the latest version of LS Retail NAV from http:/ / partners.lsretail.com and
extract the file LS Retail NAV 6.4 Part 4 Other.exe to a local folder and locate the
mobile application files.

2 Pr e-r equ i r em ent s


Install the latest LS Retail demo company, for example: CRONUS LS 2009
(6.4)W1 Demo v10 - this demo company will be used as we connect to it from
the Mobile Inventory application and test programs.
Read the LS Retail Mobile Inventory 2012 - Install and Quick Guide.pdf
Make sure you have the Windows Mobile Device Center installed and that you
are able to connect from your desktop to the mobile device via USB cable.

This support note assumes that the mobile device is connected to a windows desktop
machine via USB cable. It does not cover why you cannot connect to the NAV web
service over the wireless network. The mobile device can be replaced with a Windows
Mobile 6 Emulator.

Chapter 1 - Introduction 1
LS Retail Mobile Inventory Support Notes

3 Connect t o NAV w eb ser vice f r om your d esk t op


m achi ne
Before any installation on the mobile device takes place you should try from your
desktop machine to connect and retrieve data from the NAV web service. Unzip the
TestNavWs.zip file and run TestNavWs.exe from your desktop.

.Net 4.0 must be installed on your desktop.


Enter the NAV user name and password.
o This password should NOT be encrypted using the
MobileInventoryGenerator.exe.
Enter the URL to the NAV web service. This URL should be the same as in the
Web Service Setup.

Chapter 3 - Connect to NAV web service from your desktop machine 2


LS Retail Mobile Inventory Support Notes

This test application sends and retrieves data from NAV in XML format. You can
change the values in the XML request body without breaking anything.
Select a few different web calls and retrieve the data from NAV.
o At star tup the Mobile Inventor y application uses the
IM_TEST_CONNECTION, IM_GET_SETUP_DATA and
IM_GET_WORK_DATA. So it is a good idea to test them.
The Display xml response check box can be unchecked when you do not want
to retrieve megabytes of data into the response textbox.

This test application can also be helpful when checking the data returned from NAV
since it uses exactly the same web methods and xml data structure as the Mobile
Inventory application.

Chapter 3 - Connect to NAV web service from your desktop machine 3


LS Retail Mobile Inventory Support Notes

4 Connect t o NAV w eb ser vice f r om t he m ob ile d evice


Before you install the LSRetailMobileInventory.CAB you should run the
TestNavWsDevice program from the device. Unzip the TestNavWsDevice.zip file on
your desktop machine. Change the following values in the app.config file.

<add key="BOWebSer viceURL" value =


"http:/ / 172.22.17.76:7047/ / DynamicsNAV/ WS/ CRONUS_LS_64_W1_DemoV10/ Codeun
it/ RetailWebServices"/ >

<add key="BOWebSer viceUser Name" value="NavUsername"/ >


<add key="BOWebSer viceDomain" value=""/ >
<add key="BOWebSer vicePasswor d" value="navPlainPwd"/ >
Notice that the BOWebServiceURL is simply the encoded URL
http:/ / 172.22.17.76:7047/ DynamicsNAV/ WS/ CRONUS LS 2009 (6.4)W1 Demo
v9/ Codeunit/ RetailWebServices

The password should NOT be encrypted using the MobileInventoryGenerator.exe. Copy


the contents of the zip file to the mobile device (including the updated app.config file).

Run the TestNavWsDevice.exe on the mobile device.

The TestNavWsDevice.exe should return SUCCESS or a meaningful connection error


message. Success means that it could connect to NAV web service. Look at the XML
response code. I should be 0000 and no error text. You can have a SUCCESS but an
er r or r etur ned fr om NAV in the r esponse code. That simply means that youve
connected to NAV but it is responding with an error.

Chapter 4 - Connect to NAV web service from the mobile device 4


LS Retail Mobile Inventory Support Notes

Mobile devices are more sensitive to the URL encoding, so you may need to encode
every special character in the URL on a device even if the same URL works fine on a
desktop machine.
For example, this URL without encoding works on a desktop machine but may not on a
mobile device
http:/ / 172.22.17.76:7047/ DynamicsNAV/ WS/ CRONUS LS 2009 (6.4)W1 Demo -
9/ Codeunit/ RetailWebServices

Encode the URL properly and it will work on a mobile device


http:/ / 172.22.17.76:7047/ DynamicsNAV%2fWS%2fCRONUS%20LS%202009%20%28
6%2E4%29W1%20Demo%20%2D9%2fCodeunit%2fRetailWebServices

Notice that you need to encode every special character. For example, if you do not
encode the period . then your mobile device may not be able to connect to NAV.
Keep the URL as simple as possible, no special characters like ().- although blank
spaces seem to work fine on a mobile device.

Note that our applications use the .Net Compact Framework 3.5 so if the device/ emulator
does not have it installed then download it from http:/ / www.microsoft.com/ en-
us/ download/ details.aspx?id=65 and install it on device/ emulator.
The Mobile inventory Application uses SQL Server compact 3.5 so if the device/ emulator
does not have it installed then download it from http:/ / www.microsoft.com/ en-
us/ download/ details.aspx?id=12264 and install on device/ emulator.

Chapter 4 - Connect to NAV web service from the mobile device 5


LS Retail Mobile Inventory Support Notes

5 Mob ile Inv ent or y app licat ion on t he m ob ile d evice


Now that both the test programs have successfully connected to the NAV web service
there should not be any problems connecting from the Mobile Inventory application to
the NAV web service.
Install the Mobile Inventory Application as described in LS Retail Mobile Inventory
2012 - Install and Quick Guide.pdf
Note that at startup the Mobile Inventory application synchronizes with NAV using the
IM_TEST_CONNECTION, IM_GET_SETUP_DATA and IM_GET_WORK_DATA web methods. If
the sync fails you know that one of those failed.

Mobile Inventor y Application displaying er r or s?


To debug the Mobile Inventory application you need to know what the application is
doing.
All errors are written to the LogTable in a local database file.
o Located under the Data folder, Data\ MobileInventory.sdf
o This is a SQL Server Compact Edition version 3.5
o To view it, copy the Data\ MobileInventory.sdf to your desktop.
Download a database viewer like Compactview
(http:/ / sourceforge.net/ p/ compactview/ home/ Home/ ) and look at the
LogTable.
Errors that cannot be written to the local database are written to a text file.
o The file is called "HHInventoryLog.txt" located in the same folder as the
exe.
o If the sqlce.wce5.armv4i.CAB was not installed you will see all the errors
in this file.
You can make the application write traces to the LogTable so you can see what
code is being executed. Simply set the LogLevel to 1 in the app.config file and
restart the application.
o <add key="LogLevel" value="1"/ >
In extreme cases you can view the XML requests and responses between NAV
and the Mobile Inventory application. Set the LogLevel to 0 (zero) in the
app.config file and restart the application. This will also write traces and error
to the LogTable.
o <add key="LogLevel" value="0"/ >
o All the requests are saved as xml to a file called HHXmlRequest.txt.
o Not all the responses are saved to the HHXmlRequest.txt file, for example
the master data response is not saved since the size of the response can
be very large.
Remember to set the Loglevel back to 2 once debugging is done.
Otherwise the disk may fill up quickly.

Chapter 5 - Mobile Inventory application on the mobile device 6


LS Retail Mobile Inventory Support Notes

6 Tip s
There is a great tool called myMobiler (http:/ / mymobiler.com/ ?cat=4) that allows you
to remote display a mobile device from your desktop. Simply connect via USB using
Windows Mobile Device Center and you can control the mobile device remotely.

If you ar e having pr oblems connecting to the NAV web ser vice:


On the NAV server make sure the web service is up and running.
o c:\ netstat.exe -na
and make sure that the ip address and port (7047) are Listening
o To start the NAV web service ..

o Make sure the windows firewall is not blocking the port


o \ Microsoft Dynamics NAV\ 60\ Service\ CustomSettings.config file is
pointing to the correct server.
o NAV windows services must be restarted after changes
o
o Ipv6 may need to be disabled (if everything else fails look at this)
From your client, try to make a connection to NAV web service
o c:\ telnet.exe 172.100.77.10 7047
to enable telnet client on win 7, www.fettesps.com/ windows-7-enable-
telnet

You should be able to connect to the NAV web service URL with inter net explorer (also
from the mobile device browser). Internet explorer should prompt you for the
username and password.

Search for items in a worksheet. Check how the search if performed against the NAV
server. For example, if Positive Adjustments search returns nothing it is probably
because the Search for Item by is set to None. Change it and restart the application.

Chapter 6 - Tips 7
LS Retail Mobile Inventory Support Notes

Chapter 6 - Tips 8
LS Retail Mobile Inventory Support Notes

7 Er r or s encount er ed

Er r or Solution
<?xml version="1.0" encoding="utf-8"
standalone="no"?> Check if the LS Retail Toolbox has been
<Response><Request_ID>IM_GET_MASTER_DATA</ R installed. Under Tools/ Custom Controls
equest_ID><Response_Code>0099</ Response_Code> look for the LS Retail controls. If not found
<Response_Text>This message is for C/ AL install from it from
programmers: Unable to create an instance of \ Setup\ LS Retail Toolbox 6.4
Automation Server {4632654B-DAEC-4087-A7E7- \ Setup\ LS Retail ToolboxRTC 2.02
F97308E24BEB} with CLSID = 4632654b-daec-4087-
a7e7-f97308e24beb Retrieving the COM class factory
for component with CLSID {4632654B-DAEC-4087-
A7E7-F97308E24BEB} failed due to the following
error: 80040154..</ Response_Text></ Response>

Same error as above.. LS Retail Toolbox must be installed on the


This message is for C/ AL programmers: Unable to machine where the NAV web service is
create an instance of Automation Server {4632654B- running
DAEC-4087-A7E7-F97308E24BEB} with CLSID =
4632654b-daec-4087-a7e7-f97308e24beb Retrieving \ Setup\ LS Retail Toolbox 6.4
the COM class factory for component with CLSID \ Setup\ LS Retail ToolboxRTC 2.02
{4632654B-DAEC-4087-A7E7-F97308E24BEB} failed
due to the following error: 80040154

NavNCLChangeListenerConnectionFailedException The key DatabaseName in


NAV Server cannot connect to ChangeListener to SQL CustomSettings.config file must point to
Server the database where the company resides.

\ Microsoft Dynamics
NAV\ 60\ Service\ CustomSettings.config

MissingMethodException. Could not load type xxx Make sure the .Net Compact Framework
from assembly xxxx,. 3.5 and SQL Server compact 3.5 are
installed on device/ emulator

Chapter 7 - Errors encountered 9


LS Retail Mobile Inventory Support Notes

Chapter 7 - Errors encountered 10


LS Retail Mobile Inventory Support Notes

8 Em ulat or in st al lat ion on Wind ow s 7


If you do not have Visual Studio 2008 installed you can install and use the standalone
Windows Mobile 6 Emulator by following these instructions. The emulator was
successfully installed on a Windows 7 machine by following these 3 steps.
1. Install the emulator and image
http:/ / www.microsoft.com/ en-us/ download/ details.aspx?id=16182 (download
professional version)
2. Install the Virtual PC so you can get network connection from the emulator
http:/ / www.microsoft.com/ en-us/ download/ details.aspx?id=24439
3. Install the Windows Mobile Device Center 6.1 (needed to copy CAB file to
emulator)
http:/ / www.microsoft.com/ en-us/ download/ details.aspx?id=3182
4. Install the device emulator make sure you choose 64 bit for 64 bit machines.
This allows you to cradle the emulator.
http:/ / www.microsoft.com/ en-us/ download/ details.aspx?id=5352
5. Install all the software like you would with a device. That includes sqlce and .Net
3.5

Helpful links:

Connect from the emulator to the internet with internet explorer (www.google.com).
Read these articles to configure the emulator so it can connect to the network.

Installing the emulator and access to network.


http:/ / blogs.technet.com/ b/ exchange/ archive/ 2007/ 09/ 17/ 3403937.aspx

Help with network access on emulator.


http:/ / betterthaneveryone.com/ archive/ 2008/ 08/ 31/ getting-network-access-on-the-
windows-mobile-emulator.aspx

SUCCESS !

Chapter 8 - Emulator installation on Windows 7 11


LS Retail Mobile Inventory Support Notes

9 Em ulat or in st al lat ion not es f or Vir t ualBox 4.2.0

Installation for emulator on VirtualBox is the same as above Windows 7 installation


steps.
Installation files used for VirtualBox setup.
VirtualBox 4.2.0.virtual machine
o VirtualBoxSDK-4.2.0-80737.zip (VirtualBox-4.2.0-80737-Win.exe)
VitualBox Guest Additions 4.2.0
o VBoxGuestAdditions_4.2.0.iso (for shared folder between guest and
host)

Operating System installed on Virtalbox.


Windows 7 Professional 64bit and Service Pack 1

Files used for successful installation of LS Retail Mobile Inventory on VirtualBox.

Microsoft Virtual PC
o vpc-64setup.exe
Mobile Device Center
o drvupdate-amd64.exe
Device Emulator
o vs_emulator_x64_vista.exe
Emulator Images (different device screen sizes )
o Windows Mobile 6.1 Professional Images (USA).msi

Now you should configure Device Emulator network settings on device itself and cradle
in Device Emulator Manager.

Files that must be installed on the Emulator prior to installing LS Retail Mobile
Inventory are listed here below. Create shared folder in Virtualbox (this option is
installed with VirtualBox Guest Additions), copy these files to shared folder, open Mobile
Device Center and open browse mobile device and copy files in to program files folder.
Go to emulator itself and click these files for installation.
.NET framework 3.5 for Windows Mobile
o NETCFv35.wm.armv4i.cab
SQL CE database for Windows Mobile
o sqlce.wce5.armv4i.CAB

Configure Emulator (see installation for Emulator on Windows 7 above if not already
done) copy LSRetailMobileInventor y.CAB to Emulator and run.

This should wor k.

Chapter 9 - Emulator installation notes for VirtualBox 4.2.0 12

Potrebbero piacerti anche