0

I am getting "org.xml.sax.SAXParseException; Premature end of file" issue while making a outbound Messaging request, though my endpoint system/application is receiving the expected request from the SF Outbound Messaging.

Not sure where its going wrong as O am even sending the proper Notification Response back to SF.

Please see the request and response sample below.

Notification Request recieved :

<?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"> <OrganizationId>***********</OrganizationId> <ActionId>04k28000000k9bNAAQ</ActionId> <SessionId>00D28000001efG9!AQgAQBsrauumLO1jkrVbTYT89C2C8Amm8w8Ids5207AbhXGOrrf46FrkIs72a_6Ixn4bMVNurCDCDtZzuAzEWEVoOiMpvYQJ</SessionId> <EnterpriseUrl>***************</EnterpriseUrl> <PartnerUrl>**********</PartnerUrl> <Notification> <Id>04l28000007F0qPAAS</Id> <sObject xsi:type="sf:Case" xmlns:sf="urn:sobject.enterprise.soap.sforce.com"> <sf:Id>5002800000Xbuq7AAB</sf:Id> <sf:Priority>High</sf:Priority> <sf:Reason>Breakdown</sf:Reason> <sf:Status>Escalated</sf:Status> <sf:Subject>aaaaaaaaaaaaa</sf:Subject> </sObject> </Notification> </notifications> </soapenv:Body></soapenv:Envelope>

Notification Response sent:

<?xml version=\"1.0\" encoding=\"UTF-8\"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><notificationsResponse xmlns="http://soap.sforce.com/2005/09/outbound"><Ack>true</Ack></notificationsResponse></soapenv:Body></soapenv:Envelope>

Screen Shots Below :

soapMessage

Delivery Failure Reason

0

This issue got resolved, the root cause being i have not flushed the OutputStreamWriter.

Though the above code contains write.flush() at the end and it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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