github.com/Axway/agent-sdk@v1.1.101/pkg/util/wsdl/decoder.go (about) 1 package wsdl 2 3 import ( 4 "encoding/xml" 5 ) 6 7 // Unmarshal unmarshals WSDL documents starting from the <definitions> tag. 8 // 9 // The Definitions object it returns is an unmarshalled version of the 10 // WSDL XML that can be introspected to generate the Web Services API. 11 func Unmarshal(bytes []byte) (*Definitions, error) { 12 var d Definitions 13 // decoder := xml.NewDecoder(r) 14 // decoder.CharsetReader = charset.NewReaderLabel 15 err := xml.Unmarshal(bytes, &d) 16 if err != nil { 17 return nil, err 18 } 19 return &d, nil 20 }