Hi all,

I'm having some difficulties in implementing a QDS service in qtopia, precisely how to send and retrieve the actual data.

I've been following http://doc.trolltech.com/qtopia4.2/datasharing.html, with these results:

1. The service is being called successfully by my application (despite ignoring any streamed data)
2. The service does require some data to be sent to it, but it is somewhat empty when its read.
3. The service responds with no errors to my application

Here's some pseudo-code of what I'm doing:

My application calling the service:
Qt Code:
  1. action = new QDSAction(service); // it is a valid service
  2. // the response and error signals are properly attached to slots
  3. QByteArray array;
  4. QDataStream stream(&array, QIODevice::WriteOnly);
  5. stream << response; // some random string (the request type specified by service)
  6. data = QDSData(array, QMimeType("text/x-qstring"));
  7. data.store();
  8. action->invoke(data);
To copy to clipboard, switch view to plain text mode 

In the service:

Qt Code:
  1. QDSActionRequest requestCopy(request);
  2. // requestCopy.requestData().data() is ""
  3. // I ignore this and try to send a response
  4.  
  5. QByteArray array;
  6. QDataStream stream(&array, QIODevice::WriteOnly);
  7. stream << response; // some random string (the return type specified by service)
  8. data = QDSData(array, QMimeType("text/x-qstring"));
  9. data.store();
  10.  
  11. requestCopy.respond(data);
To copy to clipboard, switch view to plain text mode 

In the response signal of my application:
Qt Code:
  1. // the copy is necessary to run anything in responseData
  2. // copy.data() is ""
  3. QDSData copy = QDSData(responseData);
To copy to clipboard, switch view to plain text mode 

In the link above, it is said to create a QByteArray with the method QDSData.store(), but the following line is troublesome:

Qt Code:
  1. // responseData is a reference, thus need a copy to execute store()
  2. // store() does not return a QByteArray
  3. QByteArray imageKey = responseData.store();
To copy to clipboard, switch view to plain text mode 

What am I doing wrong? How can I actually see the data the service gets, and the data the service responds?
I think all the relevant information is said, as this post seems rather long, but I can provide more if requested. I'm using Qtopia 4.2.

Thanks in advance.