0

I am new to Sales Force and I am building a Listener that generally listens to outbound messages from salesforce.

1st. I don't have a staging server or testing server to test this when sending outbound messages the only place where I do my testing is localhost IIS, Now I want to test the outbound messages and want to be able to grab values from the message and update my database. Is there a way to do this on the localhost?

2nd Problem I am having is I read all the documentation of salesforce Listener but I still don't understand the way it works, why do we need the WSDL file set up as a class in the web service? if the data is coming can't we just decode it and grab what we need? if the WSDL file is just to send back the message of acknowledgment can't we have just one WSDL from an outbound message why do we need WSDL classes set up for every outbound message separately. Please help me understand how this works how a listener needs the web service set up with the WSDL file, whats the purpose and whats the code to be able to grab lest say a Lead ID from the outbound message thanks!

0
  1. Can I use localhost to receive outbound messages from Salesforce?

For Salesforce to be able to call your web service it needs to be on a publicly accessible IP address on your machine.

You will need to configure the web service on your local machine to listen on a port. Then you just configure Salesforce to send the message to your current public IP address.

This is much easier if you have a static IP address. Other complications can occur if you are on a corporate network or are otherwise behind a firewall that won't let the traffic in to the expected IP address.

Generally though, it is possible. I've had our network admin at work open up a public IP address and port combination and route it through to my work computer. Then I was able to host the web service and process the outbound messages from Salesforce.

  1. Why does each outbound message have it's own WSDL?

Part of the WSDL defines the specific structure of the message. This changes based on what object and fields are being sent and is generally unique to the outbound message. Hence each has it's own WSDL.

Depending on your tooling it may be easier or harder to import that WSDL and have code generated from it. Otherwise you could just process the HTTP request and send back the ACK or NACK as required.

  • Thank you very much for the detailed reply really helped me. – Francis Mar 4 '19 at 15:32
  • Just one more question, so the WSDL is unique for the type of notification and it sends back the structural reply acknowledging the message, does that have anything to do with the data that's coming I mean I know what the message is sending ex: ID, name, address and if not lets say I just create the HTTP response that generic for every type of notification is there a specific code that I need to decode the message and take the data that I need? Do you know of any documentation for that? – Francis Mar 4 '19 at 15:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.