Proposed Target to Initiator

  • Tuesday, January 06, 2009 7:29 PM
     
     
    My CONTRACT is setup for "SENT BY ANY" on Initiator & Target, so i can send message from either side. from testing purpose when i try to SEND message from Target to Initiator (Not an acknowledgement message) i am getting follwoing error.

    MyTarget is setup exactly the way Initiator is beside different names of services,endpoints, routes etc.........
    My Message type, Contract etc... remains the same.

    Also i want to know that first i SEND messages from Initiator to Target & now i am SENDING messages from Target to Initiator, so do i have to take care of any thing in special while sending in reference to conversation_handle,conversation_group_id etc.........

    Error:-
    Error code -8408
     Target service '//xxxxxxx/xxx/InitiatorService' does not support contract '//xxxxx/xxxx/xxxxContract'


    Any help is appreciated.

All Replies

  • Tuesday, January 06, 2009 10:43 PM
    Moderator
     
     Proposed
    If I understand correctly you have two services, lets call them A and B and you can successfully initiate conversations and send messages from A to B but not from B to A.

    In this case the likely cause is that the countract used is boud to service 'B' but is not bound to service 'A'. Check sys.service_contract_usages. The destination service of any conversation (ie. the one in the 'target' role) has to be bound to the contract used, but this is not required for the service acting as the 'initiator'.

    To add a contract to a service use ALTER SERVICE ... ADD CONTRACT. In your case you would have to run this on the service '//xxxxxxx/xxx/InitiatorService'.

    http://rusanu.com/blog
    • Proposed As Answer by Augur8 Wednesday, July 25, 2012 12:38 PM
    •  
  • Wednesday, January 07, 2009 4:15 PM
     
     
    Hello Remus:

    You been great helpful, it was my typo mistake & i failed to add contract while creating Service on Initiator (A).  I came across one more error & that was permission issue & i learn that i have to run this command on both Initiator (A) & Target (B). so now i can SEND message from B to A and A to B.

    On Initiator Database
    GRANT SEND ON SERVICE::[Initiator Service] TO Public
    GO

    On Target Database
    GRANT SEND ON SERVICE::[Initiator Service] TO Public
    GO


    Now my SENT BY ANYWAY is working fine on both the side (A & B)

    Thanks for your kind help.

    Thanks
  • Wednesday, January 07, 2009 5:06 PM
    Moderator
     
     
    Glad it works now.
    Just a note to any reader that SENT BY ANY refers to the direction within an established conversation. If in my example above conversations established from A to B only send messages from A to B and in turn conversations established from B to A only send the message from B to A then the message is actually only sent by 'initiator' in both cases. To be sent by both (or 'any') the message would have to be sent by A to B and by B to A on the same conversation.

    http://rusanu.com/blog
  • Wednesday, July 25, 2012 12:39 PM
     
     

    just try this statement 

    select s.* , SCU.*, SC.*
    from sys.services S
    join sys.service_contract_usages SCU ON S.service_id = SCU.service_id
    join sys.service_contracts SC ON SCU.service_contract_Id = SC.service_contract_id

    you should verify your configuration