<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Simon McVittie Wrote:<BR>
<BR>
> The fact that there are these callbacks, which can be used to return the<BR>> results later, is exactly what makes your service implementation<BR>> asynchronous - otherwise, there is no way to return from your<BR>> implementation to the main loop (so more requests can be processed) without<BR>> returning a value for the D-Bus call.<BR><BR>Ok, that makes perfect sense to me, I've now made a few changes and it appears to be calling my callbacks just fine with any results and errors. However, it still doesn't seem to be very async. If I do a call to a dead server again, I still get it queuing the other requests. My code at the moments looks something like this:<BR>
<BR><FONT size=2>
<P align=left></FONT><I><FONT face="" color=#7d7d7d size=2>@dbus.service.method</I></FONT><FONT size=2>(</FONT><I><FONT face="" color=#00aa00 size=2>"com.example.SampleInterface"</I></FONT><FONT size=2>,in_signature=</FONT><I><FONT face="" color=#00aa00 size=2>'s'</I></FONT><FONT face="" size=2>, out_signature=</FONT><I><FONT face="" color=#00aa00 size=2>'n'</I></FONT><FONT face="" size=2>,async_callbacks=(</FONT><I><FONT face="" color=#00aa00 size=2>'reply_cb'</I></FONT><FONT face="" size=2>, </FONT><I><FONT face="" color=#00aa00 size=2>'error_cb'</I></FONT><FONT face="" size=2>))</P>
<P align=left></FONT><FONT color=#0000ff size=2>def</FONT><FONT face="" size=2> <B>HelloWorld</B>(<I>self</I>, address, reply_cb, error_cb):</P>
<P align=left></FONT><FONT color=#0000ff size=2> def</FONT><FONT size=2> <B>timeout_func</B>():</P>
<P align=left></FONT><FONT color=#c0c0c0 size=2> #Call To Web Service Goes Here</P></FONT><FONT size=2>
<P align=left> reply_cb(ReturnResultFromWebServiceCall)</P>
<P align=left></FONT><FONT color=#0000ff size=2> return</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>False</P></FONT><FONT size=2>
<P align=left></P>
gobject.timeout_add(</FONT><FONT face="" color=#800000 size=2>500</FONT><FONT face="" size=2>, timeout_func)<BR></FONT>
<BR>Does that look correct? or am I missing something? I looked at the examples you suggested in the test documents and they all looked to be of a very similar nature to what you gave me in your post an hour so back, and to the code snippet I have above.<BR>
<BR>> (Oh, and please tell your mail client to wrap long lines :-P )
<BR>
Sorry about that, I'm using bloody windows LiveMail and I guess it must be screwing things up, sorry.<BR>
<BR>
Cheers Simon,<BR>
<BR>
Robert<BR><br /><hr />Everything in one place. <a href='http://www.windowslive.co.uk/get-live' target='_new'>All new Windows Live!</a></body>
</html>