Most of our bespoke applications in AWS are containerized .NET Core apps and so far we haven't needed to build any SOAP APIs - virtually all of the APIs that we've delivered (whether exposed publicly via AWS API Gateway or internal only) are JSON RPC following a RESTful architecture/design principles.
We also have a third party COTS product deployed into our AWS account that produces SOAP webhooks and we need to receive and process these SOAP webhooks produced by the third party COTS product.
Ideally we don't want to build a bespoke SOAP API / translation layer - even if WCF is now supported in .NET Core / 5+, I'd much rather we just stick with HTTP/REST and .NET Core WebAPIs which is well understood by our delivery teams. Ideally there is a way e.g. a native AWS service, that would allow us to translate the SOAP request to a HTTP/REST request. Does anyone know if there's a native AWS service with these capabilities?
Cheers.
The translation would be something like the following
HTTP method GET/POST + SOAP operation verb endpoint
POST /soap/cancelOrder <message>{id}</message>
<=>
HTTP method GET/POST/PUT/PATCH/DELETE + REST resource noun endpoint
DELETE /rest/orders/{id}
Without a naming convention it is hard to translate. Another issue here, that real REST services return hypermedia with a flexible structure, while SOAP services return SOAP message with a ridig structure defined in WSDL. Yet another issue that SOAP is stateful, while REST is stateless.
Maybe in edge cases it is possible to automatically translate for example by services which do only basic CRUD without any real business logic.
Related
I see on the documentation for REST API how they explain the Model architecture, but not for HTTP API. Is this because the HTTP API doesn't require models?
For example I have this data in DynamoDB:
Usually in the REST API one would perform user input validation which is part of the model (if I'm correct), I don't see that option in HTTP API. Can someone explain me how I build (or if it's needed) this model for HTTP API? For example, what if the user goes to /todos/{id} ?
Is this model concept moved to lambda or somewhere else or still lives in the gateway?
Thanks
HTTP API is more recent addition to Api Gateway, it is much simpler, cheeper and easier to use but will not support bunch of features that REST API supports. Model Validations in one of those un supported features. Here is the comparison.
All validations will reside within the application code.
API Gateway data transformations are not supported with HTTP APIs, but are supported with REST APIs.
You can think of API Gateway's HTTP API as a streamlined version of the REST API. HTTP APIs have fewer features than REST API. As a result, HTTP APIs are faster and cheaper. The trade-off is that you have fewer features to choose from when working with HTTP APIs.
If you want to use data transformations, you'll need to use REST API. If you'd prefer to use the cheaper/faster HTTP API, you'll need to do data transformations yourself (e.g. code you write yourself in Lambda).
We are altering our webservices to require an application using them to provide information on the real user who is requesting the data. For REST services we are implementing this using an X-On-Behalf-Of HTTP header. Should we do the same for SOAP services? Or better put it in a custom SOAP request header? What are best practices in this area?
Though answer depends on internals of your application architecture and other design principals you might have followed.
Its ideal to keep Rest/SOAP services implemented the almost same security Model, hence if you're planing to use `X-On-Behalf-Of' HTTP, it make sense to use same in case of SOAP services as well.
But, in case of SOAP it you're using WS-Security or some Kind of Custom SOAP Header to do Authentication/Authorization in every SOAP Call, it makes more sense to Modify SOAP header itself to get the additional On-Behalf-Of' detail as well rather then Custom HTTP Header forX-on-behalf-of`
Refer Message 2 - WS-Trust Token Exchange Request section for more details.
I am certain I need to use an API Gateway, but I can't understand the main differences between the different tools in my use case scenario.
Currently, I have multiple services (DBs, Mobile App, Web App and some additional systems. Consider there are 15 different services) that communicate with each other through REST APIs. This is difficult to manage and test, so I would like to change the architecture into something more like what Netflix is doing with Zuul.
Ideally, the services don't know about the other services. They send a request to a specific endpoint (the API Gateway). Then, the API Gateway interacts with the necessary services and sends the response back.
Here is one example in practice: a service sends a request to a custom (endpoint) connector, the request is parsed, broken down into smaller requests that are sent to other services (that own the specific content requested), get the content back in the response, gather all the responses, create a final response with all the content gathered, send the response back to the first service that sent a request.
I need high availability, scalibility, fault tolerance, the ability to monitor and test all services in one place, ability to do canary testing, easy to add new services and manage the older services. I value open source software and mature software. Should run off premise.
The best solutions that I believe would solve my problem are: WSO2, Apigee, Zuul and Amazon API Gateway. I don't know which is more appropriate for my use case. I have looked at others, but I haven't found any advantages in features or cost against these 4.
Thank you for your feedback regarding advantages and disadvantages regarding these technologies! Other suggestions are also welcome!
Notes:
Not all of my services are on AWS, but some are.
The system needs to handle peaks with tens of thousands of requests per minute that happen regurarly, but never continuasly.
You can also consider the Forum Sentry API Security Gateway from Forum Systems (I work for Forum Systems).
Based on your example use case, if each of the "smaller request" services are using the same protocols (e.g. HTTPS), message formats (e.g. JSON) and security characteristics (TLS, authentication, etc.) then the solution should be relatively straight forward.
If each service is using different identity or message formats, say, then your API Gateway solution will also need to have strong capabilities around identity and message conversion. For example, one small request may require a BasicAuth header to authenticate to the service, whereas another small request may require a SAML assertion.
As you have landscape of different microservices, wherein each microservice has its own business context and is accessible by REST endponit. In this case, your client need not to aware about each microservice and thus API gateway comes into picture, using which you can have one entry point to all microservices landscape.
There are different API gateway solutions available like you said apigee, apiman etc. These framework gives some basic implementation of features required in API gateways like request throttling, monitization of request calls, authentication handle, centralized security etc.
Netflix's Zuul provides the filters which you need to implement yourself. So, if you are using Zuul, you have to implement all the features which you want to put in your API gateway by yourself.
I hope this explanation helps!!!
I built a web service using soap can i consume that service in another application using Rest Services that is by using get or Post Http methods?
Like wise Can i consume service using soap that is build using Rest
Both REST and SOAP protocols are published and consumed over HTTP. SOAP adds a layer on top of it for encoding data, that is not used on REST services nor clients.
So, for SOAP services use a SOAP client, and for REST services use a REST client. However, if you need to integrate different types of services, you could build an app that has both REST and SOAP clients, and publishes the result either as a SOAP service, a REST service, or both.
I have many webservice that they use wsdl. I want to use ESB for relation between webservices.
I don't know choose mule, is it correct or no?
I search about this problem I find wso2 esb, I don't know it's good for my work or no. I'm very confused.
I don't know how do I do?
Please help me.
You can use as well Oracle Service Bus as well.
Here are some notes i do for a coleague asking same question:
One thing to know about ESB is that there is not perfect definition for it. The scope and role may vary depending on the needs.
One of the most important things that you can do via ESB is to decouple the client from the
service providers
ESB helps to have:
● a service location transparency
● sharing of services accross the enterprise
● separate the business service from service implementation
Esb Capabilities :
Routing
The ability to redirect a client request to a particular service provider based on deterministic or
variable routing criteria.
Types of routing to consider:
● static or deterministic routing
● content based routing
● policy based routing
● complex rules based routing
Message transformation
The ability to transform the client request to the format the service provider expects it.
Most used transformations are:
Xml -> Xml
Xml -> Cobol
Object -> Xml
Xml -> Json
etc.
Message enforcement
The ability to enrich,enhance the message that comes as request as the service provide
requires.
Types of message enforcement:
● Date format conversion
● Data conversion (ex: transform spaces to 0)
● Rule based enhancements. (ex: if message is from x add some information to the
request)
Protocol transformation
The ability to accept from the consumer one type of protocol as input (ex SOAP/JMS) and
communicate to the service provider other protocol (ex: IIOP)
Service Mapping
The ability to translate a business service into the corresponding service implementation and
provide binding and location information
Message Processing
The ability to manage state and perform request management by accepting an input request
and ensuring delivery back to the client via message synchronization.
Process choreography
The ability to manage complex business processes that require the coordination of multiple
business services to fulfill a single business request.
Service Orchestration
The ability to manage the coordination of multiple implementation services.
Transaction management
The ability to provide a single unit of work for a business service request by providing a
framework for the coordination of multiple resources across multiple disparate services
(see more WS - Coordination)
Security
The ability to protect enterprise services from unauthorized access
ESB should provide 4A’s of security :
Authentication
Authorization
Auditing
Administration
What have you tried with Mule and WSO2 ?
All ESB can interact with WebServices. An alternative to Mule and WSO2 would be to use Apache-Camel. They have a nice support for Web Services.