Skip to content

Commit 2877d38

Browse files
authored
HPCC4J-334 Automate WsClient Interface (hpcc-systems#616)
- Adds python to generate new wsdls, stub, and wrappers - Adds vscode launch profile - Updates filespray wsdl reference in pom - Targets source code wrapper utility rather than jared version Signed-off-by: Rodrigo Pastrana <[email protected]>
1 parent 12665ce commit 2877d38

File tree

4 files changed

+638
-2
lines changed

4 files changed

+638
-2
lines changed

.vscode/launch.json

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Generate all services 9.0.x",
9+
"type": "python",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/wsclient/utils/wsInterfaceUpdater.py",
12+
"console": "integratedTerminal",
13+
"justMyCode": true,
14+
"args": ["-b", "candidate-9.0.x"],
15+
"cwd": "${workspaceFolder}"
16+
},
17+
{
18+
"name": "wsdl updater help",
19+
"type": "python",
20+
"request": "launch",
21+
"program": "${workspaceFolder}/wsclient/utils/wsInterfaceUpdater.py",
22+
"console": "integratedTerminal",
23+
"justMyCode": true,
24+
"args": ["-h"],
25+
"cwd": "${workspaceFolder}"
26+
},
27+
{
28+
"name": "Generate 9.0.x wssmc",
29+
"type": "python",
30+
"request": "launch",
31+
"program": "${workspaceFolder}/wsclient/utils/wsInterfaceUpdater.py",
32+
"console": "integratedTerminal",
33+
"justMyCode": true,
34+
"cwd": "${workspaceFolder}",
35+
"args": ["-b", "candidate-9.0.x", "-s", "wssmc"]
36+
},
37+
{
38+
"name": "Generate 9.0.x wscodesign",
39+
"type": "python",
40+
"request": "launch",
41+
"program": "${workspaceFolder}/wsclient/utils/wsInterfaceUpdater.py",
42+
"console": "integratedTerminal",
43+
"justMyCode": true,
44+
"cwd": "${workspaceFolder}",
45+
"args": ["-b", "candidate-9.0.x", "-s", "wscodesign", "-v"]
46+
},
47+
{
48+
"name": "Generate 9.0.x wsworkunits",
49+
"type": "python",
50+
"request": "launch",
51+
"program": "${workspaceFolder}/wsclient/utils/wsInterfaceUpdater.py",
52+
"console": "integratedTerminal",
53+
"justMyCode": true,
54+
"cwd": "${workspaceFolder}",
55+
"args": ["-b", "candidate-9.0.x", "-s", "wsworkunits"]
56+
},
57+
{
58+
"name": "Generate 9.0.x filespray",
59+
"type": "python",
60+
"request": "launch",
61+
"program": "${workspaceFolder}/wsclient/utils/wsInterfaceUpdater.py",
62+
"console": "integratedTerminal",
63+
"justMyCode": true,
64+
"cwd": "${workspaceFolder}",
65+
"args": ["-b", "candidate-9.0.x", "-s", "filespray"]
66+
},
67+
{
68+
"name": "Generate 9.0.x wsCloud",
69+
"type": "python",
70+
"request": "launch",
71+
"program": "${workspaceFolder}/wsclient/utils/wsInterfaceUpdater.py",
72+
"console": "integratedTerminal",
73+
"justMyCode": true,
74+
"cwd": "${workspaceFolder}",
75+
"args": ["-b", "candidate-9.0.x", "-s", "wscloud"]
76+
},
77+
{
78+
"type": "java",
79+
"name": "Axis2ADBStubWrapperMaker",
80+
"request": "launch",
81+
"mainClass": "org.hpccsystems.ws.client.utils.Axis2ADBStubWrapperMaker",
82+
"projectName": "wsclient",
83+
"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"
84+
}
85+
]
86+
}

wsclient/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
<unpackClasses>true</unpackClasses>
272272
<databindingName>adb</databindingName>
273273
<packageName>org.hpccsystems.ws.client.gen.axis2.filespray.latest</packageName>
274-
<wsdlFile>src/main/resources/WSDLs/WsFileSpray.wsdl</wsdlFile>
274+
<wsdlFile>src/main/resources/WSDLs/FileSpray.wsdl</wsdlFile>
275275
<wsdlVersion>1.23</wsdlVersion>
276276
<syncMode>sync</syncMode>
277277
<namespaceURIs>
@@ -591,7 +591,7 @@
591591
<unpackClasses>true</unpackClasses>
592592
<databindingName>adb</databindingName>
593593
<packageName>org.hpccsystems.ws.client.gen.axis2.wscodesign.latest</packageName>
594-
<wsdlFile>src/main/resources/WSDLs/WsCodeSign.wsdl</wsdlFile>
594+
<wsdlFile>src/main/resources/WSDLs/Ws_codesign.wsdl</wsdlFile>
595595
<wsdlVersion>1.1</wsdlVersion>
596596
<syncMode>sync</syncMode>
597597
<namespaceURIs>

wsclient/utils/README.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
wsclient utils
2+
==============
3+
4+
## WS Interface Update Tool
5+
This utility updates the WsClient web service client interface to match the latest interface as defined by the target version of ESP
6+
7+
### Dependancies
8+
9+
- Python 3
10+
#### ESP based solution
11+
- Running HPCC instance with accessible ESP
12+
13+
#### ESDL based solution
14+
- git client tool - Clones HPCC-Platform and HPCC4J locally
15+
- esdl - HPCC-Platform's esdl client tool, included in client tools install package, or can be built from source Should be on system path.
16+
17+
### Usage
18+
19+
```console
20+
usage: generate-wsdl [-h] [-s SERVICE] [-b BRANCH] [-u USER] [-v] [-d] [-l] [-e]
21+
22+
optional arguments:
23+
-h, --help show this help message and exit
24+
-s SERVICE, --service SERVICE
25+
26+
Service to target for wsdl generation
27+
default: all
28+
example: wsdfu
29+
30+
-b BRANCH, --branch BRANCH
31+
32+
Branch to target for wsdl generation
33+
default: master
34+
example: hpcc4j-8.8.X
35+
36+
-u USER, --user USER
37+
User for repository fetch
38+
default: hpcc-systems
39+
example: mygithubusername
40+
-t HPCCHOST, --targethpcchost HPCCHOST
41+
Running HPCC host to fetch WSDLs
42+
default: localhost
43+
-p HPCCPORT, --hpccport HPCCPORT Running HPCC Port to fetch WSDLs
44+
default: 8010
45+
46+
-v, --verbose Give more verbose information
47+
-d, --debug Ouput debugging information
48+
-l, --list-services List available services for stubcode generation
49+
-e, --esdlwsdl Generate WSDLs from ESDL
50+
```
51+
52+
Example usage:
53+
54+
```console
55+
python3 generate-wsdl -s wssmc
56+
```
57+
58+
The above example fetches WSDLs from ESP on http://localhost:8010, determines if wssmc's interface has been updated in HPCC-Platform/esp.
59+
If wssmc has been updated, the latest WSDL is generated, latest stub code and wrappers are generated.
60+
61+
62+
```console
63+
python3 generate-wsdl -b candidate-9.0.x -s wssmc -e
64+
```
65+
66+
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.
67+
If wssmc has been updated, the latest WSDL is generated, latest stub code and wrappers are generated.
68+
69+
70+

0 commit comments

Comments
 (0)