Microsoft DYNAMICS NAV 5.0 User Manual

Microsoft DynamicsTM NAV 5.00
Installation & System Management: Commerce Gateway for
Microsoft Dynamics™ NAV
®
5.00
I
NSTALLATION
C
OMMERCE
M
ICROSOFT
& S
YSTEM
G
D
YNAMICS
M
ANAGEMENT
ATEWAY FOR
™ NAV 5.00
:
Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted in examples herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. 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.
© 2007 Microsoft Corporation. All rights reserved.
Microsoft, MS-DOS, Windows, Windows Server, Windows Vista, Application Server for Microsoft Dynamics NAV, AssistButton, C/AL, C/FRONT, C/SIDE, FlowField, FlowFilter, C/SIDE Database Server for Microsoft Dynamics NAV, Microsoft Business Solutions–Navision, Microsoft Dynamics NAV, Microsoft Dynamics NAV Debugger, Navision, NAV ODBC, SIFT, SIFTWARE, SQL Server, SumIndex, SumIndexField are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
All other trademarks are property of their respective owners.
PREFACE
This book is a manual for Microsoft Dynamics™ NAV. It is part of a comprehensive set of documentation and Help materials for Microsoft Dynamics NAV.
The manual describes how to install and maintain the Microsoft Dynamics NAV Commerce Gateway. However, we recommend that the installation and customization process is carried out with the assistance of a Microsoft Certified Business Solutions Partner representative.
Commerce Gateway is a business-to-business solution that opens up Microsoft Dynamics NAV to the electronic exchange of trading documents with other systems.
You should be familiar with the symbols and typographical conventions used in the Microsoft Dynamics NAV manuals. In the list below, you can see how various elements of the program are distinguished by special typefaces and symbols:
Appearance Element
TRL Keys on the keyboard. They are written in small capitals.
C
Address Field names. They appear in medium bold and start with
a capital letter.
Department Names of windows, tables, boxes and tabs. They appear
in medium bold italics and start with a capital letter.
Hansen Text that you must enter, for example: "...enter Yes in this
field." It is written in italics.
fin.flf
File names. They are written with the Courier font and
lowercase letters.

TABLE OF CONTENTS

PART 1 INSTALLING COMMERCE GATEWAY 5.00 FOR BIZTALK SERVER 2006 . . . . . . . 9
Chapter 1 Commerce Gateway 5.00 for BizTalk Server 2006 . . . . . .11
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Installing Commerce Gateway. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Installing Microsoft Dynamics NAV Commerce Gateway Request Server . . 15
Service Packs and Security Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Specifying Security Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Installing Microsoft Dynamics NAV Commerce Gateway Broker. . . . . . . . . . 25
Setting Up Commerce Gateway in +Microsoft Dynamics NAV . . . . . . . . . . . 30
PART 2 APPENDICES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Appendix A Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Description of a Three-Tier Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Transaction of Large Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Table of Contents
Part 1 Installing Commerce Gateway 5.00 for
BizTalk Server 2006
Chapter 1

Commerce Gateway 5.00 for BizTalk Server 2006

This chapter introduces you to Commerce Gateway and contains information about its software requirements and how you install the various components necessary to connect to BizTalk Server 2006.
The chapter contains the following sections:
·Introduction
· Installing Commerce Gateway
· Installing Microsoft Dynamics NAV Commerce Gateway Request Server
· Service Packs and Security Updates
· Specifying Security Settings
· Installing Microsoft Dynamics NAV Commerce Gateway Broker
· Setting Up Commerce Gateway in +Microsoft Dynamics NAV
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006

1.1 Introduction

Commerce Gateway

Commerce Gateway opens up Microsoft Dynamics NAV so that companies can electronically exchange trading documents with their business partners irrespective of each other's conversion requirements and data formats. This exchange of documents means that companies can streamline their business processes and reduce transaction costs. Commerce Gateway also makes it easier for companies to meet the changing demands of their trading partners, regardless of the industry they are in, the system that they use or the standards that their partners require. Commerce Gateway supports the most common trading documents.
Commerce Gateway provides integration with Microsoft BizTalk Server. BizTalk Server is a data and business process integration server, which facilitates e-commerce business processes. It comprises a document interchange engine, a business process execution engine, and a set of tools for managing business documents and the server. There are also tools for managing trading partner relationships as well as tracking transactions.
Commerce Gateway setup and BizTalk administration can be accessed from the IT Administration menu in Dynamics NAV.
For more information about Commerce Gateway, see the Commerce Gateway Training Course and the Dynamics NAV online Help.

BizTalk Server 2006

