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
- About using the builder call editor
The builder call editor allows you to specify all the input values to a builder call.
- Web Service Enable Builder Input
This topic describes the Web Service Enable builder inputs.
- AXIS deployment descriptors
As of version 5.9.0, WebSphere Portlet Factory uses AXIS for both its inbound and outbound SOAP request handling. This file provides a summary to explain its impact on inbound request processing.
- Processing SOAP headers
To process incoming SOAP headers in your service method (which do yourself – there is no WebSphere Portlet Factory-wide default SOAP header processing provided), you may retrieve the SOAP Header information (if any was present in the incoming SOAP envelope), by retrieving them in IXml or JDOM Element format from the current HttpServletRequest via request attribute.
- Getting a WSDL URL
Once you have exposed a method as a web service, you may want to access the WSDL URL programmatically in a method or using a ${Java/...} indirect reference.
- Web Service Enable builder: method type "all"
This topic describes the method type "all" in the Web Service Enable builder.
- Properties used by WebServiceEnable or inbound SOAP request processing
Properties are available to control the behavior of service-related operations.
- About creating web services
You can create a web service by exposing a method in a model as a web service.
- Schema builder
The Schema builder adds a property that contains a schema path to the model.
- Overview: web services
IBM WebSphere Portlet Factory Designer allows you to call a web service.
Library | Support |