Added some additional text

This commit is contained in:
Keith Armstrong 2025-01-02 08:30:24 -05:00
parent 2c5bf8fe30
commit 04cd101cc6

View File

@ -2,21 +2,23 @@
## What is soapClient?
soapClient.jar allows you to send data to a SOAP service using an XML template file and an input CSV file. The program takes a configuration file which defines different aspects of the program including:
soapClient.jar allows you to send data to a SOAP service using an XML template file and an input CSV file. The program reads a configuration file which defines different aspects of the program including:
<ul>
<li>SOAP Service URL</li>
<li>SOAP Service Username</li>
<li>SOAP Service Password</li>
<li>CSV Input File</li>
<li>XML Template file</li>
<li>Use SSL</li>
<li>CSV Input File</li>
<li>Whether to use SSL</li>
<li>Java Keystore</li>
<li>Java Keystore Password</li>
</ul>
## Command line parameters
### --key
This is the key (must be <b>16 characters</b>) which is used to encrypt the password that is stored in the configuration file.
This is the key (must be 16 characters) which is used to encrypt the password that is stored in the configuration file.
### --encrypt
This is the value to encrypt using the encryption key. You need to pass both <i>--key</i> and <i>--encrypt</i> in order to get a correct result.
@ -35,7 +37,8 @@ The bash script shown below can be used to verify the contents of the CSV input
```bash
#!/bin/bash
java -cp lib/commons-codec-1.17.1.jar:lib/commons-csv-1.12.0.jar:lib/commons-io-2.18.0.jar:lib/jcommander-1.82.jar:lib/soapClient.jar com.belkast.soap.userVerify
JAVA=/usr/local/bin/java
$JAVA -cp lib/commons-codec-1.17.1.jar:lib/commons-csv-1.12.0.jar:lib/commons-io-2.18.0.jar:lib/jcommander-1.82.jar:lib/soapClient.jar com.belkast.soap.userVerify
```
### linux_runner.sh
@ -44,14 +47,13 @@ The bash script shown below can be used to run the program.
```bash
#!/bin/bash
java -cp lib/commons-codec-1.17.1.jar:lib/commons-csv-1.12.0.jar:lib/commons-io-2.18.0.jar:lib/jcommander-1.82.jar:lib/soapClient.jar com.belkast.soap.webService "$@"
JAVA=/usr/local/bin/java
$JAVA -cp lib/commons-codec-1.17.1.jar:lib/commons-csv-1.12.0.jar:lib/commons-io-2.18.0.jar:lib/jcommander-1.82.jar:lib/soapClient.jar com.belkast.soap.webService "$@"
```
## Program components
Do not forget to include the following four JAR files as dependencies when building the soapClient.JAR.
I use IDEA IntelliJ Community Ediiton when writing JAVA code.
Do not forget to include the following four JAR files as dependencies when building the soapClient.jar.
<ul>
<li><a href="https://repo1.maven.org/maven2/org/apache/commons/commons-csv/1.12.0/commons-csv-1.12.0.jar">commons-csv-1.12.0.jar</a></li>
@ -62,7 +64,7 @@ I use IDEA IntelliJ Community Ediiton when writing JAVA code.
### Configuration file
This is the main file used by the program, and one similar to that shown below is all you need to get started.
This is the main file containing the settings used by the program, and one with settings similar to those shown below is all you need to get started.
```toml
SHIM_URL = https://test.mycompany.com:8443/IDMProv/role/service
@ -70,7 +72,7 @@ PASSWORD = PT9TKHwFgJCxATJtAAMtMwtIF0UjFal6fo5riBN+ExY=
USERNAME = cn=keitha,ou=active,ou=users,o=belkast
XML_FILE = USER_TO_ROLE.xml
INPUT_FILE = msalah.csv
USE_SSL = true
SSL = true
JAVA_KS_LOCATION = ldap.keystore
JAVA_KS_PASSWORD = changeit
```
@ -104,10 +106,10 @@ This is the XML file that is sent to the SOAP service once all search and replac
### Java keystore
If the SOAP service uses <b>https</b> you have one of two choices for keystore:
If the SOAP service uses <b>https</b> you have one of two options when choosing which keystore to use:
<ul>
<li>Use your own local keystore and specify it in the configuration file</li>
<li>Use the system-wide JRE or JDK keystore</li>
<li>Use a local keystore, which must be specified in the configuration file and must contain all necessary certificates</li>
<li>Use the systemwide JRE or JDK keystore. Once again, this must contain all necessary certificates</li>
</ul>
@ -132,7 +134,7 @@ To verify the CSV input file, run the <i>linux_verify.sh</i> bash script as show
./linux_verify.sh
```
Assume we have the CSV input file, <i>msalah.csv</i>, below.
Assume we want to process the CSV input file, <i>msalah.csv</i>, shown below.
```text
USER_DN,ROLE_DN,DESC
@ -173,7 +175,7 @@ To run the program, just run the <i>linux_runner.sh</i> bash script shown at the
### Getting Help
If you run the <i>linux_runner.sh</i> bash script with no command line parameters, you will receive a help screen.
If you run the <i>linux_runner.sh</i> bash script with no command line parameters, you will receive a help screen as shown below.
```zsh
./linux_runner.sh
@ -194,7 +196,7 @@ Usage: <main class> [options]
Please note that if the <i>--key</i> command line parameter and the <i>--encrypt</i> command line parameter are specified, the program will encrypt the passed value and exit.
Initially, the program checks for the following potential issues before sending the SOAP XML to the SOAP service:
The program checks for the following potential issues before sending the SOAP XML to the SOAP service:
<ul>
<li>The <i>--key</i> command line parameter is specified:</li>
@ -231,7 +233,7 @@ Record 1 : ROLE_DN => cn=TestRole,o=belkast
Record 1 : DESC => Test Load
```
Once the CSV file is processed, the data is sent to the SOAP service. The XML file below is the file that is sent for our example. Notice that the tokens have been replaced with the data from the CSV file.
For each of the lines in the input CSV file, the corresponding XML data is sent to the SOAP service. The XML data shown below is the data that is sent for our particular example. Notice that the tokens have been replaced with the data from the corresponding line in the CSV input file.
```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.novell.com/role/service">