...
- Log in to the WSO2 ESB management console using
admin/admin
credentials. - Click Main, and then click Proxy Service.
- Click Pass Throgh Proxy.
- Enter the details as shown below.
- Enter a name for Proxy Service Name (E.g.
PredictMediatirTestProxy
). - Enter http://localhost:9000/services/SimpleStockQuoteService for Target URL.
- Enter a name for Proxy Service Name (E.g.
Click Create . You view the proxy service created as shown below.
Tip Follow the steps below to view the source view of the proxy service configuration you added.
- Log in to the WSO2 ESB management console using
admin/admin
credentials. - Click Main, and then click List in the Services menu.
Click the corresponding Source View link of the WSDL based proxy service you added above. You view its configuration in the source view as follows.
Code Block language xml <?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="PredictMediatirTestProxy" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <log level="custom"> <property name="before-predict-mediator" expression="fn:concat('ML Mediator Prediction : ',get-property('result'))"/> </log> <predict> <model storage-location="/Users/praneesha/Documents/Product_Packs/ML/wso2ml-1.0.0-SNAPSHOT/samples/ml-model-usage/src/main/resources/downloaded-ml-model"/> <features> <feature name="SI2" expression="$body/features/SI2"/> <feature name="PG2" expression="$body/features/PG2"/> <feature name="Age" expression="$body/features/Age"/> <feature name="DBP" expression="$body/features/DBP"/> <feature name="BMI" expression="$body/features/BMI"/> <feature name="DPF" expression="$body/features/DPF"/> <feature name="TSFT" expression="$body/features/TSFT"/> <feature name="NumPregnancies" expression="$body/features/NumPregnancies"/> </features> <predictionOutput property="result"/> </predict> <log level="custom"> <property name="after-predict-mediator" expression="fn:concat('ML Mediator Prediction : ',get-property('result'))"/> </log> <drop/> </inSequence> <outSequence> <send/> </outSequence> <endpoint> <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> </endpoint> </target> <description/> </proxy>
- Log in to the WSO2 ESB management console using
...
- Log in to the WSO2 ESB management console using
admin/admin
credentials. - Click Main, and then click List in the Services menu.
- Click the corresponding Try this service link of the proxy service (i.e.
PredictMediatorTestProxy
) you added as shown below.
Enter the following XML message as the Request as shown below.
Code Block language xml <features xmlns:ns="http://ws.apache.org/axis2"> <NumPregnancies>1</NumPregnancies> <TSFT>30</TSFT> <DPF>0.529</DPF> <BMI>34.6</BMI> <DBP>70</DBP> <PG2>115</PG2> <Age>32</Age> <SI2>96</SI2> </features>
You view the output of the Log mediators in the CLI in which you ran WSO2 ESB server as shown below.
Info |
---|
If you are using a deep learning model to make predictions without H2O runtime, see Using Deep Learning Models without H2O Runtime. |