I'm currently testing Apigee as a proxy over an existing, well-established SOAP API and wondering if there is a way to avoid each of the methods having an individual URL?
Ideally I would like to configure the current URL to point to Apigee so that consumers are not required to change any of their existing endpoints, however I've noticed that even with the SOAP pass-through import, Apigee gives each of the operations/methods an individual resource URL and it is only callable via this.
For instance, when importing the following API WSDL: https://apiconnector.com/v2/api.svc?wsdl
There is a POST method called AddContactToAddressBook.
Currently you would call POST: https://apiconnector.com/v2/api.svc with the header "SOAPAction" and a value of "http://apiconnector.com/v2/ApiService/AddContactToAddressBook"
But when posting the same data to the Apigee endpoint (without using the URL) it returns a JSON error response:
{ "Envelope": { "encodingStyle": "http:\\/\\/schemas.xmlsoap.org\\/soap\\/encoding\\/", "Body": { "Fault": { "faultcode": "soap:Server", "faultstring": "Raising fault. Fault name : unknown-resource", "faultactor": {}, "detail": { "source": { "errorcode": "messaging.runtime.RaiseFault" } } } } } }
If I call {apigee.domain}/api/AddContactToAddressBook then it works.
Is there any way to configure the proxy to operate in the existing manner? Where a user posts to the root endpoint rather than individual method URLs?
Also how would my consumers get the WSDL of the underlying SOAP API?
Thanks
Solved! Go to Solution.
When you are building your Proxy instead of Using the option "WSDL" in the wizard you can use the option "Backend Service". As part of that option you do not need to import a WSDL rather you will only need to apply the basePath of your SOAP service.
If you build the service this way as soon as click finish on the Proxy creation Wizard it will create a basic proxy to your backend without adding any policies. And you can start calling it exactly the same way you are directly calling your backend.
Once the basic proxy is built then go ahead and start adding any policies you might want.
Let me know if you need any further help with this.
Sarthak
When you are building your Proxy instead of Using the option "WSDL" in the wizard you can use the option "Backend Service". As part of that option you do not need to import a WSDL rather you will only need to apply the basePath of your SOAP service.
If you build the service this way as soon as click finish on the Proxy creation Wizard it will create a basic proxy to your backend without adding any policies. And you can start calling it exactly the same way you are directly calling your backend.
Once the basic proxy is built then go ahead and start adding any policies you might want.
Let me know if you need any further help with this.
Sarthak
Is this "Backend Service" option still available? I do not see it when creating the proxy.
Thanks for the response @sarthak, that works perfectly.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |