Popularity
6.9
Stable
Activity
0.0
Stable
516
13
179
Programming language: Go
License: MIT License
Latest version: v1.4.4
Go Soap alternatives and similar packages
Based on the "Web Frameworks" category.
Alternatively, view Go Soap alternatives based on common mentions on social networks and blogs.
-
Gin
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin. -
Gorilla WebSocket
DISCONTINUED. A fast, well-tested and widely used WebSocket implementation for Go. -
Iris
The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio :rocket: -
GoFrame
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang. -
goa
🌟 Goa: Elevate Go API development! 🚀 Streamlined design, automatic code generation, and seamless HTTP/gRPC support. ✨ -
GoFr
An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability. -
Faygo
Faygo is a fast and concise Go Web framework that can be used to develop high-performance web app(especially API) with fewer codes. Just define a struct handler, faygo will automatically bind/verify the request parameters and generate the online API doc. -
Huma
A modern, simple, fast & flexible micro framework for building HTTP REST/RPC APIs in Go backed by OpenAPI 3 and JSON Schema. -
go-server-timing
DISCONTINUED. Go (golang) library for creating and consuming HTTP Server-Timing headers -
golongpoll
golang long polling library. Makes web pub-sub easy via HTTP long-poll servers and clients :smiley: :coffee: :computer:
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai
Do you think we are missing an alternative of Go Soap or a related project?
Popular Comparisons
README
Go Soap
package to help with SOAP integrations (client)
Install
go get github.com/tiaguinho/gosoap
Examples
Basic use
package main
import (
"encoding/xml"
"log"
"net/http"
"time"
"github.com/tiaguinho/gosoap"
)
// GetIPLocationResponse will hold the Soap response
type GetIPLocationResponse struct {
GetIPLocationResult string `xml:"GetIpLocationResult"`
}
// GetIPLocationResult will
type GetIPLocationResult struct {
XMLName xml.Name `xml:"GeoIP"`
Country string `xml:"Country"`
State string `xml:"State"`
}
var (
r GetIPLocationResponse
)
func main() {
httpClient := &http.Client{
Timeout: 1500 * time.Millisecond,
}
soap, err := gosoap.SoapClient("http://wsgeoip.lavasoft.com/ipservice.asmx?WSDL", httpClient)
if err != nil {
log.Fatalf("SoapClient error: %s", err)
}
// Use gosoap.ArrayParams to support fixed position params
params := gosoap.Params{
"sIp": "8.8.8.8",
}
res, err := soap.Call("GetIpLocation", params)
if err != nil {
log.Fatalf("Call error: %s", err)
}
res.Unmarshal(&r)
// GetIpLocationResult will be a string. We need to parse it to XML
result := GetIPLocationResult{}
err = xml.Unmarshal([]byte(r.GetIPLocationResult), &result)
if err != nil {
log.Fatalf("xml.Unmarshal error: %s", err)
}
if result.Country != "US" {
log.Fatalf("error: %+v", r)
}
log.Println("Country: ", result.Country)
log.Println("State: ", result.State)
}
Set Custom Envelope Attributes
package main
import (
"encoding/xml"
"log"
"net/http"
"time"
"github.com/tiaguinho/gosoap"
)
// GetIPLocationResponse will hold the Soap response
type GetIPLocationResponse struct {
GetIPLocationResult string `xml:"GetIpLocationResult"`
}
// GetIPLocationResult will
type GetIPLocationResult struct {
XMLName xml.Name `xml:"GeoIP"`
Country string `xml:"Country"`
State string `xml:"State"`
}
var (
r GetIPLocationResponse
)
func main() {
httpClient := &http.Client{
Timeout: 1500 * time.Millisecond,
}
// set custom envelope
gosoap.SetCustomEnvelope("soapenv", map[string]string{
"xmlns:soapenv": "http://schemas.xmlsoap.org/soap/envelope/",
"xmlns:tem": "http://tempuri.org/",
})
soap, err := gosoap.SoapClient("http://wsgeoip.lavasoft.com/ipservice.asmx?WSDL", httpClient)
if err != nil {
log.Fatalf("SoapClient error: %s", err)
}
// Use gosoap.ArrayParams to support fixed position params
params := gosoap.Params{
"sIp": "8.8.8.8",
}
res, err := soap.Call("GetIpLocation", params)
if err != nil {
log.Fatalf("Call error: %s", err)
}
res.Unmarshal(&r)
// GetIpLocationResult will be a string. We need to parse it to XML
result := GetIPLocationResult{}
err = xml.Unmarshal([]byte(r.GetIPLocationResult), &result)
if err != nil {
log.Fatalf("xml.Unmarshal error: %s", err)
}
if result.Country != "US" {
log.Fatalf("error: %+v", r)
}
log.Println("Country: ", result.Country)
log.Println("State: ", result.State)
}
Set Header params
soap.HeaderParams = gosoap.SliceParams{
xml.StartElement{
Name: xml.Name{
Space: "auth",
Local: "Login",
},
},
"user",
xml.EndElement{
Name: xml.Name{
Space: "auth",
Local: "Login",
},
},
xml.StartElement{
Name: xml.Name{
Space: "auth",
Local: "Password",
},
},
"P@ssw0rd",
xml.EndElement{
Name: xml.Name{
Space: "auth",
Local: "Password",
},
},
}