M3 MI Data Import for Web Services (MDIWS)

I just learned the existence of the M3 MI Data Import for Web Services (MDIWS), which is the equivalent of the traditional M3 Data Import (MDI) but using the M3 API REST/JSON endpoint instead of the traditional proprietary binary endpoint.

The tool and documentation are straightforward, so I will just promote it here with some screenshots:

Here are the executable and documentation:

Here is a sample semicolon separated CSV file with data, no header:

Here is the tool in action:

As a reference, here is the traditional M3 Data Import tool:

Thanks Björn P. for the tool.

That’s it!

Access Control on Grid Management Pages

It is my great pleasure to be an author of M3 Ideas. Thanks very much for Thibaud’s invitation.

I put my foot into M3 water five years ago and M3 Ideas has been giving me great help in developing my technical skills since then. It is my great honor to share my work and make contributions to it.

The issue of access control on grid management pages has been a trouble to me for nearly two years. The installation web page of ISO, in our case, http://BE Server:19005/LSO/index.html is very close to the grid information page, http://BE Server:19005/grid/info.html and the grid management pages, http://BE Server:19005/grid/ui/#. It is fairly easy for a user with web skills to figure out the latter two web pages and he/she can explore and check basically all the grid information.

Although the grid management pages requires credentials to log on to be able to start or stop a process, a user actually can try the default account,  and the famous password, which are mentioned by the Companion, to get full control. This is not a joke, but a real case. It makes M3 system really vulnerable. Even if users do not make any actions to it, there is no sense and it is ridiculous to disclose all the system information to the public.

We did raise InforXtreme case for Infor to fix it. However, they could not give a robust solution after a long time discussion. The reason is the grid management pages and LSO is sharing the same Java process in the BE server. If you check the TCP connections and processes using netstat in the BE server, you would find there is no way to tell which connection is from the grid management pages visit or from LSO request, which is the biggest technical challenge.

After many tests it seems the most feasible solution is to analyze each incoming and outgoing TCP packet in the BE sever to see whether there are any patterns. If we can be 100% sure that a remote IP address is visiting the grid management pages according to the patterns, then we can apply IPSec to block it automatically. Although it means that IP address cannot use LSO as well, it can be sorted out by manually removing it from the black list given a promise is made not to visit again. If the promise is broken, there is no second chance for them. It is something like Damocles’ Sword.

So I made a Console Application using C# as follows.


using System;
using System.Collections.Generic;
using SharpPcap;
using SharpPcap.LibPcap;
using System.Text;
using System.Net.Mail;
using System.Diagnostics;

