Existing implementations using the Client API jar file

This information pertains if you are upgrading to Unica Campaign version 8.6 or higher and you currently use the Client API .jar file to interact with the Unica Campaign web application.

Client API .jar file

Your Java application must use the .jar file that is at:

<CAMPAIGN_HOME>/devkits/CampaignServicesAPI/lib/CampaignServicesClient30.jar

For a Java example that shows new offer creation, see OfferAPI.java. The same example can be found in your Unica Campaign installation at:

<CAMPAIGN_HOME>/devkits/CampaignServicesAPI/samples/OfferAPI.java

Dependent .jar files

As a result of the upgrade to AXIS2 version 1.5.2, your Java application must also upgrade to using the AXIS2 1.5.2 distribution .jar files, as CampaignServicesClient30.jar is dependent on these .jar files. All of the dependent .jar files must be included in the Java class path of your application and can be found in the Campaign.war file that is at <CAMPAIGN_HOME>/Campaign.war.

Extract the .jar files from Campaign.war, and include them in the Java class path.

Client API constructor

While you construct the Client API object, change the web service URL and the Exception signature as shown in this example.

try {
URL serviceURL = new URL(PROTOCOL, HOST, PORT,
"/Campaign/services/CampaignServices30Service");
CampaignServices30SoapClient client = new 
CampaignServices30SoapClient(serviceURL, TIMEOUT);
} catch (RemoteException exception) {
exception.printStackTrace();
}

Parameterized constructors of the supporting classes

With the AXIS2 engine, the generated classes and stubs do not have parameterized constructors. Instead, these classes have only the default no-argument constructor with setters and getters for the members.

WSReference wsRef = new WSReference(); 
wsRef.setComponentTypeEnum(typeEnum);
wsRef.setId(id);