Skip to content

Commit

Permalink
SoapBody.Body needs ",innerxml"
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamás Gulácsi committed Sep 2, 2014
1 parent 680602c commit ae3c821
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions generator/soap.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ type SoapHeader struct {
}

type SoapBody struct {
Body string
Fault SoapFault
Body string `xml:",innerxml"`
Fault SoapFault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
}

type SoapFault struct {
Expand Down Expand Up @@ -96,6 +96,10 @@ func (s *SoapClient) Call(soapAction string, request, response interface{}) erro
defer res.Body.Close()

body, err := ioutil.ReadAll(res.Body)
if len(body) == 0 {
Log.Warn("empty response")
return nil
}

respEnvelope := &SoapEnvelope{}

Expand Down

0 comments on commit ae3c821

Please sign in to comment.