Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Consuming a SOAP service using an activity fails with EOF error

SA-18309

Summary



User has imported the WSDL file, but when a SOAP service is consumed using an activity, it fails to work with the following error in the logs.

 

Error Messages



com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0]


Steps to Reproduce



Run an activity with request values that consumes a SOAP service.


Root Cause



It is because of the header being added from PRPC to the SOAP request envelope.
 

SOAP envelope from PRPC :  (non-working)

 

<?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:Header>

<ns1:SessionHeader xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:sessionId /> </ns1:SessionHeader><ns1:AssignmentRuleHeader xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:assignmentRuleId xsi:nil="true" /> <ns1:useDefaultRule xsi:nil="true" /> </ns1:AssignmentRuleHeader><ns1:MruHeader xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:updateMru /> </ns1:MruHeader><ns1:AllowFieldTruncationHeader xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:allowFieldTruncation /> </ns1:AllowFieldTruncationHeader><ns1:DisableFeedTrackingHeader xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:disableFeedTracking /> </ns1:DisableFeedTrackingHeader><ns1:StreamingEnabledHeader xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:streamingEnabled /> </ns1:StreamingEnabledHeader><ns1:AllOrNoneHeader xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:allOrNone /> </ns1:AllOrNoneHeader><ns1:DebuggingHeader xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:debugLevel /> </ns1:DebuggingHeader><ns1:PackageVersionHeader xmlns:ns1="urn:enterprise.soap.sforce.com"> </ns1:PackageVersionHeader><ns1:EmailHeader xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:triggerAutoResponseEmail /> <ns1:triggerOtherEmail /> <ns1:triggerUserEmail /> </ns1:EmailHeader><ns1:OwnerChangeOptions xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:transferAttachments /> <ns1:transferOpenActivities /> </ns1:OwnerChangeOptions>

</soapenv:Header>

<soapenv:Body><ns1:update xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns2:sObjects xmlns:ns2="urn:enterprise.soap.sforce.com" xmlns:ns1="urn:sobject.enterprise.soap.sforce.com"> <ns1:Id>001e000000faNgqAAE</ns1:Id> <ns1:Zone__c>US - Dallas</ns1:Zone__c> <ns1:Region__c>SMP</ns1:Region__c> <ns1:Sub_Region__c>Brazil</ns1:Sub_Region__c> </ns2:sObjects> </ns1:update>

</soapenv:Body>

</soapenv:Envelope>

 

SOAP envelope that is working fine from SOAP UI is not having the Header part as shown below :

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com" xmlns:ens="urn:sobject.enterprise.soap.sforce.com" xmlns:xsi="xsi">

   <soapenv:Header/>

   <soapenv:Body>

      <ns1:update xmlns:ns1="urn:enterprise.soap.sforce.com">

         <ns2:sObjects xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn:sobject.enterprise.soap.sforce.com" xmlns:ns2="urn:enterprise.soap.sforce.com">

            <ns1:Id>001e000000faNgqAAE</ns1:Id>

            <Zone__c>US - Dallas</Zone__c>

            <Region__c>SMP</Region__c>

            <Sub_Region__c>Brazil</Sub_Region__c>

         </ns2:sObjects>

      </ns1:update>

   </soapenv:Body>

</soapenv:Envelope>


Resolution



Perform the following local-change steps:
1. Remove the parameters from Request Headers > Request tab > Connect SOAP rule.
2. Verify from tracer, that header is not getting passed in the request
 

Published February 9, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us