• atraver
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies

I have an integration utilizing Salesforce's "Outbound Messaging" functionality. When rule's criteria is met, a message is sent to an endpoint (a Java servlet) configured in my application. This endpoint takes the incoming SOAP request from Salesforce, processes its body and performs the desired action in my application. The HTTP response from my application is a SOAP document with a "notificationsResponse" element. However, as far as Salesforce is concerned, the outbound message workflow is not complete. In the "Outbound Messaging Delivery Status" screen in Salesforce, my message shows up as still being in the queue with a delivery failure reason of "org.xml.sax.SAXParseException: Premature end of file."

 

Looking for information on the outbound messaging functionality, I've come across the outbound messaging document, the outbound messaging WSDL document as well as various blogs talking about similar issues, but I haven't been able to come up with a workable solution. Some questions, then:

 

 

  1. Should my servlet be sending the SOAP document immediately as its HTTP response, or should it send an asynchronous SOAP response (i.e., through an entirely new HTTP request)?
  2. Is the notificationsResponse a red herring? Am I receiving the SAXParseException because of another problem? 
  3. Should I also be sending some kind of response to the original SOAP request to immediately tell Salesforce that I got the request and everything's OK? I've tried two different responses for the doPost() method in my endpoint servlet: (a) a void method, so no response is being sent, and (b) a method that returns a string representing the notificationsResponse object.
Part of me thinks this exception will linger until I sent a new SOAP request from my application to Salesforce with a notificationsResponse object, but it seems kinda weird that it would show up as an exception in the logs until I send that. I'd imagine there's some kind of "Things are OK, you'll be getting a notificationsResponse soon" response I can send, but maybe not? Maybe this exception just lingers until the final notificationsResponse SOAP call is sent to Salesforce?
I feel like I'm just blabbering at this point. Any help would be appreciated!

 

I'm using Salesforce's Customer Portal model to create a customized portal for my customers, using the SOAP API. Now, the first issue I'm having is that when I issue the following SOQL call, Salesforce tells me the CaseComment object doesn't have a CreatedBy field:

 

SELECT Id, CreatedDate, CommentBody, CreatedBy FROM CaseComment WHERE ParentId = '[some ID]'

 

I can work around that issue by querying instead for the CreatedById field, but then I have to do a lookup against every comment to get the comment creator's name (n+1 queries). It looks like I can't directly affect the field-level security for CaseComment objects through my Customer Portal profile, but looking at the field-level security setting for Case objects, I see that it is both visible and read-only, yet even those objects do not understand the notion of CreatedBy -- only CreatedById.

 

The other issue I'm running into is that when I create a CaseComment as the user I'm logged in with, I can query for the creator (User object), but when I log a comment through my company's standard Salesforce integration, the Customer Portal user does not have access to see the comment poster's name (using the above technique).

 

It looks like all of this is possible using the out-of-the-box Customer Portal, but we'd like to just use the backend, and customize/integrate the front-end on our site.

 

Does this make sense, and does it seem possible?

I have an integration utilizing Salesforce's "Outbound Messaging" functionality. When rule's criteria is met, a message is sent to an endpoint (a Java servlet) configured in my application. This endpoint takes the incoming SOAP request from Salesforce, processes its body and performs the desired action in my application. The HTTP response from my application is a SOAP document with a "notificationsResponse" element. However, as far as Salesforce is concerned, the outbound message workflow is not complete. In the "Outbound Messaging Delivery Status" screen in Salesforce, my message shows up as still being in the queue with a delivery failure reason of "org.xml.sax.SAXParseException: Premature end of file."

 

Looking for information on the outbound messaging functionality, I've come across the outbound messaging document, the outbound messaging WSDL document as well as various blogs talking about similar issues, but I haven't been able to come up with a workable solution. Some questions, then:

 

 

  1. Should my servlet be sending the SOAP document immediately as its HTTP response, or should it send an asynchronous SOAP response (i.e., through an entirely new HTTP request)?
  2. Is the notificationsResponse a red herring? Am I receiving the SAXParseException because of another problem? 
  3. Should I also be sending some kind of response to the original SOAP request to immediately tell Salesforce that I got the request and everything's OK? I've tried two different responses for the doPost() method in my endpoint servlet: (a) a void method, so no response is being sent, and (b) a method that returns a string representing the notificationsResponse object.
Part of me thinks this exception will linger until I sent a new SOAP request from my application to Salesforce with a notificationsResponse object, but it seems kinda weird that it would show up as an exception in the logs until I send that. I'd imagine there's some kind of "Things are OK, you'll be getting a notificationsResponse soon" response I can send, but maybe not? Maybe this exception just lingers until the final notificationsResponse SOAP call is sent to Salesforce?
I feel like I'm just blabbering at this point. Any help would be appreciated!

 

I'm using Salesforce's Customer Portal model to create a customized portal for my customers, using the SOAP API. Now, the first issue I'm having is that when I issue the following SOQL call, Salesforce tells me the CaseComment object doesn't have a CreatedBy field:

 

SELECT Id, CreatedDate, CommentBody, CreatedBy FROM CaseComment WHERE ParentId = '[some ID]'

 

I can work around that issue by querying instead for the CreatedById field, but then I have to do a lookup against every comment to get the comment creator's name (n+1 queries). It looks like I can't directly affect the field-level security for CaseComment objects through my Customer Portal profile, but looking at the field-level security setting for Case objects, I see that it is both visible and read-only, yet even those objects do not understand the notion of CreatedBy -- only CreatedById.

 

The other issue I'm running into is that when I create a CaseComment as the user I'm logged in with, I can query for the creator (User object), but when I log a comment through my company's standard Salesforce integration, the Customer Portal user does not have access to see the comment poster's name (using the above technique).

 

It looks like all of this is possible using the out-of-the-box Customer Portal, but we'd like to just use the backend, and customize/integrate the front-end on our site.

 

Does this make sense, and does it seem possible?