setEndpointForWebService
setEndpointForWebService(className: String; methodName: String; message: String): String;
Reimplement the setEndpointForWebService method of the Application class in a user schema to redirect an incoming web service request to another web service application. The response is provided by the web service application receiving the redirected request, which could be running in a separate Jade system.
The web service application that receives web service requests from consumers initially redirects them to other web service applications is acting as a gateway web service.
The parameters for the setEndpointForWebService method are listed in the following table.
Parameter | Specifies the … |
---|---|
className | Name of the |
methodName | Name of the web service method |
message | Incoming SOAP message |
The following example shows a reimplementation of the setEndpointForWebService method in the schema of the gateway web service.
vars // GatewayConsumer is a JadeWebServiceConsumer class in current schema ws: GatewayConsumer; begin create ws; if className = "CustomerService" then // CustomerWebService is a JadeWebServiceProvider class in the // schema to which the request will be redirected ws.setEndpointURL("http://host1/jade/jadehttp.dll?WebApp1&" & "serviceName=CustomerWebService"); elseif className = "ProductService" then // ProductWebService is a JadeWebServiceProvider class in the // schema to which the request will be redirected ws.setEndpointURL("http://host2/jade/jadehttp.dll?WebApp2&" & "serviceName=ProductWebService"); endif; // The JadeWebServiceConsumer::invoke method redirects the request return ws.invoke(message); epilog delete ws; end;
For more details, see "