wsdl-tsclient icon indicating copy to clipboard operation
wsdl-tsclient copied to clipboard

Running into an issue with OpenBraceToken child on valid wsdl

Open roopakv opened this issue 2 years ago • 3 comments

Thank you for putting this project together! Really helpful :)

I'm trying to generate a ts-client for a valid wsdl and running into an error A child of the kind OpenBraceToken was expected

I've attached the wsdl file here, curious if I am missing something or what the bug might be. I'm pretty sure ts-morph is throwing the error but unsure if the error is how it is being called or something else.

Human_Resources.wsdl.zip

roopakv avatar Aug 31 '23 18:08 roopakv

I am getting the same error here and the wsdl is Valid

I am getting Error: A child of the kind OpenBraceToken was expected.

I am not getting out an index file or the client in the generated folder

peterarusanoff avatar Nov 08 '23 23:11 peterarusanoff

I found what the issue is with in src/generator.ts on line 322 createClientDeclaration.setBodyText("return soapCreateClientAsync(args[0], args[1], args[2]) as any;"); the generator errors out here. I am very curios as to why

peterarusanoff avatar Nov 09 '23 01:11 peterarusanoff

So after digging in a little bit deeper, The file. name of my WSDL started with a number (1) . This caused all kinds of problems with the generator.

I am still not sure why it caused a problem with the setBodyText method above but it did

Further down in the index generator it caused another issue there

Once I removed the number from the file name the generator created all the definitions and the client as well as the index file.

Unfortunately after I generated the index I started to notice another issue. 12 imported file names where wrong Either the case was wrong in the interface or the file path was wrong image I had one duplicate on FareRouteGrp

file ./definitionsOffpointDetails1 did not exist but ./definitions/OffPointDetails1 did and the definition from that file was imported 3 separate times I guess ill open another ticket

peterarusanoff avatar Nov 09 '23 02:11 peterarusanoff