• Business Objects
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1
We have a Salesforce connector for API version 26 as well as 28 for extracting the data using corresponding WSDL from a Salesforce Org. We are able to get objects and extract data for customer which does not use branded Cloudforce URL.

But We are facing issue when we try to extract the data from a Salesforce Org which has branded cloudforce URL.

We get Transport error: 411 Error: Length Required when trying get objects for user and when we try to extract the data.

Following is code snippet where we are getting this error(It gives above error when we call stub.describeGlobal(..)) :

stub = createStub();  
DescribeGlobal describeGlobal = new DescribeGlobal();
PackageVersionHeader packageVersionHeader = new PackageVersionHeader();
DescribeGlobalResponse dgrs = stub.describeGlobal(describeGlobal, sessionHeader, co, packageVersionHeader);

It fails with following Error from salesforce side:

Transport error: 411 Error: Length Required
at com.sforce.soap.partner.SforceServiceStub.describeGlobal(SforceServiceStub.java:10059)

Note: we are passing sessionHeader,CallOptions correctly.
Code Snippet for same:
Options options = stub._getServiceClient().getOptions();
String SFDCClientID = getBirstParameter(SFDC_CLIENT_ID);
if (SFDCClientID != null && SFDCClientID.trim().length() > 0)
co = new CallOptions();

SforceServiceStub stub = new SforceServiceStub(stubServerUrl);
Options options = stub._getServiceClient().getOptions();
options.setProperty(HTTPConstants.MC_ACCEPT_GZIP, Boolean.TRUE);
options.setProperty(HTTPConstants.MC_GZIP_REQUEST, Boolean.TRUE);
options.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, Constants.VALUE_TRUE);

Also Note that we use SOAP API and use WSDL to provide us the default login URL for to connect and upon connect, we use the URL return by the Salesforce for data extraction.

Can someone suggest us on how we can fix this issue.