A beginner in Mule and Server deployment, so please help. I have my local apache http web server running and configured the web server settings in a third party application. And the third party application's web service POST HTTP data to web server which I can access in PHP file and view the data.
How to simulate the same in Mule? Is it possible to configure Mule Server as web server in that application? If not can I access the data available in apache web server through any connectors?
Mule comes with an HTTP Connector, so yes it can receive HTTP POST requests.
Reference: https://developer.mulesoft.com/docs/display/current/HTTP+Connector
Yes, Using HTTP connector you can send POST request to the server .
you also wont have to configure the server properties just the port at which you'll access your application.
<flow name="testFlow1" doc:name="testFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="Server_Address_e.g._localhost" port="Enter_Port_Here" path="Enter_your_path_here" doc:name="HTTP"/>
</flow>
Related
I have created REST API for POST HTTP and import it to Mule applications then deploy it to CloudHub and used that URL in Shopify Webhook then trying to get data but unable to get data from postman...
Is this a correct way to use Webhook in Mule applications...
Since Mule runtime doesn't has a concept of webhooks there is not a correct or incorrect way to use them. Mule applications can listen to HTTP requests. If another system sends an HTTP request to the correct URL that the Mule application is listening it should work. To the Mule application it doesn't matter if it is coming from a webhook, another application, Postman or whatever HTTP client implementation.
In simple http endpoint, how to implement load balancer using any point studio.
<flow name="testFlow">
<http:listener config-ref="HTTP_Listener_Configuration"/>
</flow>
In simple mule HTTP endpoint you cant achieve load balancing.
However there are other efficient solution for achieving load balancing in mule application.
https://docs.mulesoft.com/runtime-manager/dedicated-load-balancer-tutorial
http://www.slideshare.net/ramakrishnakapa/load-balancer-in-mule
Load balancing can not be in simple http endpoint, but you can deploy several instances of your application and balance your request among those instances in mule. Switching between those instances is matter of different algorithms.
In this post it is all described in detail.
https://blogs.mulesoft.com/dev/mule-dev/load-balancing-with-mule/
We currently have mule ESB running on out network. Not in the DMZ.
I'm looking for information on how to configure an Apache Http server running in the DMZ to act as a proxy for a web service running on the ESB.
Thanks
The HTTP transport of Mule doesn't have any specific requirement in term of headers, so basically there's no particular recommendation for proxying HTTP requests in front of Mule.
So in the case of Apache, use mod_proxy to configure a reverse proxy in front of Mule and you should be good.
I'm new to Mule and am trying to setup a web server [in Mule] to "replace" an existing Java server - which simply proxies for a SOAP web service.
So:
Web client (js/html) requests a static resource
Mule Server must return the static resource
or
Web client uses Jquery Ajax (json) request with path starting with "api/"
Mule Server must forward the request to the Java server (to use the old API)
or
Web client uses Jquery Ajax request with path starting with "sapi/"
Mule Server must translate the request to XML and call the SOAP server (for new api calls)
I'm struggling to find a good starting point:
I've played with Ajax connectors (and end-points) and can get the static content served - but not sure where to go with the api calls (don't want to force the client app to use mule.js)
I've played with HTTP end points, and I can't get the static content served (implicit Content-Type issue)
Any help will be appreciated...
Use http:static-resource-handler to serve your static content: it should take care of the content types for you. See for more info: http://www.mulesoft.org/documentation/display/current/HTTP+Transport+Reference#HTTPTransportReference-ServingStaticContent%28sinceMule3.2%29
Forget about the Ajax connector, all you need is the HTTP connector. Bind one HTTP endpoint on api and the other on sapi.
When forwarding the request, be sure to propagate headers and, potentially, path extension after api/. See the example below to see how this is typically done.
<flow name="rawProxy">
<http:inbound-endpoint
address="http://localhost:${http.port}/rest-proxies/raw"
exchange-pattern="request-response" />
<copy-properties propertyName="*" />
<http:outbound-endpoint address="http://localhost:${http.port}/rest/#[message.inboundProperties['http.relative.path']]?#[message.inboundProperties['http.query.string']]"
exchange-pattern="request-response" />
<response>
<copy-properties propertyName="*" />
</response>
</flow>
If the SOAP API you're calling as a WSDL then generate a client for it and instead of transforming to XML, transform to the request object it expects.
I have deployed Mule as a web-application. I use Mule to access my webservices over HTTPS. For which I have HTTPS implemented on Mule, which works fine.
Now, I want to integrate another Web-Application instead of a webservice and want to use the same HTTPS implemented on Mule instead of implementing SSL again on my Weblogic server. But when I try the URL gets redirected to my outbound HTTP URL though my inbound endpoint is HTTPS.