[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] about my own callback implementation



Hi Zhang,

zhang zhi wei wrote:
> I am writing a example using xmlblaster.
> 
> I want to write a callback implementation of mine.
> 
> I examine the BlasterCallbackImpl demo in demo\javaclients\corba and 
> write my application
> follow the example.
> 
> My question:
> 1. when I print the sessionId, it report unknown, can u tell me why?

you have to set explicitly a secret session Id when connecting to
xmlBlaster (like here):

  CallbackAddress cbAddress = new CallbackAddress(this.glob);
  cbAddress.setSecretCbSessionId("someSecredSessionId");
  connectQos.addCallbackAddress(cbAddress);

> 2. If i want to get the sender of the message, how can i get it in my 
> own callback implementaion in the client side.
> thank u very much!
>
you can invoke on the updateQos in your update method:

SessionName sender = updateQos.getSender();


> _________________________________________________________________
> 享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com 
> 
> 
Greetings

Michele