Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bunch of bugs, use Go Modules #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 0 additions & 47 deletions Gopkg.lock

This file was deleted.

34 changes: 0 additions & 34 deletions Gopkg.toml

This file was deleted.

7 changes: 7 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module github.com/fiorix/wsdl2go

go 1.19

require golang.org/x/net v0.0.0-20190107155100-1a61f4433d85

require golang.org/x/text v0.3.0 // indirect
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
golang.org/x/net v0.0.0-20190107155100-1a61f4433d85 h1:3DfFuyqY+mca6oIDfim5rft3+Kl/CHLe7RdPrUMzwv0=
golang.org/x/net v0.0.0-20190107155100-1a61f4433d85/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
10 changes: 8 additions & 2 deletions wsdlgo/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,13 @@ func (ge *goEncoder) writePortType(w io.Writer, d *wsdl.Definitions) error {
return nil
}
n := d.PortType.Name
typeName := strings.ToLower(n)[:1] + n[1:]
typeName = strings.Replace(typeName, "-", "", -1)
return portTypeT.Execute(w, &struct {
Name string
Interface string
}{
strings.ToLower(n)[:1] + n[1:],
typeName,
goSymbol(n),
})
}
Expand Down Expand Up @@ -755,6 +757,10 @@ func (ge *goEncoder) writeSOAPFunc(w io.Writer, d *wsdl.Definitions, op *wsdl.Op
soapAction = bindingOp.Operation11.Action
}
}

portType := strings.ToLower(d.PortType.Name[:1]) + d.PortType.Name[1:]
portType = strings.Replace(portType, "-", "", -1)

if soapAction != "" {
soapActionFuncT.Execute(w, &struct {
RoundTripType string
Expand All @@ -775,7 +781,7 @@ func (ge *goEncoder) writeSOAPFunc(w io.Writer, d *wsdl.Definitions, op *wsdl.Op
}{
soapFunctionName,
soapAction,
strings.ToLower(d.PortType.Name[:1]) + d.PortType.Name[1:],
portType,
goSymbol(op.Name),
namespacedOpName,
operationInputDataType,
Expand Down
1 change: 1 addition & 0 deletions wsdlgo/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type BindingPackageName wsdl.Binding

func (p BindingPackageName) String() string {
packageName := strings.Replace(strings.ToLower(p.Name), ".", "", -1)
packageName = strings.Replace(packageName, "-", "_", -1)
if packageName == "" {
packageName = fallbackPackageName
}
Expand Down