Skip to content

Commit 1199a88

Browse files
committed
Fix #79 schemaLocation is optional
1 parent 1cbc239 commit 1199a88

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gowsdl.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,12 @@ func (g *GoWSDL) resolveXSDExternals(schema *XSDSchema, loc *Location) error {
234234
}
235235

236236
for _, impts := range schema.Imports {
237+
// Download the file only if we have a hint in the form of schemaLocation.
238+
if impts.SchemaLocation == "" {
239+
log.Printf("[WARN] Don't know where to find XSD for %s", impts.Namespace)
240+
continue
241+
}
242+
237243
if e := download(loc, impts.SchemaLocation); e != nil {
238244
return e
239245
}

0 commit comments

Comments
 (0)