Portlet Factory, Version 6.1.2


 

Web Service Enable builder

Use the Web Service Enable builder to create a Web service from a model. This builder allows you to expose a method in a model as a web service to either incoming SOAP requests to the server hosting IBM® WebSphere Portlet Factory or to service calls in local models.

Once you expose a method as a Web service, you can view the WSDL for the new service by appending /Action! to the URL for your model. The following example is the URL to retrieve the document for the methods exposed as services in the model:

http://localhost:7001/Factory/webengine/my_models/GetCustomers/Action!getWSDL

You can get the URL for a model by opening the Model menu and selecting Model Settings. In the Model Settings dialog, the URL to run this model via browser setting represents the URL.

In WebSphere Portlet Factory, AXIS is used for its default inbound SOAP request processing. The method namespace URI (rpc style) or element namespace (document style) are key components in the inbound request routing.

Note: To enable a web service in a model makes sense only for standalone webapp deployments, not for portlet WARs which run in the context of a portal.

 

Quick tips

The Web Service Enable builder exposes methods whose inputs and outputs are of primitive or XML data types. The Web Service Enable builder supports methods with the following argument and return types:

  • Primitive types such as int, Integer, float, Float, double, Double, String, boolean, short, byte, Date, java.math.BigDecimal

  • Arrays of the above primitive types as SOAP Encoded Arrays, and arrays of byte (byte[]) as the XSD base64 encoded datatype

  • XML data type, passed or returned as com.bowstreet.util.IXml or org.jdom.Element

  • void

For example, if you have a method that takes an argument, or returns java.util.Hashtable, that method does not show up in the list of methods that you may expose as a web service in the Web Service Enable builder call.

If an argument or return value is a complex type (for example, a datatype of com.bowstreet.util.IXml), the Web Service Enable builder call editor displays an additional two builder inputs for that argument and return type, allowing you to select a known (to this model) XML schema and a schema element within that schema to be associated with this XML complex type.

Parent topic: Builder help


Library | Support |