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

wsdl --> grpc #2

Open
ghost opened this issue Dec 14, 2017 · 5 comments
Open

wsdl --> grpc #2

ghost opened this issue Dec 14, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented Dec 14, 2017

this is really nice.

I was wondering if you think its going to be difficult to do the opposite.
Use case:
You get given a WSDL to some Microsoft SOAP system that you have to talk to and its like " ah shit here we go again" :). How am i going to easily talk to it using golang.

SO maybe there is a way to point the generator at the WSDL and generate bindings for it.

@tgulacsi
Copy link
Contributor

There are a lot of WSDL client generators, such as https://github.com/hooklift/gowsdl
But wsdl is quite complex, with lot of branches (document or literal), possibly integrated xsd spec - you'll have to send xml to that SOAP endpoint, so a generated .proto file won't be enough.

I don't have a use case for this now, sorry.

@mmundy3832
Copy link

I just found this comment while looking for exactly the same tool suggested by ghost.

I am currently attempting to port .Net Framework application with a WSDL-defined interface (from ONVIF.org) into a .Net Core app in Visual Studio 2019. Since WCF is not supported in .Net Core It looks like I will need to convert a WSDL file to a proto file by hand to use gRPC.

So there is at least a use case now.

@tgulacsi
Copy link
Contributor

tgulacsi commented Nov 1, 2019

Sorry, but SOAP is quite complex, just opposite of it's name.
And WSDL multiplies it.
And the wsdl->proto transformation is lossy, you won't generate the same wsdl from that proto file (maybe except when you cheat and just reuse the original wsdl).

But please prove me wrong - I have to communicate with predefined wsdl, and sometimes the wsdl is enforced...

@mwelser
Copy link

mwelser commented Nov 11, 2019

really would be great to have something like this - also having the problem right now that I have to talk with a go client with a legacy soap service and the WSDL to go generators are not really working 100%

having a kind of grpc proxy that my golang client only needs to communicate via grpc would be great

@tgulacsi
Copy link
Contributor

Yes, that would be great.

For calling SOAP, I'm using wsdl-analyzer.com to generate stub request, then use valyala/fasttemplate to generate such xml.
For responses, I use miku/zek to generate a struct for the answer, tweak it, and use the standard encoding/xml to parse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants