|
![]() |
Among the various Interfaces to the eC-messenger Direct Marketing System, the Synchronous RPC-like SOAP API
is the preferred way for real time integrations with other systems.
Quick Access to the WSDL's: ecm.wsdl
+ WSDL for SSL Access
The SOAP/RPC interface is the best suitable interface if you are looking for a realtime integration of eC-messenger into your systems. Closest to the synchronous SOAP API is the HTTP REST-API. We encourage you to prefer SOAP over REST whenever possible. Why?
Now you know why you should use the synchronous SOAP-API. But what are the differences between the synchronous and asynchronous SOAP API?
| Synchronous | Asynchronous | |
|---|---|---|
| Operation types | single user/group | mass operations |
| Response | immediate | later by email |
| Execution time | short | long running |
Sample Java-code:
EcMSoapBridge ecm = new EcMSoapBridgeServiceLocator().getrpc();
// logon to system
String sessionToken = ecm.logon("http://testdomain.de", "user@email.in", "password");
// retrieve user data by passing a email address
String userXML = ecm.lookupUserByEmail(sessionToken, "user@search.for");
// close session token
ecm.logout(sessionToken);
More Samples can be found in the Ressources section.
, or as documentation in javadoc
or soapdoc
formatting.
The following data types are used xml encoded: User-Object, Member-Object and Group-Object. XML-Schema definitions can be found in ecm-types.xsd
, as <user>, <member> and <group> elements (based on apiUserType).
<?xml version="1.0" ?>
<user id="1234567">
<email>test-soap@ecircle-ag.com</email>
<mobilenumber>1234-222-444-555</mobilenumber>
<title>1</title>
<firstname>Paul</firstname>
<lastname>Mc Soap</lastname>
<partnerid>4096</partnerid>
<countrycode>DE</countrycode>
<languagecode>de</languagecode>
<zipcode>12999</zipcode>
<namedattr name="userid">q11234</namedattr>
<namedattr name="buyer">true</namedattr>
<namedattr name="reader">false</namedattr>
<namedattr name="dob">2008-12-24</namedattr>
</user>
<?xml version="1.0" ?>
<member id="1234567g7654321">
<email>test-soap@ecircle-ag.com</email>
<mobilenumber>1234-222-444-555</mobilenumber>
<title>1</title>
<firstname>Paul</firstname>
<lastname>Mc Soap</lastname>
<partnerid>4096</partnerid>
<countrycode>DE</countrycode>
<languagecode>de</languagecode>
<zipcode>12999</zipcode>
<namedattr name="userid">q11234</namedattr>
<namedattr name="buyer">true</namedattr>
<namedattr name="reader">false</namedattr>
<namedattr name="dob">2008-12-24</namedattr>
<memberattr name="coupon-id">aws334dfr</memberattr>
<memberattr name="came-from">my best partner</memberattr>
</member>
<?xml version="1.0" ?>
<group group-id="1234567">
<name>My Group</name>
<tracking>
<html reader="true" />
</tracking>
</group>
Most of the elements on this object are optional, that means that a setting which is not present in the XML will not change.
Creating a new group:
<?xml version="1.0" ?>
<group group-id="new" preferred-channel="email">
<name>My Group</name>
<description>Description of the group</description>
<email-channel>
<email>test12345@email.in</email>
</email-channel>
</group>
More details can be found under XMLGroupType.
While the general configuration of this API and its access points will not change often, the set of methods offered is increasing over time. Whenever a method would need a change in its signature, a new method will be created instead, having a increased name postfix, e.g. like lookupMemberByUserId_v2_0. This shall make sure, that existing clients continue to work.
instead of the unencrypted endpoint. The unencrypted endpoint should only be used for testing/debugging purposes.
Our Certificates come from http://trustcenter.de
, which offers its root certificates here
. You may download our
public certificates from trustcenters .
is a generic soapclient that can be used from your browser! use eC-M
(Example Screenshots)!
is similiar to soapclient.com, not particular fast but they have a very appealing web interface. Try it with our WSDL: https://webservices.ecircle-ag.com/rpc?wsdl.
Please remember that Online-SOAP clients might be dangerous since your password is transmitted through a third party server.
To call our SOAP service directly out of your code in your preferred programming language you can take a look at these tutorials:
See how easy it is, to create a Java client with modern IDE's.
...
$client = new soapclient('http://webservices.ecircle-ag.com/soap/ecm.wsdl');
...
// ask for the api version
$result = $client->getVersion();
// check if there was an error calling the API function
if (is_soap_fault($rssult)) {
echo '<span class=\"err\">error while api function calling</span><pre>';
print_r($result);
echo '</pre>';
return; }
...
echo "The Version Number is :<pre>".$result['getVersionReturn']."</pre>";
...
// logon
$logonparams = array('realm' =>
$_POST['realm'], 'user' => $_POST['username'], 'passwd' => $_POST['pass']);
$result = $client->logon($logonparams);
// get session id
$sessionid = $result->logonReturn;
.....
// font forget to log out later !
This examples
should work on any PHP5 with build-in SOAP. We have also somesample code
using nusoap
.
Thanks to Kai for these Examples.
.
These classes need additional libraries and can unfortunately not be used as they are. We work on a solution.
User/Member Processing These Objects are transfered using their XML representation. Here are Helper Classes to read and write them.
// writing out a user
User u = new User();
u.setEmail("some_mail@ecircle-ag.com").setFirstName("Paul").setLastName("Spom");
u.setAttribute("user-Attribute", "no 1");
System.out.println("In XML: " + u.toXML());
// reading a user
User u1 = User.fromXML(u.toXML()); // you may get a user String also from API methods
if (u1.getEmail().equals(u.getEmail())) {
System.out.println("Reading and Writing worked!");
}
A counterpart class exists for the member object.
Unique User/Member/Group-Id's Some API methods deal with unique identifiers of the entities. Since they are also part of the entity objects, they can be processed with some utility methods
...
Member m = ecm.lookupMember(...);
String groupid = m.getGroupId();
// alternativly, some static Helpers
String groupid1 = Member.extractGroupId(m.getId());
...
See also AddressingOptions - AsynchronousAPI - EcircleDeveloper - InterfaceOptionsComparison - LeftMenu - Ressources - SoapWithAttachments - XMLMessageType - XMLUserType