Soap from Java?

Hi all,

Does anyone have an example, or know if its possible, to connect to MailBulid via Soap from Java.

I want to push our customer DB into MailBuild, hence me asking if anyone has a Java example or know if its possible.

Jeff Porter

Mathew Mathew, 8 years ago

Hey Jeff,

I think we've helped you out directly via support, but it is definitely possible to use the MailBuild API via SOAP in Java. We don't have any sample code for you though, Java is not our area of expertise.

Get in touch with us on Twitter:
We're also on Facebook:
jeff_porter, 8 years ago

Thanks Matt,

So is there any security around the SOAP access? Or can I just send a soap message to ...


I'll let you know how i get on.

jeff_porter, 8 years ago

Hi Matt,

Turns out it was very easy to get a simple Java SOAP example going.

Would you like some screenshots of how to create the SOAP client java API (eclipse)?
As well as a simple Java example that calls the API?

In short:

I used Eclipse to generate all the classes & method based on the WSDL definition.

I then used those classes to make calls via SOAP.

example of the code....

        ApiLocator apiLocator = new ApiLocator();
        ApiSoap apiSoap = apiLocator.getapiSoap12();
        String apiKey = "e55axxxxxxxxxxxxxxb7d66c9a";
        String listId = "892e9d3xxxxxxxxxxxxxxxxxd5521d2";
        SubscribersGetActive parameters = new SubscribersGetActive(apiKey, listId, "01/09/2008");
        SubscribersGetActiveResponse sgar = apiSoap.getSubscribers(parameters);
        Subscriber[] subscribers = (Subscriber[]) sgar.getSubscribersGetActiveResult();
        for (int i = 0; i < subscribers.length; i++) {
            System.out.println(subscribers[i].getName() + "    " +subscribers[i].getEmailAddress());

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free