-
Notifications
You must be signed in to change notification settings - Fork 138
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
Added support for multi-service WSDLs #1314
Conversation
This pull request needs "/ok-to-test" from an authorized committer. |
Hi @PieterVoet, thanks for your pull request and keeping it up to date. Please give us a few days to organize the right reviewers for this part of the code. Thanks! (Also, of course, feel free to keep pushing us. :) ) |
@PieterVoet thanks for your work and the pull request. We had a look at it and maybe it is possible to solve that in simple way. First we wonder what should it mean when you have three services. Maybe the three services are just 3 different endpoints we can use for to reach the endpoint. And we have to add a routing accordingly. So that SOAP 1.1 requests will go a SOAP 1.1 endpoint and SOAP 1.2 request to SOAP 1.2. ... Let me know what your requirements are. |
WSDL is complicated :-) I messed up services and ports. |
Hi Thomas,
I'll attach a WSDL from IBM CMIS product as an example. This WSDL contains multiple service at the same endpoint.
The current code asserts the WSDL has just one endpoint, and exits if there are more :
From https://github.com/membrane/api-gateway/blob/master/core/src/main/java/com/predic8/membrane/core/rules/SOAPProxy.java :
if (services.size() != 1)
throw new IllegalArgumentException("There are " + services.size() + " services defined in the WSDL, but exactly 1 is required for soapProxy.");
Service service = services.get(0);
I modified the code to support multi-service WSDLs.. For each service, a rule will be added.
Hopefully this explains my PR.. Let me know if I need to elaborate more...
Thanks a lot & have a nice day !
Pieter Voet
Cloud Automation, IBM Expert Labs
+31 6 53412985
…________________________________
Van: Thomas Bayer ***@***.***>
Verzonden: donderdag 14 november 2024 14:01
Aan: membrane/api-gateway ***@***.***>
CC: PIETER VOET ***@***.***>; Mention ***@***.***>
Onderwerp: [EXTERNAL] Re: [membrane/api-gateway] Added support for multi-service WSDLs (PR #1314)
@ PieterVoet thanks for your work and the pull request. We had a look at it and maybe it is possible to solve that in simple way. First we wonder what should it mean when you have three services. Maybe the three services are just 3 different
@PieterVoet<https://github.com/PieterVoet> thanks for your work and the pull request. We had a look at it and maybe it is possible to solve that in simple way. First we wonder what should it mean when you have three services. Maybe the three services are just 3 different endpoints we can use for to reach the endpoint. And we have to add a routing accordingly. So that SOAP 1.1 requests will go a SOAP 1.1 endpoint and SOAP 1.2 request to SOAP 1.2. ...
Let me know what your requirements are.
—
Reply to this email directly, view it on GitHub<#1314 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAK3KMJ4QWP7L4BRWFHYUJ32ASNJRAVCNFSM6AAAAABQTCQLQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZWGI4TSOJVGQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
Unless otherwise stated above:
IBM Nederland B.V.
Gevestigd te Amsterdam
Inschrijving Handelsregister Amsterdam Nr. 33054214
|
Hi @PieterVoet , We are considering the following solution at the moment. Suppose you have a WSDL with ServiceA and ServiceB. Then you can declare two service proxies in proxies.xml. One with ServiceA and one with ServiceB: Would that solve your problem? |
Hi Thomas,
the WSDL was attached to my previous mail. You can download it from an IBM CMIS deployment if you have the product.
But it's just an example of a WSDL containing multiple services...
Then you can declare two service proxies in proxies.xml.
that was the approach I started with. But if I want to change the endpoint, I've gotta edit them all..
Splitting the WSDL into multiple WSDLs with one service each then is a manual step, and hence error-prone.
I modified the code to enhance API-Gateway and handle WSDLs with multiple services so you don't have to
configure it manually and make life easier.. 🙂 (The CMIS sample already has 8 services defined.. )
Pieter Voet
Cloud Automation, IBM Expert Labs
+31 6 53412985
…________________________________
Van: Thomas Bayer ***@***.***>
Verzonden: donderdag 14 november 2024 16:10
Aan: membrane/api-gateway ***@***.***>
CC: PIETER VOET ***@***.***>; Mention ***@***.***>
Onderwerp: [EXTERNAL] Re: [membrane/api-gateway] Added support for multi-service WSDLs (PR #1314)
Hi @PieterVoet , thanks for the clarification. Where can we download the WSDL? You can also send it to info@ predic8. de. We are considering the following solution at the moment. Suppose you have a WSDL with ServiceA and ServiceB. Then you can
Hi @PieterVoet<https://github.com/PieterVoet> ,
thanks for the clarification. Where can we download the WSDL? You can also send it to ***@***.******@***.***>.
We are considering the following solution at the moment. Suppose you have a WSDL with ServiceA and ServiceB. Then you can declare two service proxies in proxies.xml. One with ServiceA and one with ServiceB:
Would that solve your problem?
—
Reply to this email directly, view it on GitHub<#1314 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAK3KMI42EGNUW4PPF2LU2D2AS4MXAVCNFSM6AAAAABQTCQLQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZWGY2DCOJRGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
Unless otherwise stated above:
IBM Nederland B.V.
Gevestigd te Amsterdam
Inschrijving Handelsregister Amsterdam Nr. 33054214
|
@PieterVoet thanks for your input and the PR. We implemented the issues in #1344 |
WSDLs can contain multiple services. Current code throws an exception if multiple services were detected.
My modification processes all services in the WSDL and adds them as separate SOAPProxy rules.
Hence, proxies.xml can be configured as :
Unfortunately for SSL, there's something weird with the SSL configuration, so
<soapProxy port="2000" wsdl="https://<MY-WS-SERVER>:<PORT>/<MY-WSDL-ENDPOINT>" />
will end up throwing a ' Could not download the WSDL' IllegalArgumentException, caused by not finding
the WS server SSL certificate.
As a circumvention, the 'file:' notation works. First download the WSDL with https endpoints , then :