BizTalk Server 2006 is the latest release of Microsoft’s Business Process Management technology.
The initial introduction of BizTalk Server 2000 demonstrated Microsoft’s early leadership in defining Business Process Management functionality and supporting XML. BizTalk Server 2004 provided feature set refinement and performance enhancements.
BizTalk Server 2006 is Microsoft's premiere server for building solutions for business process and integration. BizTalk Server 2006, the fourth major version of the product, builds on the innovation and success of the previous three versions – BizTalk Server versions 2000, 2002, and 2004.
BizTalk 2006 includes new capabilities and engine improvements that allow a developer to create more flexible solutions for integrated business processes, and BizTalk 2006 empowers and enables administrators and business users to more effectively monitor ongoing business processes.
For more information about BizTalk Server 2006, read the documentation that comes with the product or see the BizTalk Server 2006 Installation and Upgrade Guides.
12

1.2 Installing Commerce Gateway

Planning your Installation

Planning your installation of Commerce Gateway requires more careful consideration than a typical Dynamics NAV installation. This is due to the distributed nature of the product.
Commerce Gateway consists of three key application layers:
• Dynamics NAV clients that communicate with the BizTalk Server. These must have the Commerce Gateway Request Client automation object installed.
• An Application Server for Microsoft Dynamics NAV. This must be correctly configured and must also have the Commerce Gateway Request Client installed.
• A Microsoft BizTalk Server. This must have the Commerce Gateway Request Server installed.
1.2 Installing Commerce Gateway
In addition to the basic components, you must install Visual Studio if you need to edit or modify the BizTalk Server project files.
Security must also be considered, as a typical Commerce Gateway installation exposes a Dynamics NAV system to an external network. Security best practice includes a good firewall but this is not always sufficient protection, especially if the final connection allows access to the Internet. Microsoft has many security tips for networked systems and a thorough review of this material would be valuable to you and your customers.
Commerce Gateway 5.0 for BizTalk Server 2006 architecture:
13
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006

Installation Overview

Commerce Gateway requires that you install several software products on a Windows operating system.
You must also set up certain security information. We strongly recommend that you do these things in the following order:
1 Install SQL Server 2005, Service Pack 1 or later – this will install Microsoft .NET
Framework 2.0 which is a requirement for Commerce Gateway.
2 Install BizTalk Server 2006 – Commerce Gateway can run on the Developer,
Enterprise or Standard edition.
In the last window of the BizTalk Server installation wizard enter a check mark and run the configuration tool.
3 Install Commerce Gateway Request Server
4 Set up security (Windows 2003/BizTalk Server settings)
5 Install the C/SIDE Client for Microsoft Dynamics NAV 5.00 or later
6 Install C/SIDE Database Server for Microsoft Dynamics NAV 5.00
7 Install Application Server for Microsoft Dynamics NAV 5.00
8 Install the Commerce Gateway Broker if you are running more than one NAV
Commerce Gateway can run on either C/SIDE Database Server or on SQL Server. However, even if you only intend to use C/SIDE Database Server, you must still install SQL Server because BizTalk Server depends on SQL Server as this is where, for example, BizTalk Server temporarily stores BizTalk messages.
In this manual we are running SQL Server on Windows Server 2003.
Further Information
Windows Server 2003 or Windows XP, SQL Server 2005, BizTalk Server 2006 and Microsoft .NET Framework 2.0 See Microsoft’s documentation for information
about installing and configuring these products. A Dynamics NAV client running Commerce Gateway can also run on Windows XP.
Application Server for Microsoft Dynamics NAV For installation and setup information, see the manual Installation & System Management: Application Server for
Microsoft Dynamics NAV.
Microsoft Dynamics NAV Client For installation and setup information, see the manual Installation & System Management: C/SIDE Database Server for Microsoft Dynamics NAV.
Application Server (NAS).
14
1.3 Installing Microsoft Dynamics NAV Commerce Gateway Request Server

1.3 Installing Microsoft Dynamics NAV Commerce Gateway Request Server

Commerce Gateway Request Server runs as a standard Windows service that uses Microsoft’s .NET framework. It acts as a proxy server handling the requests from the Dynamics NAV client and passes them to BizTalk Server. It then relays the success or failure of the request to Dynamics NAV.
The Commerce Gateway Request Server setup wizard copies the files to the correct destination and installs and starts the services.
The Commerce Gateway Request Server must be installed on the same computer as BizTalk Server.

Running the Setup Wizard

To run the Commerce Gateway Request Server setup wizard:
1 Double click the
located on the Microsoft Dynamics NAV product DVD. The installation wizard will guide you through the installation process.
2In the Customer Information window, enter your user name and organization
name. You can also leave these fields blank.
setup.exe file for the Commerce Gateway Request Server that is
15
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006
3In the Setup Type window, select Complete.
4In the Ready to Install the Program window, click Install to start the installation of
Commerce Gateway Request Server.
16
5 Complete the installation.
After you have installed the Commerce Gateway Request Server, you must run a batch file to create the appropriate entries on BizTalk Server.
To run the batch file:
1 Open Windows Explorer and go to the following directory: “
Files\Microsoft Dynamics NAV\Commerce Gateway Request Server”.
2 Find the file named “
Setup.bat” and run it. This will deploy the assemblies and
C:\Program
create the appropriate entries on BizTalk Server. This process may take several minutes to complete.
If Commerce Gateway Request Server has been installed on this computer before, you will receive a couple of errors. These refer to files that already exist and to an invalid identity or password set on the application. You can ignore these errors.
1.3 Installing Microsoft Dynamics NAV Commerce Gateway Request Server
You should now start the service. Check the application log to see that the service started correctly.
You can now check that the Commerce Gateway Request Server service has started:
1 Click Start, Control Panel and select Administrative Tools, Services to open the
Services window:
Note
Log on as Local System will only work for users that have administrator rights. Therefore, in Properties, Log On tab, you must select the user profile that has been given access to the BizTalk objects in the database, for example, BTS_user.
2 Locate the Commerce Gateway Request Server service and check that it is running.

Setting Up the Internet Information Services Manager

To set-up the Internet Information Services Manager:
1 Click Start, Administrative Tools, Computer Management to open the Computer
Management Console.
17
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006
2 In the Computer Management Console, click Services and Applications, Internet
Information Services and open the Internet Information Services (IIS) Manager.
3 Expand Internet Information Services (IIS) Manager and expand Application Pools
and right-click DefaultAppPool and select Properties to open the Properties window:
4In the DefaultAppPool Properties window, click the Identity tab and make sure
that the security account for this application pool has sufficient privileges to run the BizTalk orchestration objects, for example, BTS_user. For more information on setting up users, see Creating a Domain User on page 22.
18
You should check that the application pool has been given execute permission for the
BTSHTTPRecieve.dll file. The BTSHTTPRecieve.dll file can be found at the
following path: <Commerce-gateway-request-server-installation>/CommerceGateway/ folder
5 Click OK to close the DefaultAppPool Properties window.
1.3 Installing Microsoft Dynamics NAV Commerce Gateway Request Server
Now set up a user with rights to execute BizTalk objects from Commerce Gateway:
1In the Computer Management window, expand Web Sites:
2 Right-click CommerceGateway and select Properties.
3In the CommerceGateway Properties window, click the Directory Security tab.
4In the Authentication and access control section, click Edit and in the User Name
field enter the ID of a user who has permission to execute the BizTalk objects.
5 Click OK to close the CommerceGateway Properties window.
19
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006
You must now add a Web Service Extension for Commerce Gateway to the Internet Information Services:
1In the Computer Management Console, right-click Web Services Extensions and
click Add a new Web service extension... to open the New Web Service Extension window:
2In the Extension name field, you can enter any name. In the Required Fields
section, click Add and browse to the folder where Commerce Gateway Request Server is installed and select the
This file is stored in the following folder:
Dynamics NAV\Commerce Gateway Request Server\CommerceGateway.
BTSHTTPRecieve.dll file.
C:\Program Files\Microsoft
3In the Set extension status to Allowed field, enter a check mark.
4 Click OK to close the New Web Service Extension window.
5 Click Start, Run and enter IISRESET.
6 Click OK to run IISRESET.
You have now set-up the Internet Information Services Manager.
For more information about Internet Information Services and setting up virtual directories in the Internet Information Services Manager, see Microsoft’s documentation for the Internet Information Services.
20

1.4 Service Packs and Security Updates

The installation is not complete until you have installed the latest service packs and applied the latest security updates to your system. Keeping your system up-to-date by installing the latest service packs is one of most important things you can do in managing the security of your system.
You should visit Microsoft Update and install all the relevant updates on every computer in your Dynamics NAV installation. We also recommend that you enable Automatic Updates on each computer so that they can receive security & critical updates automatically.
1.4 Service Packs and Security Updates
21
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006

1.5 Specifying Security Settings

Now that you have installed the Commerce Gateway connectivity components, you can begin to specify the necessary security settings in the following order:
1 Create a domain user.
2 Add the domain user to the BizTalk Server Groups.
3 Create a Commerce Gateway Request Server user and install COM+ objects for
system check.
4 Set up user permissions in Dynamics NAV.
5 Install and configure a NAV Application Server.
6 Set up a user profile for a NAV Application Server.

Creating a Domain User

1 On the Start menu, click Administrative Tools, Computer Management.
2 Under System Tools, expand Local Users and Groups.
3 Right-click Users and select New User. You can now create a new domain user.
Name it, for example, BTS_user.

Adding the Domain User to the BizTalk Server Groups

1 In the Computer Management Console, click Local Users and Groups, Groups.
2 In the right-hand panel, right-click BizTalk Application Users and select Add to
Group
3 Click Add to add the new domain user (BTS_user).

Setting up User Permissions in Dynamics NAV

You must create a Windows login for your user (in this example, BTS_user). This user must be assigned the SUPER role in Dynamics NAV.

Installing and Configuring a NAV Application Server

Once you have installed NAV Application Server, you can install a NAV Application Server service for each company in your Dynamics NAV database that needs the Commerce Gateway functionality. During the installation of NAV Application Server, default services are created for C/SIDE Database Server and SQL Server. These services are called "Application Server for Microsoft Dynamics NAV ServerName-SQL" and "Application Server for Microsoft Dynamics NAV ServerName-CLASSIC", where "ServerName" should be replaced with the name of your server.
22
You can remove or disable the Application Server for Microsoft Dynamics NAV service that you will not be using.
You can install and configure a NAV Application Server service in the following ways:
• by using the pre-installed service
• by using NAV Application Server.
The Start-Up Parameter Value property is used for Commerce Gateway. You must set it to CG.
Refer to the manual Installation & System Management: Application Server for Microsoft Dynamics NAV for more information about how to install and configure a service and how to set properties in a NAV Application Server.

Running More Than One NAV Application Server

If you need more than one NAV Application Server to handle your Commerce Gateway communication, you can run several NAV Application Servers on the same computer by specifying different port numbers. You can only do this if you have installed Microsoft Dynamics NAV Commerce Gateway Broker to distribute the available NAV Application Servers.
1.5 Specifying Security Settings
Refer to the section Installing Microsoft Dynamics NAV Commerce Gateway Broker for information about how to install Microsoft Dynamics NAV Commerce Gateway Broker.
Refer to the manual Installation & System Management: Application Server for Microsoft Dynamics NAV for information about installing more than one NAV Application Server.

Setting up a User Profile for a NAV Application Server

For each NAV Application Server that you install, you must set up a user profile. The names of the NAV Application Servers are generated during installation.
In the following procedure, we use the name "Application Server for Microsoft Dynamics NAV ServerName", where "ServerName" represents the name that was used when the server was installed.
To set up a user profile for a NAV Application Server:
1 Click Start, Control Panel, Administrative Tools, Services.
2 Right-click NAV Application Server ServerName and click Stop. If the Stop menu
item is gray, then the service is not running.
3 Right-click NAV Application Server ServerName again and click Properties.
23
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006
4 Click the Log On tab:
5 Click This account.
6In the This account field, enter the user name. Enter the user's password in the
7In the Services window, right-click NAV Application Server ServerName and click
Note
The user account added here must have sufficient rights to access to all the necessary BizTalk objects. Refer to the manual Installation & System Management: Application Server for Microsoft Dynamics NAV for information about changing user accounts on a NAV Application Server running as a service.
Final Security Check
It is extremely important that your security settings are correct. We therefore recommend that you verify that everything has been set up properly and that all the settings are consistent throughout the setup.
Password and Confirm password fields. Click OK.
Start. The service is now running.
24
1.6 Installing Microsoft Dynamics NAV Commerce Gateway Broker

1.6 Installing Microsoft Dynamics NAV Commerce Gateway Broker

If you need to run more than one NAV Application Server to handle your Commerce Gateway communication, you must also install Microsoft Dynamics NAV Commerce Gateway Broker. Commerce Gateway Broker enables scalability over multiple NAV Application Servers on incoming traffic from Microsoft BizTalk Server. It runs as a Windows service that uses Microsoft’s .NET framework.
Commerce Gateway Broker acts as a broker between the Custom Adapter and the NAV Application Servers, and between the Commerce Gateway Request Server and the NAV Application Server. The broker assigns an available NAV Application Server when one is requested by the Custom Adapter or Commerce Gateway Request Server. The broker will send the IP address of the available NAV Application Server to the Custom Adapter or Commerce Gateway Request Server. When the Custom Adapter or Commerce Gateway Request Server is finished sending data, it will tell the broker to mark the NAV Application Server as available.
When you are running Dynamics NAV Commerce Gateway Broker, you define the IP address and port number for Dynamics NAV Commerce Gateway Broker in the BizTalk Management Setup window in Dynamics NAV. Define the port numbers for NAV Application Servers in the Start-Up Parameter Value field. For example, CG Port= 7528 where 7528 represents the number of the receiving port (TCP/IP).
.
Refer to the manual Installation & System Management: Application Server for Microsoft Dynamics NAV for information about how to install more than one NAV Application Server.
Refer to the section Running More Than One NAV Application Server in this manual for information about how to fill in the setup windows when you are running more than one NAV Application Server.

Running the Setup Wizard

To run the Commerce Gateway Broker setup wizard:
1 Double click the
on the Microsoft Dynamics NAV product DVD. The installation wizard will guide you through the installation process.
setup.exe file for the Commerce Gateway Broker that is located
25
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006
2In the Customer Information window, enter your user name, for example,
Broker_user, and company name. You can also leave these fields blank.
3In the Setup Type window, select Complete:
4In the Ready to Install the Program window, click Install to start the installation of
Commerce Gateway Broker.

Modifying the Config.Xml files

