function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AlexCRMmanagerAlexCRMmanager 

Outbound XML Message error

    I've created a very simple Outbound XML Message for the Account object that only sends the Id,  Name, and Sysmodstamp. Whenever I trigger it, I get this error in the Outbound Message Delivery Status Page:

org.xml.sax.SAXException: Processing instructions are not allowed within SOAP messages

I have no idea what this means, or why it thinks there are any kind of "processing instructions" in my SOAP message.

Am I missing something obvious?
SuperfellSuperfell
Most likely your endpoint listener is returning an HTML error page, you should use a capture tool to look at the response your endpoint's returning.
AlexCRMmanagerAlexCRMmanager
Thats very likely since we haven't built a SOAP handler at that URL yet. Couldn't the error message be a little bit more accurate, like "The endpoint returned an incorrect response to the SOAP message" or something sensible like that? The current error message makes me think that there was some internal processing error on the Salesforce.com side of the operation.
AlexCRMmanagerAlexCRMmanager
Also, you really should provide a table of all the possible error codes that could appear in the "Reason" column of the Outbound Message Delivery queue so that we could troubleshoot the errors ourselves instead of trying to guess at the cause for a cryptic message like "(412) Precondition failed" which I got when I put in an "https" URL for the endpoint.

We expect error messages like that from Microsoft products, but not Salesforce.com!! I hope that you aren't outsourcing your error message copy writing to Redmond...

Message Edited by AlexCRMmanager on 05-17-2007 01:26 PM

SuperfellSuperfell
The error message is the error message generated by the XML parser when it tried to parse your response, Processing Instructions are a part of XML
SuperfellSuperfell
In most cases we just report the error that the endpoint returns, in the 412 case, your endpoint returned a HTTP 412 status code.
AlexCRMmanagerAlexCRMmanager
Granted, I'm a total XML and SOAP noob, and I don't even really know what I'm doing with these messages (my developers will be writing all the code to handle the SOAP messages), but the error messages aren't specific enough - the error messages don't specify that the error occurred in the endpoint response as opposed to the outgoing XML message from Salesforce. I would imagine that even if I did know everything that I should about SOAP transactions, I would still wonder where the error was occurring, because the error message is showing up in the Outbound Message delivery queue, making me think that something I defined in the message was preventing it from being sent from Salesforce.com.

The other error message that I mentioned: "(412) Precondition Failed" doesn't specify whether the error occurred before or after delivery of the message either. I would think that the order of events might be kind of important for troubleshooting problems with the outbound messages.
AlexCRMmanagerAlexCRMmanager
Ahh, I see. Perhaps I should stay out of the developers' territory until I know more of what I'm talking about...

(but I still think you need a table in Help & Training to explain the error codes for novices like me :smileyhappy: )
SuperfellSuperfell
I'm not entirely sure i follow what you mean about before or after delivery. Due to the way HTTP works, if the server response with an HTML page, an unexpected status code, or some other response that is not the expected SOAP response, as a HTTP client i have absolutely no idea how much (if any) the server did of the processing of the request. I can't even tell if the request even made it to the intended recipient, the thing generating the response could be a firewall, a reverse proxy server running in your DMZ etc, and not even the web server where you're expecting the request to end up. Once the request makes it to the web server, as a client i still have no idea how far down the processing pipeline it go, perhaps a misconfigured soap stack rejected the message without even running a single line of code, because the namespaces are mismatched, perhaps its ran all your code, but the very last line generated an exception, again as a client, no idea. This makes it really hard to break up the processing into any kind of "steps", the only step is attempted delivery, and so the message we display is implicitly from the attempted delivery. I thought the (412) style messages included some indication that it was a HTTP problem, if not we should fix that. but otherwise you can safely assume that every error message is prefixed by "there was a problem during the attempted delivery of this message "...
SuperfellSuperfell
But its not a fixed set, at both the HTTP & SOAP levels, there's an almost inifinite number of faults that can be returned by the listener. Certainly the Wiki / FAQ should list some common issues, but its impossible to list the almost infinite number of errors possible.
AlexCRMmanagerAlexCRMmanager
Yes, now that I know that every message in the delivery queue was an attempted delivery, that does help me understand it a bit better, but at first glance I thought the error message was telling me that the error occurred pre-delivery. When I searched help and training for those error messages, there weren't any results that had anything to do with Outbound Messages, so I was even more uncertain about why the error occurred. I expected the message to fail because I was pointing it to a dummy URL, but those error messages made me wonder if I had set the Outbound Message up incorrectly.

Yes, 412 makes sense in an HTTP context, but the "Precondition Failed" doesn't seem to communicate anything useful in my opinion. Precondition to what? If it just said "HTTP 412 Error" it would have made sense to me.
SuperfellSuperfell
You tell me, that's the HTTP status code and status message that the URL you punched in returned.