• Nigil
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hi Guys,
 
I am having issues with the listener that I am building rite now..
 
I have follow the AppExchange Developer Network Help File on building the Listener as follow...
but when come to INotificationBinding.. I am lost..
 
Can anyone show me a detail example.
 
Best Regards,
Nigil Chua
 
Once you have defined an outbound message and configured an outbound messaging endpoint, download the WSDL and create a listener:
  1. Right-click Click for WSDL and select Save As to save the WSDL to a local directory with an appropriate filename. For example, for an outbound message that deals with leads, you could name the WSDL file leads.wsdl.
  2. Unlike the enterprise or partner WSDLs, which describe the messages the client sends to Salesforce, this WSDL defines the messages that Salesforce will send to your client application.
  3. Most web services tools will generate stub listeners for you, in much the same way as they generate a client stub for the enterprise or partner WSDL. Look for a server side stub option.
    For example, for .Net 2.0:
    1. Run wsdl.exe /serverInterfaceleads.wsdl with .Net 2.0. This generates NotificationServiceInterfaces.cs, which defines the notification interface.
    2. Create a class that implements NotificationServiceInterfaces.cs.
    3. You implement your listener by writing a class that implements this interface. There are a number of ways to do this. One simple way is to compile the interface to a DLL first (DLLs need to be in the bin directory in ASP.NET:
      mkdir bin
      csc /t:library /out:bin\nsi.dll NotificationServiceInterfaces.cs      
      Now write an ASMX based web service that implements this interface. For example, in MyNotificationListener.asmx:
              <%@WebService class="MyNotificationListener" language="C#"%>
               class MyNotificationListener : INotificationBinding
               {            public notificationsResponse notifications(notifications n)
                            {
                                   notificationsResponse r = new notificationsResponse();
                                   r.Ack = true;
                                   return r;
                             }
               }
      This example is a simple implementation, actual implementations will be more complex.
    4. Deploy the service by creating a new virtual directory in IIS for the directory that contains the MyNotificationListener.asmx.
    5. You can now test that the service is deployed by viewing the service page with a browser. For example, if you create a virtual directory salesforce, you'd go to http://localhost/salesforce/MyNotificationListener.asmx.

    The process for other web service tools is similar, please consult the documentation for your web service tool. For Axis, we recommend version 1.1 or later.

Your listener must meet these requirements:
  • Must be reachable from the public Internet.
  • If you use SSL, you must use port 443, and you must have a real certificate. If you certificate expires, message delivery will fail.
  • May 21, 2007
  • Like
  • 0
Hi Guys.
 
I would like to know if I am able to subscribe to a Delegate Event Handler when there's changes in my salesforce CRM database?
 
We are using the entreprise version salesforce CRM.
 
All thoughts are welcome.
 
please advise,
Nigil Chua
  • May 10, 2007
  • Like
  • 0
Hi Guys,
 
I am having issues with the listener that I am building rite now..
 
I have follow the AppExchange Developer Network Help File on building the Listener as follow...
but when come to INotificationBinding.. I am lost..
 
Can anyone show me a detail example.
 
Best Regards,
Nigil Chua
 
Once you have defined an outbound message and configured an outbound messaging endpoint, download the WSDL and create a listener:
  1. Right-click Click for WSDL and select Save As to save the WSDL to a local directory with an appropriate filename. For example, for an outbound message that deals with leads, you could name the WSDL file leads.wsdl.
  2. Unlike the enterprise or partner WSDLs, which describe the messages the client sends to Salesforce, this WSDL defines the messages that Salesforce will send to your client application.
  3. Most web services tools will generate stub listeners for you, in much the same way as they generate a client stub for the enterprise or partner WSDL. Look for a server side stub option.
    For example, for .Net 2.0:
    1. Run wsdl.exe /serverInterfaceleads.wsdl with .Net 2.0. This generates NotificationServiceInterfaces.cs, which defines the notification interface.
    2. Create a class that implements NotificationServiceInterfaces.cs.
    3. You implement your listener by writing a class that implements this interface. There are a number of ways to do this. One simple way is to compile the interface to a DLL first (DLLs need to be in the bin directory in ASP.NET:
      mkdir bin
      csc /t:library /out:bin\nsi.dll NotificationServiceInterfaces.cs      
      Now write an ASMX based web service that implements this interface. For example, in MyNotificationListener.asmx:
              <%@WebService class="MyNotificationListener" language="C#"%>
               class MyNotificationListener : INotificationBinding
               {            public notificationsResponse notifications(notifications n)
                            {
                                   notificationsResponse r = new notificationsResponse();
                                   r.Ack = true;
                                   return r;
                             }
               }
      This example is a simple implementation, actual implementations will be more complex.
    4. Deploy the service by creating a new virtual directory in IIS for the directory that contains the MyNotificationListener.asmx.
    5. You can now test that the service is deployed by viewing the service page with a browser. For example, if you create a virtual directory salesforce, you'd go to http://localhost/salesforce/MyNotificationListener.asmx.

    The process for other web service tools is similar, please consult the documentation for your web service tool. For Axis, we recommend version 1.1 or later.

Your listener must meet these requirements:
  • Must be reachable from the public Internet.
  • If you use SSL, you must use port 443, and you must have a real certificate. If you certificate expires, message delivery will fail.
  • May 21, 2007
  • Like
  • 0