Skip to content

Commit ae3c821

Browse files
author
Tamás Gulácsi
committed
SoapBody.Body needs ",innerxml"
1 parent 680602c commit ae3c821

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

generator/soap.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ type SoapHeader struct {
2828
}
2929

3030
type SoapBody struct {
31-
Body string
32-
Fault SoapFault
31+
Body string `xml:",innerxml"`
32+
Fault SoapFault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
3333
}
3434

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

9898
body, err := ioutil.ReadAll(res.Body)
99+
if len(body) == 0 {
100+
Log.Warn("empty response")
101+
return nil
102+
}
99103

100104
respEnvelope := &SoapEnvelope{}
101105

0 commit comments

Comments
 (0)