Before you start using Commerce Gateway Broker, you must make some modifications to the
CGBroker_Config.Xml and the TCPCom_Config.Xml files.
Modifying the CGBroker_Config.Xml File
All the available NAV Application Servers must be known to the broker, and therefore you must specify some parameters in the
26
CGBroker_Config.Xml file.
1.6 Installing Microsoft Dynamics NAV Commerce Gateway Broker
g
The file is located in the C:\Program Files\Microsoft Dynamics NAV\Commerce
Gateway Broker
folder. Open the file, for example with Notepad, and make the
following changes:
<Settings>
<ApplicationServers>
<ApplicationServer>
<Name>NAS</Name> <IP>127.0.0.1</IP> <PortNumber>7518</PortNumber> </ApplicationServer> </ApplicationServers> <RecoveryPoll>5</RecoveryPoll>
</Settin
s>
1 Enter a name for the NAV Application Server in
Settings/ApplicationServers/ApplicationServer/Name to make the first
NAV Application Server known to the broker. It can be any name you choose but it must be unique.
2 Enter the IP address of the NAV Application Server in
Settings/ApplicationServers/ApplicationServer/IP.
3In
Settings/ApplicationServers/ApplicationServer/PortNumber, enter the
port number that the NAV Application Server is listening to. Make sure that the number is identical to the port number in the Start-Up Parameter Value field the NAV Application Server Manager.
4The
RecoveryPoll field specifies the interval in seconds you want the broker to
listen for an available NAS after the NAS has returned a "Not available" message.
To enter information for additional NAV Application Servers, you must copy the lines for the first NAV Application Server and paste them into the document. Change the values in the fields to match the values valid for the NAV Application Servers.
27
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006
D t
D
g
Make sure to give the application servers unique names.
<Settings>
<ApplicationServers>
<ApplicationServer>
<Name>NAS1</Name> <IP>10.251.71.46</IP> <PortNumber>7518</PortNumber> </ApplicationServer>
<ApplicationServer>
<Name>NAS2</Name> <IP>10.251.71.46</IP> <PortNumber>7519</PortNumber> </ApplicationServer>
<ApplicationServer>
<Name>NAS3</Name> <IP>10.251.71.46</IP> <PortNumber>7520</PortNumber> </ApplicationServer> </ApplicationServers> <RecoveryPoll>5</RecoveryPoll>
</Settings>
Modifying the TCPCom_Config.Xml File
In the
TCPCom_Config.Xml file you specify some security options, the port number of
the broker, set a maximum size for the documents you transfer and specify a dump path for request and response documents.
The file is located in the
Gateway Broker folder. Open the file, and make the following changes:
C:\Program Files\Microsoft Dynamics NAV\Commerce
<Settings>
<PortNumber>7517</PortNumber> <MaxDatasize>20000000</MaxDatasize> <Security> <AllowAll Values="Yes/No">Yes</AllowAll> <LogIntruders Values="Yes/No">No</LogIntruders> <Cryptography Values="Yes/No">Yes</Cryptography> <AllowedIPs> <IP>127.0.0.1</IP> </AllowedIPs>
</Security> <Debug>
<RequestDocuments>
<DumpDocuments Values="Yes/No">No</Dump
<DumpPath>C:\TCPDocLog\Request</DumpPa
</RequestDocuments> <ResponseDocuments>
<DumpDocuments Values="Yes/No">No</Dump
<DumpPath>C:\TCPDocLog\Response</DumpP
</ResponseDocuments>
</Debug>
</Settin
s>
28
1.6 Installing Microsoft Dynamics NAV Commerce Gateway Broker
1In Settings/PortNumber, enter the number of the port that Commerce Gateway
Broker should listen to. Make sure that the port number is identical to the number in the Appln.Srv./Broker Port No. field in the BizTalk Management Setup window in the application.
2 A maximum size for the documents you are transferring is defined in
Settings/MaxDatasize. The default value is 20 MB, but you can change this value
to anything lower than the max. value. It is recommended that you keep the default value for the broker.
3You can set
Settings/Security/AllowAll Values to Yes or No. If you set it to
Yes, the broker will handle the request regardless of the IP address that the request
was sent from. If you set it to No, the broker will only accept requests from IP addresses listed in Settings/Security/AllowedIPs/IP.
4
Settings/Security/LogIntruders Values is only valid if the value Settings/Security/AllowAll Values is No. If you set Settings/Security/LogIntruders Values to Yes, the intruding IP addresses
will be listed in the Windows Application Log (Computer Management).
5 You can set the
Settings/Security/Cryptography Values to Yes or No to
specify whether you want the TCPCom to encrypt the transferred documents.
6In
Settings/Security/AllowedIPs/IP, enter the IP address of the PC that you
will allow to communicate with the Commerce Gateway Request Server. Notice that it is only relevant to enter an IP address in this field if you have set the
Values
7In the
Values fields to specify if you want transferred documents to be dumped into a file.
In the
to No in step 3 above.
Settings/Debug section, you can enter Yes or No in the DumpDocuments
DumpPath fields you enter the paths for the document files you want to save.
AllowAll
29
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006

1.7 Setting Up Commerce Gateway in +Microsoft Dynamics NAV

When you set up Commerce Gateway in Microsoft Dynamics NAV, it is important to distinguish between your trading partners – whether they are customers or vendors. If your trading partner is a vendor, eight different business documents may be involved in the document flow from customer to vendor:
• Request for Purchase Quote - Dynamics NAV_RPQ_1
• Purchase Quote - Dynamics NAV_PQ_1
• Purchase Order - Dynamics NAV_PO_1
• Purchase Order Confirmation - Dynamics NAV_POC_1
• Purchase Invoice - Dynamics NAV_PI_1
• Purchase Receipt - Dynamics NAV_PR_1
• Purchase Credit Memo - Dynamics NAV_PCM_1
• Import Product Catalog - Dynamics NAV_IPC_1
If your trading partner is a customer, the following eight different business documents may be involved in the document flow from vendor to customer:
• Request for Sales Quote - Dynamics NAV_RSQ_1
• Sales Quote - Dynamics NAV_SQ_1
• Sales Order - Dynamics NAV_SO_1
•Sales Order Confirmation - Dynamics NAV_SOC_1
• Sales Invoice - Dynamics NAV_SI_1
• Shipment Notification - Dynamics NAV_SN_1
• Sales Credit Memo - Dynamics NAV_SCM_1
• Export Product Catalog - Dynamics NAV_EPC_1
The following section is an overview of the fields that are important to set up correctly in the BizTalk Management Setup window and the BizTalk Partner Setup window.
30

Setting Up the Company Acting as Customer

In Dynamics NAV, click Administration, IT Administration, Commerce Gateway, Management Setup to open the BizTalk Management Setup window. In this window a customer could, for example, set up his own company as follows:
1.7 Setting Up Commerce Gateway in +Microsoft Dynamics NAV
Here is a description of the fields in the BizTalk Management Setup window:
Field Description
Rqst Srv. IP Address Enter the IP address of the server that runs Request Server.
Rqst Srv. Port Number Enter the port number of the Request Server, for example 7527.
Appln. Srv./Broker IP Address
Appln. Srv./Broker Port Number
BizTalk Organization ID Enter a number that you want to use to identify your company.
Use Encryption A check mark indicates that you want to use encryption when
Hosted BizTalk Server A check mark in this field indicates that the BizTalk server you
Enter the IP address of the broker. If you do not use a broker, then enter the IP number of the NAV Application Server (NAS).
Enter the port number of the broker or if you are not using a broker, the NAS, for example: 7528.
You must inform your trading partner(s) of this number.
sending and receiving documents.
are connected to is hosted by a hosting service provider.
31
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006
Setting Up the Vendor
In Dynamics NAV, click Administration, Application Setup, Commerce Gateway, Partner Setup to open the BizTalk Partner Setup window. In this window, a vendor could be set up like this:
Here is a description of the fields in the BizTalk Partner Setup window:
Field Description
BizTalk Partner No. An automatically generated number for your trading partner.
Partner Type Select the type of trading partner: Customer or Vendor. In this
example, choose Vendor.
Partner No. The number of your vendor that is stored in Dynamics NAV.
Partner Name The name of your vendor.
BizTalk Organization ID Enter the organization number that you receive from your
trading partner. This number identifies your partner’s company. Similarly, you must inform your trading partner(s) of the organization number you set up in Management Setup to identify your company.
Destination Address Enter the destination address for the documents you want to
send. The destination address could be, for example, a \\http: address.
Use Company ID Enter a check mark in this field if you need to add a company ID
to the document you are sending, in order to allow the receiving company’s BizTalk Server to identify the sending company. For further information, see the online help in Dynamics NAV.
32

Setting Up the Company Acting as Vendor

In Commerce Gateway, the BizTalk Management Setup window, a vendor could, for example, set up his own company as follows:
Here is a description of the fields in the BizTalk Management Setup window:
1.7 Setting Up Commerce Gateway in +Microsoft Dynamics NAV
Field Description
Rqst Srv. IP Address Enter the IP address of the server that runs Request Server.
Rqst Srv. Port Number Enter the port number of the Request Server, for example 7527.
Appln. Srv./Broker IP Address
Appln. Srv./Broker Port Number
BizTalk Organization ID Enter a number that you want to use to identify your company.
Use Encryption A check mark indicates that you want to use encryption when
Hosted BizTalk Server A check mark in this field indicates that the BizTalk server you
Enter the IP address of the broker. If you do not use a broker, then insert the IP number of the NAV Application Server (NAS)
Enter the port number of the broker or if you are not using a broker, the NAS, for example: 7529.
You must inform your trading partner(s) of this number.
sending and receiving documents.
are connected to is hosted by a hosting service provider.
33
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006
Setting Up the Customer
A customer could be set up in the BizTalk Partner Setup Partner Setup window as follows:
Here is a description of the fields in the BizTalk Partner Setup window:
Field Description
BizTalk Partner No. An automatically generated number for your trading partner.
Partner Type Select the type of trading partner: Customer or Vendor. In this
example, choose Vendor.
Partner No. The number of your customer that is stored in Dynamics NAV.
Partner Name The name of your customer.
BizTalk Organization ID Enter the organization number that you receive from your
trading partner. This number identifies your partner’s company. Similarly, you must inform your trading partner(s) of the organization number you set up in Management Setup to identify your company.
Destination Address Enter the destination address for the documents you want to
send. The destination address could be, for example, a \\http: address
Use Company ID Enter a check mark in this field if you need to add a company ID
to the document you are sending, in order to allow the receiving company’s BizTalk Server to identify the sending company. For further information, see the online help in Dynamics NAV.
34
1.7 Setting Up Commerce Gateway in +Microsoft Dynamics NAV

