public List<Address> listAddresses(String addressStoreName, String query, int firstResult, int maxResults)
{
WebservicesClientManager wcm = (WebservicesClientManager) Engine.instance().getManager(
WebservicesClientManager.ID);
List<Address> res = new LinkedList();
SoapObject request = wcm.createSoapRequest("http://aktera.iritgo.de/webservices/address",
"listAddressesRequest");
wcm.addRequestParameter(request, "addressStoreName", PropertyInfo.STRING_CLASS, addressStoreName);
wcm.addRequestParameter(request, "query", PropertyInfo.STRING_CLASS, query);
wcm.addRequestParameter(request, "firstResult", PropertyInfo.INTEGER_CLASS, firstResult);
wcm.addRequestParameter(request, "maxResults", PropertyInfo.INTEGER_CLASS, maxResults);
SEnvelope envelope = wcm.createEnvelopeForCurrentUser(request);
try
{
Vector<Object> results = wcm.sendToCurrentServer(envelope);
for (Object o : results.toArray())
{
SoapObject so = (SoapObject) o;
Address a = new Address();
a.setStoreId(addressStoreName);
a.setId(wcm.getPropertyAsString(so, "id"));
a.setFirstName(wcm.getPropertyAsString(so, "firstName"));