WSO2 ESB Topic Subscription for REST url - rest

We are successfully using WSO2 ESB for basic mediation using REST for the caller and the service (via a message queue).
We are now trying to use the topics and subscription model. However, unlike in other parts of the ESB where you can modify the message format to POX, in the subscription interface there is way to define the format of the payload to the URL. The ESB always sends soap to the URL, even though we want it to send POX. We don;t want to have to write SOAP services.
Is there way to change the format that the subscriber gets? I know we can setup a proxy which then sends the message etc, but this is cumbersome and cannot be automated for new services.

If you use WS-Eventing, then you get the soap messages to the subscriber endpoints. You can use JMS based pub-sub scenario to implement what you want. Please have a look at [1].
[1] http://wso2.org/library/articles/2011/12/wso2-esb-example-pubsub-soa

Related

NestJS Kafka send event from server to all clients

How do I send an event from the server to the client or to all clients? How do I get a server instance in the controller at all?
I need to send an event to the client from the server, without a request from the client side. The client listens, I send.
The point is that I implemented the architecture. Api-gateway sends a request to a microservice and gets a response. I need to implement sending event from microservice to api-gateway. In api-gateway I got a client instance in the controller, how do I get the same instance in the microservice? The controller in my microservice only listens to messages and sends a response. How can I do the same in api-gateway? So that Api-gateway listens to the event and microservice sends messages there.
It depends, altough you didn't provide enough details in your question, I'll pretend, based on your question tags, you're trying to use NestJS microservices and Kafka.
First of all, take a look at Nest's Microservices documentation, you should first understand how that works before trying to use it:
https://docs.nestjs.com/microservices/basics
You might also want to create a hybrid application if you're not going to exclusively use Kafka as an entrypoint:
https://docs.nestjs.com/faq/hybrid-application
That said, still based on your tags, here's a brief guide on how to implement Kafka on NestJS using the same knowledge you aquired reading about microservices and hybrid applications: https://docs.nestjs.com/microservices/kafka
You should be able to implement simple but functional application with those documentations I mentioned, but for anything else, you should provide more details on your question (like what you need, what you tried, some code etc).
Kafka send event ... To all clients
How do I send an event from the server
Kafka doesn't send. Clients poll.
If you deploy each Kafka consumer client application with a unique group.id, for the set of topics you're producing to, they will all uniquely consume the data. Otherwise, if each deployment shares a id, they all consume unique partitions of the topic, never getting the same event to all the clients
NestJS uses KafkaJS - https://kafka.js.org/docs/consuming
without a request from the client side
Unclear what this means. Even if the NestJS server is randomly generating data, you'll still need to use a Kafka producer client to send data to the Kafka server
get a server instance in the controller
The Kafka server? You wouldn't. You'd pass the bootstrap server string (via external config) into a producer or consumer instance, which then can be given to a controller

Should I be using REST or SOAP UI for testing?

I am testing a new webservice that is receiving messages from an application and responding with messages with specific information. The webservice then uses this information to create new messages for downstream systems. I need to know the best way I can test this using the Ready API tool, we just got a pro license. Is it SOAP or REST I need to use. Ideally I want to simply copy my application messages in to the tool, call the webservice and get the response, which I can then check is the correct response for the test
To find your web-service is SOAP or REST.
Please check whether your web service has WSDL to verify it has SOAP web-service, you can get your web-service's WSDL by post-fixing WSDL with your web service url.
Eg: http://{yourservice-url/path1}?WSDL
If your service don't provide WSDL from the above URL, then your web-service is REST.

Why in SOAP client needs to know the web services's interface?

I am new to web application development, I am learning many things from many tutorial, currently I am learning SOAP and REST.
My confusion is regarding SOAP , in SOAP based architecture when a user enters a URL, it takes him/her to SOAP client and then that is the page that the client sees ? and then this SOAP-client will actually communicate to another application SOAP server ??
Not understanding it at all? Can someone please explain?
SOAP is meant for communication between machine over HTTP/HTTPS with common interoperable format i.e XML.
Think like you are payment gateway provider, someone's would like to use your payment gateway for transactions.
So as payment gateway provider, you may create webservice, and whoever wants to use it could create SOAP client to use your payment gateway service.
So in your case the HTML page is party would like to utilise the payment gateway service (by calling the SOAP service).
Do some googling, you will find lots of practical SOAP use cases.

Sending message with topic to Azure Service bus Queue via HTTP POST?

I was wondering if there is a good way to send a message with a topic to a service bus queue via HTTP Post in postman for example.
I red something about Sas-key encryption but, lets say I would like to expose the url to someone for them to send my service bus messages, how do I do that the simplest way for them so to speak?
I just want them to have a url not crating a program to generate w token for it..
I know the Service Bus has a URL linked to it but I cant seem to send anything to it...
Is this possible?
I just want them to have a url not crating a program to generate w token for it..
From the Azure Service Bus send message API, we could know that Authorization header is required. If want to let someone to use just with a url. In my opinion is that we need to implement it ourself.
We could develop a Rest API service then we could give a rest api url to somebody who want to use. We could get some demo code about how to create topic and send message from the azure document.

How to handle BizTalk POST while exposing schema as REST service?

I have a BizTalk application where I have exposed schema as a RESTful web service, which calls another REST service. I am able to successfully handle GET, DELETE request.
Is there a way to handle POST request without writing a pipeline component to serialize the POST request to a schema?
Also, the application may have to handle several POST calls, so will it be possible to serve this from one single receive location and then filtering the request on the send port?
Please let me know if any more details are required.
So, here's the thing. You're mixing together some things that technically have nothing to do with each other.
For instance, a Plain Old Xml (POX) service, usually a POST, does not 'expose' a Schema in the way a SOAP service does. It just takes whatever content is POSTed to it.
Following that, serialization/deserialization is also a concept more related to SOAP that POX or REST.
So...
Yes, but what exactly are you doing?
Yes. A plain http endpoint can accept any content type. Once it's over the wire, all the normal BizTalk processing rules apply.