TIF ENOVIA/3DExperience Connector - Apache CXF Base Web Application
There is an Apache CXF base webapp under ${TIF_ROOT}/modules/enovia/webapps/cxf
that can be used as base/template for CXF based web services.
There are own servlet filters for SOAP and RESTFul web services that can be used for logging web service calls to TIF DB.
See web.xml
for filter details. Also, there is cxf-servlet.xml
that contains configurations for example web services.
If you have not started TIF, you will not find the web.xml or cxf-template.xml file, instead there are template files. Upon start, TIF will copy over the template file unless the web.xml or cxf-template.xml file is found. |
Logging RESTFul Web Services
When using the CXF logger filter for RESTful web services, the web service call is logged in the TIF database. It appears as a REST service in Admin UI with display name that is a combination of invoked web service class and method name. The unique service name is constructed based on the values of Path annotation in both class and method. The service name is not visible in Admin UI, but it is used to identify the service.
For example:
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
@Path("/example")
public class MyExample {
@Path("/{param}")
@GET
public String success(@PathParam("param") String param) {
return param;
}
}
Considering the above example, the service display name would be "MyExample/success" and service name is "example/{param}".
Logging SOAP Web Services
When using the CXF logger filter for SOAP web services, the web service call is logged in the TIF database. It appears as a SOAP service in Admin UI.
See the filter settings in ${TIF_ROOT}/modules/enovia/webapps/cxf/web.xml
for details how the service name (visible in Admin UI) is constructed.
Limiting Logged Payload
There are configurable webapp init parameters to set maximum length for logged inbound (request) and outbound (response) payloads. Parameters help to limit usage of heap memory and storage by preventing to persist too large payloads to TIF DB.
See parameters "inboundPayloadMaxLength" and "outboundPayloadMaxLength" in web.xml
.
Default value for parameters is 1 000 000 bytes, if not defined. |