A simple SOAP <-> gRPC proxy.
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
.
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.
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)},
)