WSO2 APIM: Merge multiple SOAP WSDLs - soap

We have a different number of services that have specific WSDLs, although we wanted to merge them into a single one, are we able to do that?
To clarify the question we will provide an example of a backend:
http://mytest.ws.com/resource/v2/service.asmx
http://mytest.ws.com/resource/v2/service.asmx?wsdl
http://mytest.ws.com/resource/v2/service2.asmx
http://mytest.ws.com/resource/v2/service2.asmx?wsdl
What we are trying to achieve is to join these services in a single base resource, such as:
http://mywso2apim.com/resource/v2/service.asmx
http://mywso2apim.com/resource/v2/service2.asmx
Is this possible to achieve via WSO2 API Manager?
Thanks for your time!

Related

Having different Paths in the same Rest API

We are using Spring. Is it possible to have different paths in the same REST service. We have one service and we want to have two different endpoints like following in the same REST API. I don't want to follow the best prictices. My question is if it is possible and how? thanks.
http_//domain.com/product/{id}
http_//domain.com/user/{id}
It is possible like below.
#RequestMapping({ "/product/{id}", "/user/{id}" })
Refer multiple-requestmapping-value-with-path-variables

How to search with multiple entities in Axios Assyst?

I am using making two http calls to Assyst REST api to fetch Priority value and closure action value like as follows.
> http://localhost:8989/assyst/assystGOLD/Priority?shortCode=%225%22&fields=name,shortCode&fmt=xml
> http://localhost:8989/assyst/assystGOLD/ActionType?shortCode=%22closure%22&fmt=xml
Now I want to merge these two url's to work in a single call. So I made below URL, but no luck.
http://localhost:8989/assyst/assystGOLD/ActionType?shortCode=%22closure%22&Priority?shortCode=%225%22&fields=name,shortCode&fmt=xml
Can anyone help me on this?
This isn't possible I'm afraid. The REST API only works with a single resource (Priority and Action Type in your example) in each request. You need to make two requests to get these two unrelated pieces of information.
Your example is using the legacy API's syntax. I recommend using the new REST API for new development - it is embedded within the main assyst Enterprise application and has much improved performance.
Paul

How to share a common mapping template at AWS API Gateway?

I'm having a lot of duplicated mapping templates across endpoints on my AWS API Gateway implementation.
I would like to have a single template defined, and then just tell an endpoint to use that particular template.
Is this possible?
This is not currently supported, but definitely something we can consider in the future as we update the service.
Update: My apologies. Templates are exposed as their own resource. Can you tell me how you are creating your API? I may be able to advise on how to re-use them correctly.

Several REST endpoint on WSO2 ESB proxy service

I'm new in this technology, so please excuse me for the question.
I have a WSO2 ESB configured on server. I managed to configure different Proxy Services one by one, the thing i'd like to do, since they are all child of one service to put them into one proxy and use it with parameters.
Something like:
http://localhost:8290/services/URL1/{id}
http://localhost:8290/services/URL2/{id}
I can't find comprehensive explanation on how to do this.
Could someone provide me with the proxy source example with more then one endpoint defined there, if it is possible.
Thanks a lot in advance,
Liudmila
You can use REST apis , there you can use url mapping and url templates as you want.
check the document[1]
https://docs.wso2.com/display/ESB470/Getting+Started+with+REST+APIs#GettingStartedwithRESTAPIs-URLmappings

Best way to specify version in REST service calls [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to version REST URIs
I'm currently writing a REST service and I would like to get some ideas on how my clients can specify the service version when making a request.
For example when I upgrade my REST server to version 2 I don't want calls to break for all clients that have implemented version 1 of my service.
I've seen others add the version in the url or specify the version in the header somewhere.
There may not be a "best" way to implement this but I would appreciate some thoughts on the subject( pro's and con's of each etc...)
Thanks
We do it via separate routes:
http://my.service.com/v1/user/1
http://my.service.com/v2/user/1
In the case of no change between versions, we just map the route to the controller that services the v1 version of the resource.
Yes, this does create multiple URL's for the same resource, and the wonky hardcore REST evanginlists will start crying, but this way makes it easy to manage for you and your users. I find users can't even use request headers to set things like content types nevermind an X-Path or something like that to handle versioning....
If you really want to avoid the duplicate resource issue, you couldpass in a get paramter like version:
http://my.service.com/user/1?version=1
If no version, default to whatever. This is actually fully REST dogmatic, but I think it puts a lot onto your API users.
You could do some kind of user lookup table to route between version if you have a way to map user or api key to version, but this is pretty crazy overhead.
I would recommend versioning via the Accept/Content-Type header. The URIs shouldn't change across versions unless there is a large structural change to the resources themselves. Here is a great explanation: Best practices for API versioning?