Creating a http web service in message broker - message-queue

I need to create a http post request that will put a message in a message queue.So far I am able to do it successfull within the test framework i.e: using the integration node.
My question is how I will be able to test this from a external browser?
Do I need to deploy it in an external server?
Any links or suggestion will be really helpful.

I often use curl for testing webservices deployed to IIB. You can use the "-d" parameter to specify a file containing the POST data and this works well for both HTTP and SOAP.

I don't think browsers are meant to call web services directly, try SOAPUI for testing.
Message Broker Applications need to be deployed on a Broker and Execution Group or Integration Node and Integration Server (after V9).

Related

Does it possible to save WebSocket gateway with the same route in Azure API Management

We are using Azure API Management where is supporting WebSocket, but we need 2 different endpoint routes for it, because you can`t create route to your API:
http(s)://{base_url} and ws(s)://{base_url},
you must add difference by using suffix, like :
http(s)://{base_url}
ws(s)://{base_url}/{suffix}
or
http(s)://{base_url}/{suffix}
ws(s)://{base_url}
How we can configure same endpoits ?
During the WebSocket passthrough the client application establishes a WebSocket connection with the API Management Gateway
Check for the steps in adding WebSocket API to APIM here.
Make sure we follow below limitations:
WebSocket APIs are not supported yet in the Consumption tier.
WebSocket APIs are not supported yet in the self-hosted gateway.
Azure CLI, PowerShell, and SDK currently do not support management operations of WebSocket APIs
Refer to this SO thread in including two endpoints for same URL in backend, thanks to Hury for great explanation. Though it is for functions app, but the process is similar.

What App server to use for json and soap API

I am trying to select a app server platform to service JOSN & Soap POST requests from client app on Desktops. The app server runs on linux and use PHP code.
I searched and found PHP framework but that doesn't give you easy to use auth user/password, so you have to do the auth in app code. What is to use for simple request/response app server with secure auth like user/password on first request and then token like normal web servers.
Currently using Drupal 7 REST services module to handle request auth, but SOAP has security issues. Looking for better and light weight framework.
For your API : https://www.drupal.org/project/jsonapi (it's gonna be implemented in 8.7 anymay)
If you have an external authentication provider (like keycloak, azureAD…) : https://www.drupal.org/project/oauth2_jwt_sso
If you don't : https://www.drupal.org/project/simple_oauth

Hosting html file over mosquitto

I just found that mosquitto had got a websockets upgrade which allows it to
host the HTTP services.
I tried hosting a html file using the websockets feature on the port 8080.
The mosquitto broker seems to start fine and the mqtt services on the other ports seem to function properly. But when i try to access the html file over the localhost I get the a response saying no data sent by the server.
I am not sure where my mistake lies..Any ideas?
Mosquitto is not a HTTP server, it can not serve generic files.
The HTTP listener is only there to facilitate an upgrade to the websocket protocol in order to run MQTT over a websocket connection.
You might want to look out for a different broker that is flexible enough to do what you're looking for. I don't know of any MQTT broker that allows you to do that out of the box, but many are fairly extensible. For one I can talk about is VerneMQ, as I am one of the core developers. Developing a simple VerneMQ plugin that serves some static files over HTTP is a matter of a few lines of code, as the plugin only requires to setup some configuration for the internal webserver.
However, unfortunately we haven't yet documented this feature. But feel free to drop us a line if such an approach sounds interesting for you.
Cheers,
Andre

How to expose a SOAP data service with a JSON proxy service on ESB?

I'm working on Stratos Live.
I have implemented a SOAP data service.
I would like to expose it as a JSON REST service defining a proxy on the ESB.
How can I define it ?
A pass-through proxy ? a transformer-proxy ?
(I have already tried to define a pass-through proxy, but with it I expose soap too; I did not find how to configure json protocol)
I found this example :
http://docs.wso2.org/wiki/display/ESB451/Sample+440%3A+Exposing+a+SOAP+Service+Over+JSON
But it refers to an on premise use : how can I use it on Stratos Live console ?
Is there an example for Stratos Live too ?
Thanks in advance.
You can expose your data as RESTful resources directly from the WSO2 Data Services Server. Following documentation will help you on it.
http://docs.wso2.org/wiki/display/DSS301/Expose+Data+as+REST+Resources
You don't need an ESB proxy service in this situation because your requirement can be achieved directly from the Data Services Server. A proxy service might become handy if you had any transformation or service chaining kind of scenarios to be done.

Hosting a Silverlight database application that works with MySQL

I have a basic hosting package that gives me access to create a MySQL database. I can of course host silverlight applications on any site. But how can I work with a database from within Silverlight? I cannot run any service on my hosting provider, they only allow php or perl scripts.
You can use the C# webclient to make HTTP calls to a PHP page hosted on the server. The PHP page can proxy queries/results between the silverlight client and the mysql database.
remember, just because it's not a SOAP/WCF "service" does not mean that it's not a web service. Look into PHP based REST solutions for some nice alternatives that can easily be invoked via silverlight:
http://www.bing.com/search?q=PHP+REST
Edit: As #Spencer Ruport correctly points out in the comments, you of course have to be wary of the fact that the web service will be exposed to the public, and anyone can easily sniff the http traffic between your silverlight application and the server. This enable them to call your service directly so be sure to think about authentication and what it means in the context of your app/data
You can use the WebClient class in silverlight to communicate to a php service. Here is the first google result I found: link