namespace CA_Grid
{
class CA_Grid
{
static List<string> jsIPList;

static void Main(string[] args)
{
jsIPList = new List<string>();

var varDevices = CaptureDeviceList.Instance;

if(varDevices.Count<1) { Console.WriteLine("No devices were found on this machine"); return; } Console.WriteLine("The following devices are available on this machine:"); Console.WriteLine("----------------------------------------------------"); Console.WriteLine(); int i = 0; foreach(var varDec in varDevices) { Console.WriteLine("{0}) {1}", i, varDec.Description); i++; } Console.WriteLine(); Console.Write("-- Please choose a device to capture: "); int varChoice = 0; if (!int.TryParse(Console.ReadLine(), out varChoice) || varChoice>=i)
{
Console.WriteLine("The device is not valid!");
return;
}

ICaptureDevice varDevice =varDevices[varChoice];

varDevice.OnPacketArrival += Device_OnPacketArrival;

varDevice.Open();
varDevice.Filter = "ip and tcp";
Console.WriteLine();
Console.WriteLine("-- Listening on {0}, hit 'Ctrl-C' to exit...",varDevice.Description);

varDevice.Capture();

varDevice.OnPacketArrival -=Device_OnPacketArrival;
varDevice.Close();
}

private static void Device_OnPacketArrival(object sender, CaptureEventArgs e)
{
try
{
string varMIP = "BE Server IP Address";
if (e == null || e.Packet == null)
return;

if (e.Packet.Data == null)
return;

var varPacket = PacketDotNet.Packet.ParsePacket(e.Packet.LinkLayerType, e.Packet.Data);
if (varPacket == null)
return;

if (varPacket.GetType()!=typeof(PacketDotNet.EthernetPacket))
return;

var varIP = (PacketDotNet.IpPacket)varPacket.Extract(typeof(PacketDotNet.IpPacket));
if (varIP == null)
return;

string varDIP = varIP.DestinationAddress.ToString();
string varSIP = varIP.SourceAddress.ToString();

if (varSIP != varMIP)
return;

var varTCP = (PacketDotNet.TcpPacket)varPacket.Extract(typeof(PacketDotNet.TcpPacket));
if (varTCP == null)
return;

if (varTCP.PayloadData == null)
return;

var varData = Encoding.UTF8.GetString(varTCP.PayloadData);

if (varData == null)
return;

string varDPort = varTCP.DestinationPort.ToString();
string varSPort = varTCP.SourcePort.ToString();

bool varHTTPS = varSPort == "443";
bool varHTTP = varSPort.Contains("19005") && varData.Contains("text/html") && varData.Contains("gzip");
if ((varHTTPS || varHTTP) && !jsIPList.Contains(varDIP))
{
jsIPList.Add(varDIP);

string varWay = varHTTP ? "HTTP" : "HTTPS";
string varM1 = "----------------------------------------------------";
string varM2 = string.Format("{0}, {1}, {2}", DateTime.Now, varDIP, varWay);
string varM3 = "Original IP packet: " + varIP.ToString();
string varM4 = "Original TCP packet: " + varTCP.ToString();
string varM5 = "Original TCP Header: " + varData;

if (varDIP != "IP to Exclude")
{
using (var varProcess = new Process())
{
varProcess.StartInfo.FileName = "cmd.exe";
varProcess.StartInfo.UseShellExecute = false;
varProcess.StartInfo.RedirectStandardInput = true;
varProcess.StartInfo.RedirectStandardOutput = true;
varProcess.StartInfo.RedirectStandardError = true;
varProcess.StartInfo.CreateNoWindow = true;
varProcess.Start();

string varCommand = "netsh ipsec static add filter filterlist=\"IP_Filter_Grid\" srcaddr=" + varDIP + " dstaddr=me protocol=TCP mirrored=No";
varProcess.StandardInput.WriteLine(varCommand);
varProcess.StandardInput.WriteLine("exit");
varProcess.StandardInput.AutoFlush = true;
varProcess.WaitForExit();
}
}

Console.WriteLine(varM1);
Console.WriteLine(varM2);
Console.WriteLine();
Console.WriteLine(varM3);
Console.WriteLine();
Console.WriteLine(varM4);
Console.WriteLine();
Console.WriteLine(varM5);
Console.WriteLine();

using (var varSMTP = new SmtpClient("Mail Forwarder IP Address"))
{
using (var varMail = new MailMessage())
{
varMail.From = new MailAddress("from address");
varMail.To.Add("my e-mail address");
varMail.Subject = "Unauthorised Access to Infor Grid Management Pages";
varMail.Body = varM1 + "\r\n" + varM2 + "\r\n" + "\r\n" + varM3 + "\r\n" + "\r\n" + varM4 + "\r\n" + "\r\n" + varM5;
varSMTP.Send(varMail);
}
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}

SharpPcap can be downloaded from GitHub. It has two Dlls, SharpPcap for capturing packets and Packet.Net for packet analysis. WinPcap needs to be downloaded and installed into the BE server. There is no need to restart the server after installation.

The console application is running in an asynchronous mode, so there is trivial impact on the M3 performance.

The script starts with detecting all the devices first. Then it asks for a device number to listen to. Each device could be a network adapter. A filter is applied to the device for IP and TCP packets. An event to capture the packets is attached to the device. Finally the listening starts.

The event handler has the key logic.

1. Two patterns to find the visit to the grid management pages.

(1) HTTPS: The source port would be 443.

(2) HTTP: The packet contains text/html and gzip.

HTTPS communication is encrypted, so we cannot analyze the packet content. Fortunately LSO never uses the port of 443.

2. If the destination IP address is not on the white list, then it would be added to the IPSec filter list. We need to manually create a IPSec policy and a IPSec filter & Action beforehand.

3. Console would output the captured information.

4. An e-mail alert would be sent with the captured information.

5. A global variable of jsIPList is used to keep the IP addresses already captured to avoid repeated alerts.

Then it works. There were three IT users from local division, who still tried to access to the grid management pages on Monday as usual. Then they found they could not visit it any more, as well as LSO. So far there are no normal users to be blocked, no matter whether they run M3 programs, or download LSO from the installation web page. All of sudden the two-year headache is gone.

If you have the similar concerns to me, I hope the above solution would give you a ride. If you have got any issues using the solution, please reply to this post or send me an e-mail at warren.dahai.hou@gmail.com.

Finally my heartfelt appreciations to all the authors on this website, as well as the author of SharpPcap and Packet.Net.

Infor e-Commerce XML Gateway

Here is my first test of the Infor e-Commerce XML Gateway.

It is something like https://example.com/infor-ecom/common/gateway.jsp?user=u&password=p&object=o&method=m&request=r

About

The XML Gateway is an API in Infor e-Commerce, for third-party software to make requests to e-Commerce, e.g. to create an order, to get an invoice, or to delete an item. The requests are XML documents, in the proprietary IdealXML schema, sent to e-Commerce over HTTP, targeting the e-Commerce Business Objects and methods.

History

The XML Gateway has existed since the early days of Ideal Seller and e-Sales about 20 years ago:
9 3___ 8

License

The current part number is M3C-SGX Infor e-Commerce B2B XML Application Adapter:
1

Is MEC required? No.

Despite what the Infor sales and documentation say, Infor ION, Infor M3 Enterprise Collaborator (MEC), and the e-Commerce Extension for MEC, are NOT required to use the XML Gateway; the XML Gateway is built-in e-Commerce. MEC is suggested for it provides useful features such as development tools, transaction management, persistence, XML transformation, connection pooling, logging, monitoring, management, etc. Apart from that, you can use any other software that does XML over HTTP. Besides, if you were to use MEC, it would have to be the ancient version 9.0.4.0 which is probably not compatible with the MEC you already have for M3:

Documentation

There is some documentation available. The greatest amount of information is located in the Infor e-Commerce Development Studio User’s Guide, and there is some in the Developer’s Guide, Administration Guide, and Configuration Guide for Infor ION:
5__ 6__ 7 14

Business Objects

The business objects and methods of the XML Gateway are listed in the Business Center at Gateway > Requests:

The code is automatically generated from the e-Commerce Development Studio, e.g. Business Object Item and method GatewayDetails to get the details of an item by input parameter ItemID:
40 41 42 43 44

Source code

For the curious of us, we can peak at the source code.

The source code starts at /infor-ecom/src/common/gateway.jsp and includes the automatically generated JSP fragment Gateway.jspf:
10

And the e-Commerce Java library common-10.0.0.jar includes the class com.intentia.iec.businessobject.input.XMLRequest which parses the XML input:
11

That is sufficient to start peaking at source code.

Furthermore, the e-Commerce Extension for MEC ecom-extension-9.0.0.jar includes the class com.intentia.iec.meci.http.HttpRequester which sends the HTTP request:
12

And the ION Connector’s MEC Custom Channel iecprotocol-2.0.0.jar includes the class com.intentia.ec.channel.IECGateway which also sends an HTTP request:
13

Samples

There are sample XML requests in the proprietary IdealXML schema located at C:\Program Files (x86)\Infor\Infor e-Commerce 14.9.1.0\XML Sample Documents\IdealXML 2.0\:
16 17

XSD

The XML requests are validated with the proprietary IdealXML Schema located at Infor e-Commerce Development Studio\Infor e-Commerce Extension for Enterprise Collaborator\dist\e-Commerce\request.xsd:
15

The Development Studio User’s Guide has a chapter The iXML document format.

XSLT? No.

The latest version of the XML Gateway does NOT provide XSL Transformation (XSLT); it may have been included in the early versions when it was ASP, not anymore. You can easily develop a proxy JSP that does XSLT and that forwards the request to gateway.jsp. I will explore this in a future post. Otherwise, if you use MEC and the e-Commerce Extension for MEC, you can do XSLT in MEC as usual.

Setup

To setup the XML Gateway:

Enable the desired Business Object Method (they are all enabled by default), e.g. Item.GatewayDetails:
33

In the desired Role (e.g. I created role Third-party software), select the Feature Element Gateway User:

In the desired User B2B, select that role:

Still, I am not able to reproduce the setup for another user, and I do not know why.

HTTP request

The HTTP request is of the form:

POST https://example.com:443/infor-ecom/common/gateway.jsp HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: example.com:443
Content-Length: 123

user=u&password=p&object=o&method=m&request=r

Where:

  • I recommend HTTPS (secure), not HTTP (insecure).
  • The scheme, hostname and port number are those of your e-Commerce, e.g. https://example.com:443.
  • The method can be either GET (with the parameters in the URL) or POST (with the parameters in the request body), but I advise against GET because the user and password would be in the URL, and nodes along the way may store the URL in clear text in the logs; I recommend POST instead.
  • The URL path is /infor-ecom/common/gateway.jsp
  • The media type is application/x-www-form-urlencoded
  • The input parameters user and password are for authentication. Note: the XML Gateway does not accept HTTP Basic authentication.
  • The input parameters object and method are for the business object.
  • The input parameter request is the entire <IdealXML> content.
  • All parameters must be URL-encoded.

Test

For my test, I will call Item.GatewayDetails to get the details of item 9412-0111:

Here is the corresponding IdealXML that I created from the sample XML:

<?xml version="1.0" encoding="UTF-8"?>
<idealXML version="2.0" id="Thibaud test">
   <commands>
      <command>
         <request>
            <params>
               <param name="@LanguageCode">en</param>
            </params>
            <search>
               <bindings operand="or">
                  <bindings operand="and">
                     <binding attribute="ItemID" value="9412-0111" operator="eq"/>
                  </bindings>
               </bindings>
            </search>
         </request>
      </command>
   </commands>
</idealXML>

Notes:

  • I removed the <login> and <password> from the <credential> as they are ignored.
  • I removed the <command>’s name and method attributes as they are ignored.

Result

Here is the result in raw and parsed view:

The XML response is the following, successful, with the requested item details:

<?xml version="1.0" encoding="UTF-8"?>
<resultset object="Item">
   <row Description="For ITRAN GE BLACK INKJET CART 10/CTN" GroupCode="OE" GroupName="Impact Inking" IsActive="Y" IsDangerous="0" IsEmphasized="N" ItemCode="normal" ItemCodeID="normalItemCode" ItemField1="WELLS FARG" ItemField2="201502861.00" ItemField3="" ItemField4="12/99" ItemField5="Y" ItemID="9412-0111" Key="8685" MainCategoryID="59052" MinimumQty="0.0000" ModularQty="0.0000" Name=" INK JET EQUIPMENT" SupplierID="" UnitCodeID="CTItemUnit" Weight="2.4940">
      <Category CategoryID="59052" CategoryName=" INK JET EQUIPMENT" InternalName=" INK JET EQUIPMENT (59052)"/>
      <Text Description="For ITRAN GE BLACK INKJET CART 10/CTN" LanguageID="de" Name=" INK JET EQUIPMENT"/>
      <Text Description="For ITRAN GE BLACK INKJET CART 10/CTN" LanguageID="en" Name=" INK JET EQUIPMENT"/>
      <Text Description="For ITRAN GE BLACK INKJET CART 10/CTN" LanguageID="fr" Name=" INK JET EQUIPMENT"/>
      <Text Description="For ITRAN GE BLACK INKJET CART 10/CTN" LanguageID="it" Name=" INK JET EQUIPMENT"/>
   </row>
</resultset>

Troubleshooting

For troubleshooting:

Inspect the HTTP response headers that indicate either success:

XMLGatewayStatusCode: 200
XMLGatewayMessage: OK

Or an error:

XMLGatewayStatusCode: 401
XMLGatewayMessage: Login failed
XMLGatewayStatusCode: 403
XMLGatewayMessage: Access to requested object or method not allowed
XMLGatewayStatusCode: 500
XMLGatewayMessage: Internal error while executing Gateway method

The Development Studio User’s Guide has a chapter Gateway error messages, with codes, but the codes do not match this.

It is better to look in the logs at C:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\SystemOut.log:
22

Problems

  • The user and password are echoed in clear text in the logs, it is insecure:
    23
  • The XML Gateway accepts requests over plain HTTP (instead of HTTPS) even though the request contains the user and password and other private data in clear text, it is insecure.

Future work

  • Force HTTPS (secure) by default, disable HTTP (insecure).
  • Do XSL transformation (XSLT).
  • Finish reproducing the setup.
  • Try the e-Commerce Extension for MEC.
  • Try the WSDL and the Infor e-Commerce Web Service Specifications for Synchronous Calls.
  • Try other Business Objects and methods.
  • Try custom Business Objects and methods.
  • Understand more about the bindings.

Conclusion

That was my first test of the XML Gateway in Infor e-Commerce, for third-party software to make requests to e-Commerce, e.g. to place an order or get the details of an item. I have more work to do if I want to master the XML Gateway.

That’s it!

Please like, comment, subscribe, share, participate.

Subversion in Infor e-Commerce Development Studio

Here is an illustration of how to setup Apache Subversion for source control in Infor e-Commerce Development Studio, such that multiple developers can work on the same e-Commerce project at the same time, for team development.

Problem

The problem is that by design an Eclipse workspace cannot be shared, i.e. there can only be one developer using a workspace at a time, others will get the message “Workspace in use or cannot be created, choose a different one”:
0

Small teams can setup multiple workspaces, one per team member, share the same source code, and mutually agree on which non-overlapping files to work on, being careful to not touch each other’s files. This is workable in small teams, but is not scalable for large teams or inexperienced team members as there is risk of data loss.

The correct solution is to setup source control software to manage that.

Objective

Supposing there a N team members doing e-Commerce development, we will setup one Subversion server & repository, and N e-Commerce Development Studios & workspaces all using the same Subversion repository. In my case, there are three developers, Thibaud, Chris, and Madan, thus I will setup three workspaces to use the same Subversion respository.

Documentation

There is a dedicated chapter in the Infor e-Commerce Development Studio User’s Guide:

Even better, there is a dedicated document in the M3 Adaptation Kit Version Control Guide, not for e-Commerce, but similar setup:
2_

What about Git?

I wish I could use Git, instead of Subversion. I believe Git would work for e-Commerce just as well as Subversion does. The e-Commerce Development Studio requires Subclipse during installation; I could install Subclipse just to surpass that, then ignore it, and install Git. However, I asked Infor Support if Git would work with e-Commerce, and they responded it has not been tested and certified to completely work, and should problems arise due to an effect from using Git, they cannot provide support for it. So I will skip Git for now, and I will try it another time.

1. Subversion server

Install a Subversion server of your choice (e.g. Apache Subversion, TortoiseSVNVisualSVN):
3

Create the users (e.g. THIBAUD, CHRIS, MADAN):
4

Create a new repository, and save the Repository URL in your notes:
5_ 5__

Schedule a regular backup of the repository, e.g.:

The Subversion repository is now ready to host the e-Commerce projects.

2. Bootstrap

Choose one user (e.g. Thibaud) to bootstrap the e-Commerce projects (e.g. B2C and B2B) to the Subversion repository for the rest of the team (e.g. Chris, Madan).

I make the assumption that the Eclipse workspace is private (non-shared), e.g. C:\Users\THIBAUD\workspace\ , that it already has the e-Commerce Development Studio fully setup, and that the e-Commerce projects (e.g. B2C, B2B) are fully setup (see previous post):

Note 1: If the projects are in a shared workspace, e.g. C:\e-Commerce\workspace\, and you want to move them to the private workspace, simply cut and paste the project folder from the shared workspace to the private workspace.

Note 2: Don’t make a duplicate (copy) of a project, because after we bootstrap the project to the Subversion repository, any duplicate of that project would be out of reach of Subversion and deprecated.

Go to Eclipse > Window > Open Perspective > SVN Repository Exploring, create new Repository Location, and enter the URL of the Subversion repository created earlier, with the username and password of the workspace’s user (e.g. THIBAUD):

For each project (e.g. B2C, and B2B), do the following:

Select > Team > Share Project:
7_

Select repository type SVN:
7__

Use existing repository location:
7___

Change folder to trunk:
7____

Enter a commit comment, e.g. Initial import:
7_____

Wait for the synchronization to finish:
7_______

Select Team > Commit:

Select everything except the following files and folders, and enter a commit comment, e.g. Initial commit:
extensions/businessobjectmethods.jar
src/com/
businessobject_timestamps.txt

Wait for the SVN Commit to finish:
8 8_

Each file now has a revision number, date, and author:

Verify in Team > Show history:
8_____

Verify the repository in the Subversion server:
8___

The project is now ready for the rest of the team to checkout.

Repeat for each project (e.g. B2C, B2B).

3. Other team members

Now we can setup the Eclipse workspaces and projects for the rest of the team (e.g. Chris, Madan).

Regarding the Eclipse IDE itself, you can choose to use a private install for each user, a shared install for all users, or a shared configuration, see the Eclipse multi-user installs.

I make the assumption that each user has the e-Commerce Development Studio fully setup, with a private workspace, e.g. C:\Users\CHRIS\workspace\ , and with no e-Commerce project (e.g. no B2C, B2B), like so:
9

Setup the SVN Repository for this user and password (e.g. CHRIS):
9_

Expand the trunk, and checkout the projects (e.g. B2C, B2B):
9__

Leave the default values and click Next:
9___

Leave the default workspace and click Finish:
9____

Wait for the SVN Checkout to finish:

Verify the result:
9______

Select the Active project:
10_

Go to Business Objects tab, click Generate Stub Codes, and wait for it to finish:
10__ 10___

That will create the files:
extensions/businessobjectmethods.jar
src/com/
businessobject_timestamps.txt

10____

If not, you may have to clean, re-build, and/or refresh the project.

This team member’s environment is now all set.

Repeat for each remaining team member.

4. Everyday development

For everyday development:

Set the Active Project as usual:
10_

Select Team > Update to HEAD to update the project with the latest changes of everyone else:
11

Make the changes you need to any of the files (e.g. JSP, CSS, HTML), and save your changes:
11_

Deploy the application or presentation as needed:
11_____

Test your changes in e-Commerce as usual:
11___

Repeat as needed: make changes, deploy, test.

When done, select the files you modified, select Team > Commit, and enter a comment of your changes; ensure you select only the files you changed, nothing else:
11__ 11____

Verify in the SVN Repository > Show History.

Now, when the other team members select Team > Update to HEAD, they will see your changes in their workspace.

Future work

Next time, I would like to try with Git instead of Subversion.

Conclusion

That was an illustration of how to setup Subversion in e-Commerce for a team to work on the same project at the same time. The first user bootstraps the project to the Subversion repository, and the other users checkout that project from the repository.

Special thanks to Wayne Liu of Infor and Marina Baldan of CAD IT for the help.

That’s it!

Please like, comment, subscribe, share, author.

Relate articles

OCI PunchOut in Infor e-Commerce

Here is my first test of Open Catalog Interface (OCI) in Infor e-Commerce.

About OCI

OCI is a standard from SAP from around year 1999:
1__

It competes with the cXML standard from Ariba also from around year 1999.

I will use OCI for PunchOut with e-Commerce, i.e. for a buyer to place an order in a seller’s e-Commerce, and retrieve the order in the buyer’s system (e.g. SAP, PeopleSoft).

Documentation

Infor e-Commerce supports OCI out of the box. Unfortunately, the documentation is meager, and when Infor acquired Lawson they removed the examples and screenshots of all documentation:

Thankfully, the old Lawson documentation still has examples and screenshots:
6

If we are familiar with Infor e-Commerce and OCI, and if we have the old documentation, we can figure it out.

1. Configuration for seller

Let’s configure the seller’s e-Commerce B2B, with role, customers, and users.

One time only, go to Business Center > Roles, select the desired role (e.g. Reseller), enable the Feature Element OCI Capable, and click Save:
4

For each customer, go to Business Center > Customers B2B > select a customer (e.g. 66045), and in the Customer Details > OCI Agreement, enter the Agreement Name/Description, Valid From/To, and Contact Person Buyer/Seller, and click Save:
3

For each user of each customer, go to Business Center > Users B2B, select the user (e.g. Thibaud), and in User Details > User Roles, enable the OCI Capable role (e.g. Reseller), and click Save:
5_

2. Configuration for buyer

Setup the buyer’s OCI software (e.g. SAP, PeopleSoft) to launch e-Commerce with the URL in the following format:

https://seller.com/infor-ecom-b2b/cc/Default2.jsp?@user.userid=tlopezschneider%40ciber.com&@user.password=Password123&reqpage=ItemList.jsp&HOOK_URL=https%3A%2F%2Fbuyer.com%2FOCI

Where:

  • https://seller.com/infor-ecom-b2b/cc/ is the base URL to Infor e-Commerce B2B Customer Center (replace the host, port, and path as needed). I had tried the B2C URL, but the reqpage had no effect, it only worked with the B2B URL.
  • Default2.jsp is the e-Commerce OCI page
  • @user.userid is the e-Commerce userid
  • @user.password is the e-Commerce password
  • reqpage=ItemList.jsp is the e-Commerce parameter to request the Item List landing page
  • HOOK_URL is the buyer’s OCI URL that will receive the e-Commerce order (ask the buyer for that URL), e.g. https://buyer.com/OCI

As usual, the parameter values must be URL-encoded in the URL.

That URL will launch e-Commerce, will authenticate the user, and will land the user in the items page, ready for the user to place an order.

3. Place an order

The user launches e-Commerce using the URL configured above (e.g. from SAP, PeopleSoft), the URL will authenticate the user to e-Commerce, and land directly in the e-Commerce items list:

Add items to the shopping cart as usual, go to View cart & checkout. Then, click Retrieve Order, it is a new button for the OCI Capable role:

At that moment, e-Commerce will logout, and will send the order to the buyer’s sytem by making an HTTP POST request to the specified HOOK_URL with the order details as x-www-form-urlencoded name/value parameters in the body:

Verify the order on the buyer’s system (e.g. SAP, PeopleSoft). That completes the process flow.

OciTestPage.jsp

There is a page OciTestPage.jsp that you can use in HOOK_URL for testing purposes:
10

But it seems to have a few problems in my environment, and I kept getting an HTTP 302 re-direct to the home page, so I had to fix a few things:

  • The parameter NEW_ITEM-VENDORMAT had an incorrect index, I had to correct it manually from [2] to [0].
  • It did not work with my User B2B Thibaud, it says “You are currently not authorized to see the requested page. Please login and try again.” I had to switch to admin, I must be missing a Role.
  • I had to force the parameter retrieveorder to any non-null value.
  • There is a parameter ocirul which I do not know how to use.

Future work

  • OCI does not support edit and cancel operations of requisition orders, unlike cXML, so I must find a workaround.
  • Most OCI implementations have customized tweaks, deviating from the standard, so I have to find the source code for OCI in e-Commerce, and see if I can modify it accordingly.

Conclusion

That was my first test of OCI in Infor e-Commerce for a buyer to PunchOut to a seller.

Special thanks to Wayne Liu and Karl Bonne at Infor for the help.

That’s it!

Please like, comment, subscribe, share, author.

How to install Infor e-Commerce Development Studio

Here is an illustrated guide on how to install Infor e-Commerce Development Studio.

History

Infor e-Commerce is the B2C and B2B solution for Infor M3. Here is some history I found from the archives. The product was started by Danish-based Catalog-International in 1997, which was acquired by Swedish-based Intentia International in 2002, which was acquired by US-based Lawson Software in 2005, which was acquired by Infor in 2011. Over the years, it has survived many cycles of re-branding, refactoring, re-integration, and feature changes. Its various names have been: Ideal Commerce Suite (Ideal Seller & Ideal Procurement), Movex e-Sales, Lawson e-Sales, Infor e-Commerce, and now Infor Rythm on Infor CloudSuite. The Development Studio is the current plugin for Eclipse to develop for e-Commerce. It is loosely inherited from the old Cat@log Builder and ide@l Design Center.

Documentation

You can download the documentation from Infor Xtreme > Search > Browse Documentation > Show All Product Lines > Infor e-Commerce:
0_

I will follow the Infor e-Commerce Development Studio Installation Guide and User’s Guide. They do not have screenshots, so I will show you screenshots here:
1___

I will assume the Infor e-Commerce server is already installed and setup with the SQL Server database, IBM WebSphere Application Server (WAS), and IBM HTTP Server (IHS). I will install e-Commerce Development Studio version 14.9.1.0 on a Windows x64. There are strict system requirements for ancient versions of software.

1. Java Development Kit

Install the Java SE Development Kit (JDK) version 1.6.0_45. Set the environment variables JAVA_HOME and PATH:
3

2. Eclipse IDE

Install Eclipse IDE for Java EE Developers version 3.7.1:
3____

Note: I had used the lasted Eclipse version 4.6, but e-Commerce Development Studio threw an error during installation, and I resolved it by reverting to the old Eclipse version 3.7.1:
Missing requirement: DesignCenter Plug-in 1.0.0 (com.lawson.eap.designcenter 1.0.0) requires 'bundle org.eclipse.core.runtime.compatibility 3.2.100' but it could not be found
3_

To install Eclipse, simply download and unzip, e.g. C:\e-Commerce\eclipse\ :

Then, launch Eclipse, and select a workspace, e.g. C:\Users\X\workspace\ :
3__

You can verify the result in Eclipse > About:
3___

Change the Eclipse > Preferences > Java > Compiler, to JDK compliance 1.6:
9__

By default it uses default JDK compliance 1.2, but then e-Commerce will throw compilation errors:
The return type is incompatible with AbstractSelectComponent.getResultset
2_

3. Subclipse plugin

Install the Subclipse plugin version 1.8.x for Eclipse, even if you will not use it:
4 4_

Note: If you do not install Subclipse – for instance if you want to install Git instead – e-Commerce Development Studio will throw an error during installation:
Missing requirement: DesignCenter Plug-in 1.0.0 (com.lawson.eap.designcenter 1.0.0) requires 'bundle org.tigris.subversion.subclipse.core 1.6.18' but it could not be found:
4

Note: I used the latest Subclipse version 4.2.x, but Eclipse threw an error, and I resolved it by reverting to the old Subclipse version 1.8.x:
Subclipse talks to Subversion via a Java API that requires access to native libraries. Those libraries were either not found or an incompatible version was loaded.
5_

4. e-Commerce Development Studio plugin

Download the Infor e-Commerce Development Studio plugin from Infor Xtreme > Downloads > Products > Customer Relationship Management > Infor e-Commerce:
0

Unzip the download, and install the plugin:
0__ 6

Verify the installation details:
6_

In Window > Open Perspectives, select the Infor e-Commerce Development Studio perspective:

e-Commerce Development Studio is ready to be used.

5. Infor Application Installer (IAI)

Install the Infor Application Installer (IAI):
7

Note: I had an error earlier because of the missing JDK in the PATH:
7_
7__

Select Install IAI:
7___

Find the WAS folder on your e-Commerce server, e.g. C:\IBM\WebSphere\AppServer\ :
7_____

In IAI, click Browse, and select the WAS folder. IAI will automatically find the profile (e.g. AppSrv01), cell name (e.g. Node01Cell), node name (e.g. Node01), and internal server name (e.g. server1). Set the Admin login name and password, and click Start:
7____ 7______

You can verify the installation log in the temp folder, e.g. C:\Users\X\AppData\Local\Temp\Y\install-iai\ :
7_______

You can verify the resulting installation folder, e.g. C:\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\WIN-70T65OKA2OJNode01Cell\Publish.ear\ :
7________

You can verify the IAI About page, e.g. http://localhost:9080/publish/About :
7_________

The Application Installer is now ready to deploy e-Commerce applications.

6. New Application

Back in Eclipse, select File > New > New Registered Application:
8___ 8_

Enter a Project Name and Application Name, e.g. infor-ecom:
8__

It will create the new project, and it will automatically build the workspace and generate the file businessobjectmethods.jar, wait for it to finish:

Whenever a timestamp changes in the project, e-Commerce Development Studio will re-build the project, and it can be time consuming and frustrating. To avoid waiting unnecessarily, un-check the Project > Build Automatically, and remember to manually Build Project before deploying:

Go to menu Infor e-Commerce Development Studio > Set Active Project, and select the project:

Go to menu Infor e-Commerce Development Studio > Deployment Settings, and enter the Deployment Target Properties, with Web Server Name as defined in WAS:
10 10_ 10__

Go to tab Data Sources > MS SQL Server > sqlserver > right-click > Connection, and add a new connection, with the e-Commerce database information:
11_ 11__ 11

The e-Commerce application is now ready to be deployed.

7. Deploy

Build the Project, and wait for the build to finish.

In the menu Infor e-Commerce Development Studio, select Deploy Application:
12 12_

The e-Commerce application is now deployed on WAS, and ready to use. There is no need to restart WAS.

8. Result

Test the resulting e-Commerce application.

Customer Center:
http://localhost:9080/infor-ecom/cc
13

Busines Center:
http://localhost:9080/infor-ecom/bc
13_

We now have a working e-Commerce Development Studio, project, and website to develop with.

9. Everyday development

For everyday development:

We can now modify the JSP, CSS, HTML, and other files in the src folder, re-build the project, and re-deploy as needed:

It is quicker to deploy just the presentation, either bc, cc, or common, depending on where we modified the files, rather than re-deploying the entire application:

Remember to set the active project again after each time you exit Eclipse.

Future work

In future work, I would like to:

  • Setup a B2B application (it involves swApp.vbs), in addition to the default B2C
  • Setup a team environment with Subversion for multiple developers to collaborate on the same e-Commerce application at the same time without overriding each other.
  • Setup logging, troubleshooting, and Java debugging for e-Commerce.
  • Deploy multiple applications on the same WAS.
  • Develop JSP that call Business Objects.
  • Use the XML Gateway.
  • Use Git instead of Subversion.
  • Set the Active Project by default.

Conclusion

That was a guide on how to install Infor e-Commerce Development Studio, with lots of illustrations to compensate for the lack of screenshots from the Infor documentation. e-Commerce Development Studio relies on many standards (J2EE, Eclipse, Subversion, etc.), as such it is familiar territory to install. But it requires ancient versions of its software requirements that if not met will cause errors. And the mystery of the e-Commerce Development Studio’s automatic build, at unexpected times, and lengthy, is a known frustration.

That’s it!

Please like, comment, share, subscribe, and come author with us.

M3 Infor Enterprise Search – Search query examples V2

Infor published a new version of the Search query examples document for
M3 Infor Enterprise Search (IES) available on the Knowledge Base at KB 1687355.

IES is an important part of M3 to increase user productivity, like a Google Search for M3.

Here are the topics of the document:

  • Simple search
  • Advanced search
  • Search including reserved words
  • M3 IES usage through API calls
  • Multi level key search
  • Very advanced search queries
  • Lucene references

Here is a sample screenshot of the document:
sample

See the document at KB 1687355.

Thank you Magnus.