@techspokes/typescript-wsdl-client 0.10.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -2253
- package/docs/AGENTS.md +47 -0
- package/docs/README.md +35 -0
- package/docs/api-reference.md +223 -0
- package/docs/architecture.md +115 -0
- package/docs/cli-reference.md +518 -0
- package/docs/concepts.md +212 -0
- package/docs/configuration.md +74 -0
- package/docs/gateway-guide.md +124 -0
- package/docs/generated-code.md +74 -0
- package/docs/migration.md +107 -0
- package/docs/production.md +80 -0
- package/docs/troubleshooting.md +70 -0
- package/llms.txt +53 -0
- package/package.json +14 -7
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
Common issues and debugging guidance for wsdl-tsc.
|
|
4
|
+
|
|
5
|
+
See [README](../README.md) for quick start and [CLI Reference](cli-reference.md) for command details.
|
|
6
|
+
|
|
7
|
+
## Common Issues
|
|
8
|
+
|
|
9
|
+
| Symptom | Resolution |
|
|
10
|
+
|---------|------------|
|
|
11
|
+
| WSDL fetch fails | Curl the URL, check TLS/proxy settings, retry with local copy |
|
|
12
|
+
| Unresolved type references | Re-run with --client-fail-on-unresolved=false to inspect partial graph |
|
|
13
|
+
| Missing schema in OpenAPI | Ensure the global element exists (catalog shows compiled symbols) |
|
|
14
|
+
| Wrong array modeling | Check maxOccurs in WSDL; tool only arrays when maxOccurs>1 or unbounded |
|
|
15
|
+
| Authentication errors | Provide proper soap.ISecurity instance (WSSecurity, BasicAuthSecurity) |
|
|
16
|
+
| Date/time confusion | Use --client-date-as Date for runtime Date objects |
|
|
17
|
+
| TypeScript compilation errors | Check --import-extensions matches your tsconfig moduleResolution |
|
|
18
|
+
| Gateway validation failures | Ensure OpenAPI has valid $ref paths and all schemas in components.schemas |
|
|
19
|
+
| Catalog file not found | Catalog defaults to output directory; use --catalog-file to specify |
|
|
20
|
+
|
|
21
|
+
## SOAP Wire Logging
|
|
22
|
+
|
|
23
|
+
Enable SOAP request/response debugging:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
NODE_DEBUG=soap node app.js
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Verify Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx wsdl-tsc --help
|
|
33
|
+
npm run smoke:pipeline
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## TypeScript Configuration
|
|
37
|
+
|
|
38
|
+
Ensure your tsconfig.json is compatible:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"compilerOptions": {
|
|
43
|
+
"target": "ES2022",
|
|
44
|
+
"module": "NodeNext",
|
|
45
|
+
"moduleResolution": "NodeNext",
|
|
46
|
+
"strict": true,
|
|
47
|
+
"esModuleInterop": true,
|
|
48
|
+
"skipLibCheck": true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Catalog Inspection
|
|
54
|
+
|
|
55
|
+
Examine the compiled catalog to debug type resolution:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx wsdl-tsc compile \
|
|
59
|
+
--wsdl-source ./wsdl/Hotel.wsdl \
|
|
60
|
+
--catalog-file build/hotel-catalog.json
|
|
61
|
+
|
|
62
|
+
cat build/hotel-catalog.json | jq '.types'
|
|
63
|
+
cat build/hotel-catalog.json | jq '.operations'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or inspect catalog from client generation:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
cat ./src/services/hotel/catalog.json | jq '.types'
|
|
70
|
+
```
|
package/llms.txt
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @techspokes/typescript-wsdl-client
|
|
2
|
+
|
|
3
|
+
> Generate type-safe TypeScript SOAP clients, OpenAPI 3.1 specs, and
|
|
4
|
+
> production-ready Fastify REST gateways from WSDL/XSD definitions.
|
|
5
|
+
|
|
6
|
+
## Quick Facts
|
|
7
|
+
|
|
8
|
+
- CLI binary: wsdl-tsc
|
|
9
|
+
- Node.js >= 20.0.0
|
|
10
|
+
- Runtime dependency: soap
|
|
11
|
+
- Output: TypeScript client + OpenAPI 3.1 + Fastify gateway
|
|
12
|
+
- All output is deterministic and diff-friendly
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
npm install --save-dev @techspokes/typescript-wsdl-client
|
|
17
|
+
npm install soap
|
|
18
|
+
|
|
19
|
+
## Primary Command
|
|
20
|
+
|
|
21
|
+
npx wsdl-tsc pipeline \
|
|
22
|
+
--wsdl-source <path-or-url> \
|
|
23
|
+
--client-dir <output-dir> \
|
|
24
|
+
--openapi-file <output-path> \
|
|
25
|
+
--gateway-dir <output-dir> \
|
|
26
|
+
--gateway-service-name <slug> \
|
|
27
|
+
--gateway-version-prefix <version>
|
|
28
|
+
|
|
29
|
+
## Generated Files
|
|
30
|
+
|
|
31
|
+
- client/client.ts: typed SOAP client class
|
|
32
|
+
- client/types.ts: TypeScript interfaces from XSD
|
|
33
|
+
- client/utils.ts: runtime metadata
|
|
34
|
+
- client/catalog.json: compiled WSDL representation
|
|
35
|
+
- openapi.json: OpenAPI 3.1 specification
|
|
36
|
+
- gateway/plugin.ts: Fastify plugin entry point
|
|
37
|
+
- gateway/routes.ts: route aggregator module
|
|
38
|
+
- gateway/routes/: route handlers with typed request bodies
|
|
39
|
+
- gateway/runtime.ts: envelope builders and error handler
|
|
40
|
+
- gateway/schemas.ts: schema registration module
|
|
41
|
+
- gateway/schemas/: JSON schemas for validation and serialization
|
|
42
|
+
- gateway/_typecheck.ts: build-time type-check fixture
|
|
43
|
+
|
|
44
|
+
## Documentation
|
|
45
|
+
|
|
46
|
+
- AGENTS.md: agent instructions (universal, tool-agnostic)
|
|
47
|
+
- README.md: project overview and quick start
|
|
48
|
+
- CONTRIBUTING.md: development setup, project structure, testing strategy
|
|
49
|
+
- docs/migration.md: upgrade paths between versions
|
|
50
|
+
- .github/copilot-instructions.md: authoritative detailed agent instructions (referenced by AGENTS.md)
|
|
51
|
+
- docs/README.md: documentation directory index and conventions
|
|
52
|
+
- npm: https://www.npmjs.com/package/@techspokes/typescript-wsdl-client
|
|
53
|
+
- GitHub: https://github.com/TechSpokes/typescript-wsdl-client
|
package/package.json
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techspokes/typescript-wsdl-client",
|
|
3
|
-
"version": "0.10.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.10.2",
|
|
4
|
+
"description": "Generate type-safe TypeScript SOAP clients, OpenAPI 3.1 specs, and production-ready Fastify REST gateways from WSDL/XSD definitions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wsdl",
|
|
7
7
|
"soap",
|
|
8
8
|
"typescript",
|
|
9
|
+
"openapi",
|
|
10
|
+
"rest",
|
|
11
|
+
"gateway",
|
|
12
|
+
"fastify",
|
|
9
13
|
"codegen",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
14
|
+
"soap-to-rest",
|
|
15
|
+
"api-gateway",
|
|
16
|
+
"code-generator",
|
|
17
|
+
"wsdl-to-typescript"
|
|
13
18
|
],
|
|
14
19
|
"homepage": "https://github.com/TechSpokes/typescript-wsdl-client#readme",
|
|
15
20
|
"bugs": {
|
|
@@ -41,8 +46,10 @@
|
|
|
41
46
|
},
|
|
42
47
|
"files": [
|
|
43
48
|
"dist",
|
|
49
|
+
"docs",
|
|
44
50
|
"README.md",
|
|
45
|
-
"LICENSE"
|
|
51
|
+
"LICENSE",
|
|
52
|
+
"llms.txt"
|
|
46
53
|
],
|
|
47
54
|
"scripts": {
|
|
48
55
|
"dev": "tsx src/cli.ts",
|
|
@@ -81,6 +88,6 @@
|
|
|
81
88
|
},
|
|
82
89
|
"funding": {
|
|
83
90
|
"type": "github",
|
|
84
|
-
"url": "https://github.com/
|
|
91
|
+
"url": "https://github.com/sponsors/TechSpokes"
|
|
85
92
|
}
|
|
86
93
|
}
|