locked
SendNotification issue RRS feed

  • Question

  • Hi,

    I'm working with MRDS2008 and I want to notify my subscribers with the following command:
    SendNotification<SubmitPureNotification>(port, notification);  
    this is the SumitPureNotification message with it's body:
     public class SubmitPureNotification : Update<PureNotification, PortSet<DefaultUpdateResponseType, Fault>> { }
    
      [DataContract]
        public class PureNotification
        {
            [DataMember]
            public ushort Target;
    
            [DataMember]
            public byte[] Data;
        }
    When I try to send my monitications i receive the following message into the Console Output Service:
    ### DsspForwarder:CaptureRequestException:Unhandled within causality context.. 
    Exception:Object reference not set to an instance of an object.
    Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:SubmitRequest
    Body Type:Robosoft.RobuBOX.Services.Interop.PureClient.Proxy.PureNotification
    Target Service:dssp.tcp://robo_arnaud:50001/subscriptionmanager/1137661b-3c72-4208-aeb8-e181d0581a2b
    Source Service:dssp.tcp://robo_arnaud:50001/pureclient Category StdOut Level q1:None Time 2009-07-16T09:36:13.46875+02:00 Subject ### DsspForwarder:CaptureRequestException:Unhandled within causality context..
    Exception:Object reference not set to an instance of an object.
    Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:SubmitRequest
    Body Type:Robosoft.RobuBOX.Services.Interop.PureClient.Proxy.PureNotification
    Target Service:dssp.tcp://robo_arnaud:50001/subscriptionmanager/1137661b-3c72-4208-aeb8-e181d0581a2b
    Source Service:dssp.tcp://robo_arnaud:50001/pureclient Source CodeSite
    I don't understand why I get this error, this part of code is working under MRDSv1.5 refresh.
    Is someone can help me?

    Thanx,
    Arnaud.
    Thursday, July 16, 2009 8:14 AM

Answers

  • Let me make a couple of general comments.

    Firstly, handlers should only send notifications that match their message type, e.g. an Update Handlers should send Update notifications and a Replace handler should send Replace notifications.

    Check the body of the message to make sure that nothing is null. If you have cast from one type to another, maybe all the fields did not get filled in. Or if you are manually populating the message body then, as you suggest, maybe you missed a field.

    It's hard to say what might have changed from 1.5 to 2.0 to affect this. DSS does more checking of message types now.

    Trevor

    Tuesday, August 4, 2009 5:58 PM

All replies

  • Please confirm that SubmitPureNotification is one of the operations in the Operations Portset for the service.

    Trevor
    Saturday, July 18, 2009 11:26 PM
  • Trevor, sorry for the delay, I confirm that SubmitPureNotification is one of the operations in the Oerations Portset for the service.

    We found a solution of our issue but this is not optimized.

    We have a TCP client that receive a lot of infromation fom server. The client is in charge to notify some services when it receive data. The service to notify depends on nature of data.
    To do this we created a subscription manager manually for each nature of data.

    Port<CreateResponse> responsePort = CreateService(new ServiceInfoType(submgr.Contract.Identifier));
    
    yield return (Receiver)responsePort;
    
    CreateResponse response = (CreateResponse)responsePort;
    
    port = ServiceForwarder<submgr.SubscriptionManagerPort>(response.Service);

    Since we create only one subsciption manager with the partner attribute, the problem is solve but instead of sending a notification to a specified subscription manager, we send all notifications to the same and ou services receive all notifications instead of only the required.

    Maybe in our manual creation we forgot a parameter?
    That is strange is that our previous code was running under MDS1.5 refresh.

    Arnaud.
    Wednesday, July 29, 2009 2:37 PM
  • Let me make a couple of general comments.

    Firstly, handlers should only send notifications that match their message type, e.g. an Update Handlers should send Update notifications and a Replace handler should send Replace notifications.

    Check the body of the message to make sure that nothing is null. If you have cast from one type to another, maybe all the fields did not get filled in. Or if you are manually populating the message body then, as you suggest, maybe you missed a field.

    It's hard to say what might have changed from 1.5 to 2.0 to affect this. DSS does more checking of message types now.

    Trevor

    Tuesday, August 4, 2009 5:58 PM