@@ -13,7 +13,6 @@ import (
13
13
"go/parser"
14
14
"go/token"
15
15
"io"
16
- "log"
17
16
"net/http"
18
17
"net/url"
19
18
"os"
@@ -713,14 +712,10 @@ func (ge *goEncoder) writeSOAPFunc(w io.Writer, d *wsdl.Definitions, op *wsdl.Op
713
712
retDefaults [len (retDefaults )- 1 ] = "err"
714
713
715
714
// Check if we need to prefix the op with a namespace
716
- mInput := ge .funcs [op .Name ].Input
717
715
namespacedOpName := op .Name
718
-
719
- if mInput != nil {
720
- nsSplit := strings .Split (mInput .Message , ":" )
721
- if len (nsSplit ) > 1 {
722
- namespacedOpName = nsSplit [0 ] + ":" + namespacedOpName
723
- }
716
+ nsSplit := strings .Split (ge .funcs [op .Name ].Input .Message , ":" )
717
+ if len (nsSplit ) > 1 {
718
+ namespacedOpName = nsSplit [0 ] + ":" + namespacedOpName
724
719
}
725
720
726
721
// The response name is always the operation name + "Response" according to specification.
@@ -1367,27 +1362,17 @@ func (ge *goEncoder) genGoStruct(w io.Writer, d *wsdl.Definitions, ct *wsdl.Comp
1367
1362
1368
1363
func (ge * goEncoder ) genGoOpStruct (w io.Writer , d * wsdl.Definitions , bo * wsdl.BindingOperation ) error {
1369
1364
name := goSymbol (bo .Name )
1370
- function := ge .funcs [name ]
1371
1365
1372
- if function .Input == nil {
1373
- log .Printf ("function input is nil! %v is %v" , name , function )
1374
- } else {
1375
- message := trimns (function .Input .Message )
1376
- inputMessage := ge .messages [message ]
1366
+ inputMessage := ge .messages [trimns (ge .funcs [bo .Name ].Input .Message )]
1377
1367
1378
- // No-Op on operations which don't take arguments
1379
- // (These can be inlined, and don't need to pollute the file)
1380
- if len (inputMessage .Parts ) > 0 {
1381
- ge .genOpStructMessage (w , d , name , inputMessage )
1382
- }
1368
+ // No-Op on operations which don't take arguments
1369
+ // (These can be inlined, and don't need to pollute the file)
1370
+ if len (inputMessage .Parts ) > 0 {
1371
+ ge .genOpStructMessage (w , d , name , inputMessage )
1383
1372
}
1384
1373
1385
- if function .Output == nil {
1386
- log .Printf ("function output is nil! %v is %v" , name , function )
1387
- } else {
1388
- // Output messages are always required
1389
- ge .genOpStructMessage (w , d , name , ge .messages [trimns (ge .funcs [bo .Name ].Output .Message )])
1390
- }
1374
+ // Output messages are always required
1375
+ ge .genOpStructMessage (w , d , name , ge .messages [trimns (ge .funcs [bo .Name ].Output .Message )])
1391
1376
1392
1377
return nil
1393
1378
}
0 commit comments