Java Code Samples
This page contains code samples written to help Java developers work with SOAP API.
These code samples illustrate common actions a Java developer might perform when working with SOAP API.
These code samples can help you understand how to perform certain actions in a Java environment. These code samples can be modified or changed to match your needs.
Some of these code samples may have issues when sending double-byte characters. If you encounter these issues, please update the code to use Axis2 or a similar Java client whenever possible.
- Add Data to a Data Extension
- Add Column to a Data Extension
- Add Subscribers to a List
- Add an Attribute
- Connecting to the API using Java and Axis2
- Connecting to the SOAP API Using Java and CXF
- Create a Portfolio Object
- Create a Data Extension
- Perform a Data Extract with the SOAP API
- Create a Send Object
- Create a Subscriber
- Create a Subscriber Attribute
- Create a Triggered Send Definition
- Create an Email Send Definition
- Create an Email
- Create an Import Definition
- Delete a Subscriber
- Delete a Subscriber Profile Attribute
- Manage Data in Data Extensions
- Manage Subscribers On Lists
- Perform a Campaign
- Retrieve Account Object Using the CustomerKey Attribute
- Retrieve All Lists a Subscriber is On
- Retrieve Bounce Events Details
- Retrieve Data from a Data Extension
- Retrieve Sent Event Details
- Retrieve Subscribers by Subscriber Key
- Retrieve Subscribers Using ListID
- Retrieve a Subscriber
- Retrieve a Tracking Summary of an Email Send Using JobID
- Retrieve an Email
- Retrieve an Item from Your Portfolio
- Retrieve the Results of an Import
- Retrieve the Status of Programs Using AsyncActivityStatus
- Send an Email Using a TriggeredSend Object
- Start an Import Definition
- Update Subscriber Attributes using the Update Method
- Use Regular Expressions to Validate Email Addresses
- Working with SOAP API