How to Use an HTTPS Inbound Endpoint¶ This sample demonstrates how an HTTPS inbound endpoint can act as a dynamic HTTPS listener. Many HTTPS listeners can be added without restarting the server. When a message arrives at a port it will bypass the inbound side axis2 layer and will be sent directly to the sequence for mediation. The response also behaves in the same way. Synapse configuration¶ Following are the integration artifacts that we can used to implement this scenario. See the instructions on how to build and run this example. Inbound EndpointSequence <?xml version="1.0" encoding="UTF-8"?> <inboundEndpoint xmlns:p="http://ws.apache.org/ns/synapse" name="HttpsListenerEP" protocol="https" suspend="false" sequence="TestIn" onError="fault" > <p:parameters> <p:parameter name="inbound.http.port">8085</p:parameter> <p:parameter name="keystore"> <KeyStore xmlns=""> <Location>repository/resources/security/wso2carbon.jks</Location> <Type>JKS</Type> <Password>wso2carbon</Password> <KeyPassword>wso2carbon</KeyPassword> </KeyStore> </p:parameter> <p:parameter name="truststore"> <TrustStore xmlns=""> <Location>repository/resources/security/client-truststore.jks</Location> <Type>JKS</Type> <Password>wso2carbon</Password> </TrustStore> </p:parameter> </p:parameters> </inboundEndpoint> <?xml version="1.0" encoding="UTF-8"?> <sequence xmlns="http://ws.apache.org/ns/synapse" name="TestIn"> <call> <endpoint> <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> </endpoint> </call> <respond/> </sequence> Build and run¶ Set up the back-end service: Download the back-end service. Extract the downloaded zip file. Open a terminal, navigate to the axis2Server/bin/ directory inside the extracted folder. Execute the following command to start the axis2server with the SimpleStockQuote back-end service: On MacOS/LinuxOn Windows sh axis2server.sh axis2server.bat Create the artifacts: Launch Visual Studio Code with the WSO2 Integrator: MI for VS Code extension (MI for VS Code) installed. Info Follow the Install WSO2 Integrator: MI for VS Code documentation for a complete installation guide. Create an integration project. See the instructions on creating mediation sequences to define the sequence given above. See the instructions on creating an inbound endpoint to define the inbound endpoint given above. Tip Be sure to add an empty namespace for the keystore and truststore elements (xmlns="") in the inbound endpoint as shown above. Deploy the artifacts in your WSO2 Integrator: MI. Invoke the inbound endpoint with the below request. Tip Be sure to add basic auth from the http client you use. POST https://localhost:8085 HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: text/xml;charset=UTF-8 SOAPAction: "urn:getQuote" Content-Length: 492 Host: localhost:8085 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) Authorization: Basic YWRtaW46YWRtaW4= <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.samples" xmlns:xsd="http://services.samples/xsd"> <soapenv:Header/> <soapenv:Body> <ser:getQuote xmlns:ser="http://services.samples" xmlns:xsd="http://services.samples/xsd"> <!--Optional:--> <ser:request> <!--Optional:--> <xsd:symbol>IBM</xsd:symbol> </ser:request> </ser:getQuote> </soapenv:Body> </soapenv:Envelope> Analyze the output debug messages for the actions in the dumb client mode. You will see that the WSO2 Integrator: MI receives a message when the WSO2 Integrator: MI Inbound is set as the ultimate receiver. You will also see the response from the back end in the client.