Implementing the Actuate API service
ActuateAPI interface extends javax.xml.rpc.Service and defines the methods that get the URL for an Actuate SOAP port. The ActuateAPILocator class implements ActuateAPI interface to bind the SOAP port to a physical address. It returns this address using getActuateSoapPortAddress( ), as shown in the following code:
package com.actuate.schemas;
 
public class ActuateAPILocator extends org.apache.axis.client.Service
implements com.actuate.schemas.ActuateAPI {
private final java.lang.String ActuateSoapPort_address = "http://ENL2509:8000";
 
// Use to get a proxy class for ActuateSoapPort
public java.lang.String getActuateSoapPortAddress( ) {
return ActuateSoapPort_address;
}
ActuateAPI interface specifies two versions of getActuateSoapPort( ) method to access a physical address. ActuateAPILocator.getActuateSoapPort( ) returns the default address set using attribute, ActuateSoapPort_address, as shown in the following code:
public com.actuate.schemas.ActuateSoapPort_PortType getActuateSoapPort( )
throws javax.xml.rpc.ServiceException {
java.net.URL endpoint;
try {
endpoint = new java.net.URL(ActuateSoapPort_address);
} catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
return getActuateSoapPort(endpoint);
}
The overloaded version of ActuateAPILocator.getActuateSoapPort(java.net.URL portAddress) accepts a URL as a parameter. This version creates the service using the URL parameter as the endpoint, as shown in the following code:
public com.actuate.schemas.ActuateSoapPort_PortType getActuateSoapPort
(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
try {
com.actuate.schemas.ActuateSoapBindingStub _stub =
new com.actuate.schemas.ActuateSoapBindingStub(portAddress, this);
_stub.setPortName(getActuateSoapPortWSDDServiceName( ));
return _stub;
}
catch (org.apache.axis.AxisFault e) {
return null;
}
}