Skip to content

Commit

Permalink
HPCC4J-334 Automate WsClient Interface
Browse files Browse the repository at this point in the history
- Adds python to generate new wsdls, stub, and wrappers
- Adds vscode launch profile

Signed-off-by: Rodrigo Pastrana <[email protected]>
  • Loading branch information
rpastrana committed Jun 12, 2023
1 parent 95b5279 commit 75acd13
Show file tree
Hide file tree
Showing 4 changed files with 572 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Generate all services 9.0.x",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/wsclient/utils/wsInterfaceUpdater.py",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["-b", "candidate-9.0.x"],
"cwd": "${workspaceFolder}"
},
{
"name": "wsdl updater help",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/wsclient/utils/wsInterfaceUpdater.py",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["-h"],
"cwd": "${workspaceFolder}"
},
{
"name": "Generate 9.0.x wssmc",
"type": "python",
"request": "launch",
"program": "/home/ubuntu/GIT/generate-wsdl/generate-wsdl",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["-b", "candidate-9.0.x", "-s", "wssmc", "-v"]
},
{
"type": "java",
"name": "Axis2ADBStubWrapperMaker",
"request": "launch",
"mainClass": "org.hpccsystems.ws.client.utils.Axis2ADBStubWrapperMaker",
"projectName": "wsclient",
"args": "servicename=wssmc outputpackage=org.hpccsystems.ws.client.wrappers targetpackage=org.hpccsystems.ws.client.gen.axis2.wssmc.latest servicename=WsSMC outputdir=/home/ubuntu/GIT/generate-wsdl/hpcc4j/wsclient/src/main/java"
}
]
}
45 changes: 45 additions & 0 deletions wsclient/utils/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Generate all services 9.0.x",
"type": "python",
"request": "launch",
"program": "/home/ubuntu/GIT/generate-wsdl/generate-wsdl",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["-b", "candidate-9.0.x"],
"cwd": "${workspaceFolder}"
},
{
"name": "wsdl updater help",
"type": "python",
"request": "launch",
"program": "/home/ubuntu/GIT/generate-wsdl/generate-wsdl",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["-h"],
"cwd": "${workspaceFolder}"
},
{
"name": "Generate wssmc",
"type": "python",
"request": "launch",
"program": "/home/ubuntu/GIT/generate-wsdl/generate-wsdl",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["-b", "candidate-9.0.x", "-s", "wsdfu"]
},
{
"type": "java",
"name": "Axis2ADBStubWrapperMaker",
"request": "launch",
"mainClass": "org.hpccsystems.ws.client.utils.Axis2ADBStubWrapperMaker",
"projectName": "wsclient",
"args": "servicename=wssmc outputpackage=org.hpccsystems.ws.client.wrappers targetpackage=org.hpccsystems.ws.client.gen.axis2.wssmc.latest servicename=WsSMC outputdir=/home/ubuntu/GIT/generate-wsdl/hpcc4j/wsclient/src/main/java"
}
]
}
70 changes: 70 additions & 0 deletions wsclient/utils/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
wsclient utils
==============

## WS Interface Update Tool
This utility updates the WsClient web service client interface to match the latest interface as defined by the target version of ESP

### Dependancies

- Python 3
#### ESP based solution
- Running HPCC instance with accessible ESP

#### ESDL based solution
- git client tool - Clones HPCC-Platform and HPCC4J locally
- esdl - HPCC-Platform's esdl client tool, included in client tools install package, or can be built from source Should be on system path.

### Usage

```console
usage: generate-wsdl [-h] [-s SERVICE] [-b BRANCH] [-u USER] [-v] [-d] [-l] [-e]

optional arguments:
-h, --help show this help message and exit
-s SERVICE, --service SERVICE
Service to target for wsdl generation
default: all
example: wsdfu
-b BRANCH, --branch BRANCH
Branch to target for wsdl generation
default: master
example: hpcc4j-8.8.X
-u USER, --user USER
User for repository fetch
default: hpcc-systems
example: mygithubusername
-t HPCCHOST, --targethpcchost HPCCHOST
Running HPCC host to fetch WSDLs
default: localhost
-p HPCCPORT, --hpccport HPCCPORT Running HPCC Port to fetch WSDLs
default: 8010
-v, --verbose Give more verbose information
-d, --debug Ouput debugging information
-l, --list-services List available services for stubcode generation
-e, --esdlwsdl Generate WSDLs from ESDL
```

Example usage:

```console
python3 generate-wsdl -s wssmc
```

The above example fetches WSDLs from ESP on http://localhost:8010, determines if wssmc's interface has been updated in HPCC-Platform/esp.
If wssmc has been updated, the latest WSDL is generated, latest stub code and wrappers are generated.


```console
python3 generate-wsdl -b candidate-9.0.x -s wssmc -e
```

The above example clones HPCC-Platform and HPCC4J's candidate-9.0.x branches, determines if wssmc's interface has been updated in HPCC-Platform/esp.
If wssmc has been updated, the latest WSDL is generated, latest stub code and wrappers are generated.



Loading

0 comments on commit 75acd13

Please sign in to comment.