gowsdl icon indicating copy to clipboard operation
gowsdl copied to clipboard

Can we have a verbose more or better error messages please?

Open keltia opened this issue 10 years ago • 3 comments

Using the latest version grabbed by go get on OS X 10.11 with Xcode 7.2 and Go 1.5.2.

I'm trying to process a fairly complicated file, with multiple (local, mostly xsd) imports (yes I'm using that special branch support-for-imports) and it fails with this:

574 [13:58] roberto@rron> gowsdl -p airspace -o airspace.go AirspaceServices_PREOPS_19.5.0.wsdl
🍀  72:69: expected type, found ',' (and 10 more errors)

I don't even know in which file it is failing, I do not see the line or anything that could gives me a clue on where the problem actually is.

Thanks.

keltia avatar Dec 10 '15 13:12 keltia

@keltia, I just merged https://github.com/hooklift/gowsdl/pull/48, I might not fix your problem but it is worth trying again. The error message you see is given by https://golang.org/pkg/go/format/ which fails when the source has syntax errors, which in turn happen because something from the WSDL was not correctly generated into Go.

c4milo avatar Dec 10 '15 15:12 c4milo

But generally, I find out what file is the culprit by running go build on the generated source.

c4milo avatar Dec 10 '15 15:12 c4milo

@c4milo oh I have seen that the generated file is mostly wrong as the parsing didn't identify large part of the wsdl file (for reasons that are not displayed at all). I'd like better message on progress during the conversion and during the formatting as, as you said, it indicates something is wrong in the former. I'll investigate why the conversion is so bad but that's probably for another issue. As for now, gowsdl does not identify any types at all so the output file is unusable.

keltia avatar Dec 10 '15 19:12 keltia