-
Notifications
You must be signed in to change notification settings - Fork 392
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
how to use generated service? #77
Comments
It is very important i can not find any sample anywhere? |
Hello , Please help me , I have using gowsdl.exe my.wsdl to myservice.go When i wrote the test file: type LoginRequest struct { client := myservice.NewSOAPClient("MYURL service", true, nil)
Run it, then from console log:
Why my parameter not in there? (username, password,...). Thanks for your support. |
still no any examples? wow |
Example: package integration
import (
"do/pkg/soap"
"fmt"
"testing"
)
func TestSoapClient(t *testing.T) {
url := "http://webservices/service.asmx"
soapService := soap.NewServiceSoap(url, false, &soap.BasicAuth{})
echoReply, err := soapService.Ping(&soap.Ping{Message: "a"})
fmt.Println(echoReply.PingResult)
} Replace import |
The above is out of date. See: https://github.com/hooklift/gowsdl/blob/master/example/example.go |
type LoginRequest struct {
XMLName xml.Name `xml:"http://entities login"`
Username string `xml:"username,omitempty"`
Password string `xml:"password,omitempty"`
PartnerID string `xml:"partnerID,omitempty"`
} Go uses capitalization to indicate private and public fields in structs. If a field name is not capitalized, it is private, and thus not usable by methods external to your package. |
it would be very helpful to see basic example of how to use the generated code.
i am just starting with golang. i've managed to generate
myservice.go
and now what?The text was updated successfully, but these errors were encountered: