Categorygithub.com/UNO-SOFT/soap-proxy
modulepackage
0.18.3
Repository: https://github.com/uno-soft/soap-proxy.git
Documentation: pkg.go.dev

# README

soapproxy

A simple SOAP <-> gRPC proxy.

1. Generate the WSDL

with ./protoc-gen-wsdl:

protoc --wsdl_out=myproxy -I $GOPATH/src $GOPATH/src/unosoft.hu/ws/bruno/pb/dealer/dealer.proto

will create myproxy/dealer.wsdl and myproxy/dealer.wsdl.go.

2. Generate the Client code

with github.com/UNO-SOFT/gprcer/protoc-gen-grpcer:

protoc --grpcer_out=myproxy -I $GOPATH/src $GOPATH/src/unosoft.hu/ws/bruno/pb/dealer/dealer.proto

will create myproxy/dealer.grpcer.go, with grpc.Client implementation in it.

3. Profit!

Then use the SOAPHandler in myproxy/main.go (see ./example/example.go):

cc, err := grpcer.Connect("grpc-host:port", "ca.pem", "localhost")
if err != nil {
	log.Fatal(err)
}
http.ListenAndServe(
	":8080",
	soapproxy.SOAPHandler{Client:NewClient(cc), WSDL:soapproxy.Ungzb64(WSDLgzb64)},
)

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
FindBody will find the first StartElement after soap:Body.
No description provided by the author
SOAPCall destURL with SOAPAction=action, decoding the response body into resp.
SOAPCallWithHeader calls with the given SOAP- and extra header and action.
SOAPCallWithHeader calls with the given SOAP- and extra header and action.
Ungzb64 decodes-decompresses the given gzipped-base64-encoded string.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author

# Structs

No description provided by the author
SOAPFault fault.
SOAPHandlerConfig is the configuration for NewSOAPHandler.