Setting Up Commerce Gateway in Visual Studio

1 Start Visual Studio and open BizTalk Explorer.
2 In the directory structure, under BizTalk Configuration Databases, open the Send
Ports directory.
3 Right-click the Port named Commerce Gateway_to_Cronus and select Edit...
4In the Static One-Way Send Port Properties window, select Address (URI) and
click on the button with 3 dots. This will open the Commerce Gateway Transport Properties window.
5 Change the NAS/Broker IP Address to the IP address of your computer.
6 Click OK to close the windows.
7 Repeat this procedure for the port named Commerce Gateway_to_PURE_LOOK.
35
Chapter 1. Commerce Gateway 5.00 for BizTalk Server 2006
36
Part 2 Appendices
Appendix A Miscellaneous
This appendix provides additional information about Microsoft Dynamics NAV Commerce Gateway.
The appendix contains the following sections:
· Description of a Three-Tier Configuration
· Transaction of Large Documents
.

A.1 Description of a Three-Tier Configuration

The following diagram shows Microsoft Dynamics NAV Commerce Gateway in a three­tier configuration.
The three tiers contain the following components:
• a client containing a Dynamics NAV client and the Commerce Gateway client
components.
• a database server containing either Microsoft SQL Server or C/SIDE Database Server.
• a number of Application Server for Microsoft Dynamics NAVs and a Microsoft
Dynamics NAV Commerce Gateway Broker.
• a BizTalk Server containing BizTalk Server and Commerce Gateway server
components.
Note
The Application Integration Component is used in the BizTalk 2000/2002 configuration, and the Custom Adapter is used in the BizTalk 2004 configuration.

Explanation of the Diagram

Business Documents are in XML Format
Business documents (from now on referred to as "documents") are delivered to BizTalk Server in XML format. The Dynamics NAV client generates the XML documents. When NAV Application Server receives a document from the Custom Adapter, this document is also in XML format. C/AL™ code running on NAV Application Server validates the XML documents.
40
The Timer Component
The timer component is installed on both the Dynamics NAV client and on NAV Application Server. However, it is not used in any client components in the Commerce
A.1 Description of a Three-Tier Configuration
Gateway product. It is installed to provide timer functionality in C/SIDE® on the client side and to avoid compiler errors in C/AL code that refers to the timer component.
The Request Client
The Request Client is installed on both the client and on NAV Application Server.
Why Both a Request Client and a Request Server?
There is a need for both the Request Client and the Request Server because there are restrictions on Automation objects in C/SIDE that make it impossible to call methods in BizTalk Server directly. The BizTalk Server components contain data types that C/SIDE does not support. The Request Server, which exposes methods with the data types that C/SIDE supports, wraps BizTalk Server components.
The Request Client is used to minimize the network traffic over the TCP/IP connection. When a request is made for more data from BizTalk Server, the data is transferred to the Request Client in one round trip and kept there. The Dynamics NAV client can now ask the Request Client for the data in several calls without putting load on the network.
The Custom Adapter
The Custom Adapter is normally only activated by BizTalk Server. However, it can also be activated from the Request Server component when a system check is initiated from the Dynamics NAV client.
The purpose of the Custom Adapter is to deliver documents, which have been received by BizTalk Server, to NAV Application Server. This is done by instantiating a special component, the Dynamics NAV TCP Communication Component (TCPCom).
The documents delivered to NAV Application Server are XML documents that include the following information:
• Company name of the receiving company.
• Partner ID of the receiving partner in Dynamics NAV.
• Document name.
• Schema name.
• The received document.
• The schema of the received document.
If an error occurs in the Custom Adapter or in NAV Application Server, the error is written to the event log using the EventLog class. An error is raised to BizTalk Server, which then deals with the error according to the configuration.
Custom Adapter to NAV Application Server Document Transfer
It is not within the scope of this appendix to explain the transfer of documents from the Custom Adapter to NAV Application Server. For more information, see the manual Installation & System Management: Application Server for Microsoft Dynamics NAV. The transfer of documents is more complex and involves more technologies than the diagram implies.
Sending Requests from the Dynamics NAV Client
The Dynamics NAV client can send a number of different requests to BizTalk Server. The Request Client receives the requests and forwards them to the Request Server. The Request Server activates the necessary components in BizTalk Server and sends the
41
.
requested information and/or the result back to the Request Client. The Request Client then forwards the information to the Dynamics NAV client. "Create organization and messaging port on BizTalk Server" (BizTalk 2000/2002 Server only) is an example of a request that the Dynamics NAV client can send.
If you need to send large documents, for example product catalogs with thousands of items, you can set up your system as described in section B.3 Transaction of Large Documents.
The Task Table for Application Server for Microsoft Dynamics NAV
The request is stored in the task table NAV Application Server, for example if BizTalk Server does not respond to a request. NAV Application Server checks the task table at specified intervals. If it finds a request, NAV Application Server sends it to the Request Client on BizTalk Server.
Receiving Documents
When BizTalk Server receives a document from a business partner, the Custom Adapter is activated. The Custom Adapter wraps the received document with information from BizTalk Server, such as document specification, partner ID and document name. The Custom Adapter asks the broker for an available application server. The broker assigns an application server and marks it as busy. The Custom Adapter then forwards the document to the assigned NAV Application Server using TCPCom. Once the application server has handled the document, the Custom Adapter provides the broker with information about the transaction and the application server is marked as available.
If an error occurs in NAV Application Server while it is validating the document, the error is reported back to the Custom Adapter. The Custom Adapter informs the broker that the application server is available and writes a message to the Application Log in the Event Viewer using the CGEventLog component. It also informs BizTalk Server of the error. Your BizTalk Server setup determines how the error is handled. Normally, the failed document is placed in the retry queue in BizTalk Server. The document is then delivered to the Custom Adapter after a specified amount of time.
If an error occurs while delivering a document to the application server, for example if the application server doesn’t respond, the Custom Adapter reports this to the broker and the application server is marked unavailable. Subsequently the broker starts polling the status from the application server until it is made available. The rest of the error handling is described above.
Errors Occurring in the Request Server
If an error occurs in the Request Server, a message is written to the Application Log or the error code is returned to the client. If the error concerns the network or reading the CGRS_Config.xml document, a message is written in the Application Log. All other types of errors are returned to the client.
42

A.2 Transaction of Large Documents

e
When you send an XML document from Dynamics NAV client to BizTalk Server, the transaction of the document can be handled in two different ways determined by the size of the document. You can decide what the threshold value must be based on your need to work on the client at the same time as the document is transferred.
When you send an XML document smaller than the threshold value, the client is locked until it receives a tracking ID from Commerce Gateway Request Server (CGRS). The tracking ID is sent to the client when CGRS has passed the document on to BizTalk Server. The client will unlock and be available for new tasks.
If you send an XML document larger than the threshold value, CGRS sends a message back to the client as soon as it has received the document, without waiting for the document to be passed on to BizTalk Server. The client will then unlock and be available for the next task without waiting for the document to be fully delivered to BizTalk Server. This way you can continue your work on the client immediately after sending the XML document. When the document is fully delivered to BizTalk Server, the CGRS sends the tracking ID number to NAV Application Server which will pass it on to C/SIDE Database Server.
A.2 Transaction of Large Documents
By default, the threshold value is set to 50000 bytes. You can change this in CGRS_Config.XML under Settings/Thresholds/DocSizeImmediateReply:
<Settings>
<Thresholds>
<DocSizeImmediateReply>50000</DocSizeImmediateR
</Thresholds>
</Settings>
43
.
44

INDEX

B
business documents . . . . . . . . . . . . . . . . . . 40
C
CGBroker_Config.Xml . . . . . . . . . . . . . . . . . 26
components
Dynamics NAV TCP Communication
Component (TCPCom) . . . . . . . . . . . . . . 41
creating a domain user . . . . . . . . . . . . . . . . 22
D
documents
receiving . . . . . . . . . . . . . . . . . . . . . . . . . . 42
domain user
creating a . . . . . . . . . . . . . . . . . . . . . . . . . 22
specifying security settings . . . . . . . . . .22
Dynamics NAV Application Server
task table . . . . . . . . . . . . . . . . . . . . . . . . . 42
Dynamics NAV Application Server service
installation and configuration . . . . . 22, 23
preinstalled . . . . . . . . . . . . . . . . . . . . . . . . 23
setting up a user profile . . . . . . . . . . . . . 23
Dynamics NAV Communication Component 41
I
Installing the Commerce Gateway Broker 25 Installing the Commerce Gateway Request
Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Start-up Parameter Value property . . . . . 23
T
task table (Dynamics NAV Application Server) 42
TCPCom_Config.Xml . . . . . . . . . . . . . . . . . 28
timer component . . . . . . . . . . . . . . . . . . . . 40
U
User permissions . . . . . . . . . . . . . . . . . . . . . 22
user profile
Dynamics NAV Application Server service 23
M
more than one Dynamics NAV Application
Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
P
port numbers . . . . . . . . . . . . . . . . . . . . . . . . 25
R
receiving documents . . . . . . . . . . . . . . . . . 42
Request Client . . . . . . . . . . . . . . . . . . . . . . . 41
Request Server . . . . . . . . . . . . . . . . . . . . . . . 41
errors in . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
requests
sending . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
S
security
setting up in Dynamics NAV . . . . . . . . .22
sending requests . . . . . . . . . . . . . . . . . . . . . 41
setting up
Commerce Gateway in Visual Studio . . 35
Index
Loading...