Fantastic! Thank you SO much Mike.. for the code and for your time. This is a tremendous help for me. You rock. I can't wait to implement it and start using it.
Quick question. When you are building a response to acknowledge the SOAP message was delivered to you, do you post one ACK response, or do you post multiple? This is in the case of having multiple notifications.
Or just one ACK response:Code:<?xml version = "1.0" encoding = "utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <notifications xmlns="http://soap.sforce.com/2005/09/outbound"> <Ack>True</Ack> <Ack>True</Ack> <Ack>True</Ack> <Ack>True</Ack> </notifications> </soapenv:Body> </soapenv:Envelope>
Code:<?xml version = "1.0" encoding = "utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <notifications xmlns="http://soap.sforce.com/2005/09/outbound"> <Ack>True</Ack> </notifications> </soapenv:Body> </soapenv:Envelope>
Thanks for joining the site sir, here is my answer to your question:
Our process picks up single and multiple, but we just send one response and it clears out the outbound message Que just fine
Ah, so it seems either way would work. I didn't know if it needed to be one way or the other. I was looking at documentation based on this and it seemed like it needed a response for each notification.
I've been working on some other stuff, but I decided to come back to the response back to salesforce. I was curious if I could just print out the response to the page (like you do in the first post's code example), or if I would have to go a different route. Currently, there is a LOT of processing that gets done and salesforce sometimes sends the message two or three times before the first response gets there it seems.
I don't have any issues clearing out the que in Salesforce.
So are you saying that it sends the same message 2 or 3 times or does it send 2 or 3 separate messages?
It will send a message then about another minute later it sends another, then about another minute later it sometimes sends a third. It's 3 individual soap messages, but it must think that if it doesn't get a response right then to send another. I might change when I'm doing my processing if that's the case. The pattern goes:
Update SF.com information -> Outbound Message -> pull the data into our system -> save the data -> send the response
(wait a minute)
Another Outbound Message -> look at the data and respond that we already have this data
(wait another minute)
Third Outbound Message comes in -> Respond again that we already have this data
are they the exact same, duplicate messages? Same message ID?
I would capture the message and take a look at it
Yes, everything is the same. I believe it has something to do with the amount of processing I'm doing before sending the response. I have some other pieces that I finished earlier today that do practically the same thing, but they don't do as much processing before sending their response. They don't seem to get duplicate messages nearly as often.
So, a custom quote type (that my company set up in SF.com) will get duplicate or triplicate messages every time where as an account or contact type will get a duplicate MAYBE 10% of the time. Neither one of the EVER get a triplicate message. I have a very strong feeling it has something to do with the amount of processing.
Bookmarks