4. Independent Server Demo Application Execution Procedure

This package provides the following demo programs as samples for verifying the operation of the eShop REST API.

Table 4-1 Overview of Sample Demos
Name Overview Location
Server Demo This sample demonstrates use of the eShop REST API on an independent server. demo/eshop-demo-server/

This section describes how to run the server demo.

Note:

Previously, a client-side sample was provided as a demo for using NWF. However, that sample was removed from the package as of version 4.

 

4.1. Configuring the Server Demo

This section describes how to build the server demo on a PC.

4.1.1. Operating Environment

Building the server demo requires installation of the Java SE Development Kit and Maven. Operations have been confirmed in the following versions.

Table 4-2. Packages Used to Build the Server Demo
Package Version
Java SE Development Kit 8
Maven 3.1.1
Note:

When using versions later than Java SE 8u51, valid SSL communications might not be possible in some cases due to prohibition of the RC4 cipher suite. As a workaround, you must import the Java Cryptography Extension so that the Cipher can be safely read.

  1. Download jce8 (Java Cryptography Extension).
  2. Extract the downloaded ZIP file, and copy the included US_export_policy.jar and local_policy.jar files to the following location.
  • Windows
    • JAVA_HOME\jre\lib\security
  • Linux
    • $JAVA_HOME/jre/lib/security

4.1.2. Building the Server Demo

The Java SE Development Kit and Maven must be configured to build the server demo. Configure these programs as follows.

  • Set the JAVA_HOME environment variable to the path where the Java SE Development Kit is installed.
  • Add %JAVA_HOME%/bin to the PATH environment variable.
  • Add the path where Maven is installed to the PATH environment variable.
Note:

If proxy settings are required to connect to the Internet, configure the proxy server in the conf/settings.xml file located in the Maven installation folder.

Use the following procedure to build the server demo.

  1. Go to the directory where the server demo pom.xml file is located.
  2. Run the command described in Code 4-1.
  3. If the log matches the information described in Code 4-2, the build was successful.
    • The demo/eshop-demo-server/target/eshop-demo-server.war file is created when the build succeeds.
Code 4-1. Server Demo Build Command
mvn clean package -DskipTests=true
Code 4-2. Log Output When Build Succeeds
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

4.1.3. Configuring the Server/Client Certificate

Independent servers that use the eShop REST API must be configured with the client certificate used when operating as a client of the eShop server, and the server certificate used when operating as a server for the game application.

Setting the Client Certificate

For more information about setting the client certificate, see 2.1.3.1. Authentication Between the Independent Server and eShop REST API.

Note:

You can use eshop-cert-sample.keystore and eshop-cert-sample.truststore as a sample client certificate only for title 0xF946D on the Wii U and 0xFF3F9 on the 3DS.

Setting the Server Certificate

For more information about setting the server certificate, see 3.1.5.1. Authentication Between the Game Application and the Independent Server.

4.1.4. Running the Server Demo

If the server demo is run in a Windows environment, run the run-{environment}.bat file that is included in the server demo ({environment} is either dev, test, or prod).

In Linux, run commands in the patch file as reference.


 

  • Test whether the demo is running by accessing the following address (or similar) in a web browser. 
    Example: http://localhost:8888/v1_0/
  • If a server certificate is set up, confirm that it also works at the following address.
    Example: https
    ://localhost:8443/v1_0/
  • Set the domain and port based on your own environment.

The following screens are displayed while accessing the server.

Figure 4-1. Server Demo Screen

 


CONFIDENTIAL