• hjethava1.3969505581221326E12
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Description:
- Using Partner WSDL(API Version: 34.0) we have generated Salesforce Client using Axis. In case user has created a Lightning Page of type "Record Page" for a given object in that case actionOverrides for type "View" is automatically being added with "url" value as null, but Partner WSDL expects the "url" to be not null and because of that describeSObject for that particular object fails through Salesforce client.

WSDL Snippet:
<complexType name="ActionOverride">
    <sequence>
        <element name="isAvailableInTouch" type="xsd:boolean"/>
        <element name="name" type="xsd:string"/>
        <element name="pageId" type="tns:ID"/>
        <element name="url" type="xsd:string"/>
    </sequence>
</complexType>

"View" type actionOverride generated because of lightning page of type "Record Page":
<actionOverrides>
    <isAvailableInTouch>false</isAvailableInTouch>
    <name>View</name>
    <pageId>0M090000000GnVCCA0</pageId>
    <url xsi:nil="true"/>
</actionOverrides>

Note that value for "url" is set to null/xsi:nil="true" and because of that when we try to describe this object using describeSObject method using Salesforce client it fails with following error:

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: The element: url  cannot be null
    at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) ~[axis2-kernel-1.6.2.jar:1.6.2]
    at com.sforce.soap.partner.SforceServiceStub.fromOM(SforceServiceStub.java:27652) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.SforceServiceStub.describeSObject(SforceServiceStub.java:17202) ~[sfdc-client-34.0.jar:?]
    ... 21 more
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: The element: url  cannot be null
    at com.sforce.soap.partner.ActionOverride$Factory.parse(ActionOverride.java:656) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.DescribeSObjectResult$Factory.parse(DescribeSObjectResult.java:2288) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.DescribeSObjectResponse$Factory.parse(DescribeSObjectResponse.java:410) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.SforceServiceStub.fromOM(SforceServiceStub.java:26904) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.SforceServiceStub.describeSObject(SforceServiceStub.java:17202) ~[sfdc-client-34.0.jar:?]
    ... 21 more
Caused by: org.apache.axis2.databinding.ADBException: The element: url  cannot be null
    at com.sforce.soap.partner.ActionOverride$Factory.parse(ActionOverride.java:627) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.DescribeSObjectResult$Factory.parse(DescribeSObjectResult.java:2288) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.DescribeSObjectResponse$Factory.parse(DescribeSObjectResponse.java:410) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.SforceServiceStub.fromOM(SforceServiceStub.java:26904) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.SforceServiceStub.describeSObject(SforceServiceStub.java:17202) ~[sfdc-client-34.0.jar:?]
    ... 21 more


Looks like either WSDL should be updated with <element name="url" type="xsd:string" nillable="true"/> or creation of "Record Page" should handle this appropriately so that we don't get this error.

Note: Latest Partner WSDL also has same issue.

Record Page Creation
We have created a new Users in salesforce using https://developer.salesforce.com/signup . Now we want to create "Custom Branding" like what is mentioned in https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/trialforce_branding_about.htm using the user that we created.

Questions:
1. Is it possible to setup Custom Bindings using Developer Edition User? - Here In developer account we could configure site but for that site, URL ends with .force.com but what we are looking for is a URL that ends with .cloudforce.com
2. Do we need to have a Salesforce Partner account in order to configure Custom Branding? If yes than what are the steps we need to perform in order to get Partner account?

Purpose:
- We have developed a connector which uses Salesforce SOAP API to pull data from salesforce. We successfully able to extract data using Salesforce User which are pointing to Non Branded URLs where as for Branded URLs in order to extract data we had to apply some hacks to fetch data(Hack that we had to apply is mentioned in https://developer.salesforce.com/forums/ForumsMain?id=906F00000009ztsIAA). Now Inorder to perform testing on Branded URLs we need a User that points to Branded URLs, hence we want to check on how we can configure "Custom Branding" so that we can test our changes regularly.

Your help will be appreciated.
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();
co.setClient(SFDCClientID);           
}

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.setTimeOutInMilliSeconds(timeoutInMilliseconds);
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.
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();
co.setClient(SFDCClientID);           
}

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.setTimeOutInMilliSeconds(timeoutInMilliseconds);
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.
Description:
- Using Partner WSDL(API Version: 34.0) we have generated Salesforce Client using Axis. In case user has created a Lightning Page of type "Record Page" for a given object in that case actionOverrides for type "View" is automatically being added with "url" value as null, but Partner WSDL expects the "url" to be not null and because of that describeSObject for that particular object fails through Salesforce client.

WSDL Snippet:
<complexType name="ActionOverride">
    <sequence>
        <element name="isAvailableInTouch" type="xsd:boolean"/>
        <element name="name" type="xsd:string"/>
        <element name="pageId" type="tns:ID"/>
        <element name="url" type="xsd:string"/>
    </sequence>
</complexType>

"View" type actionOverride generated because of lightning page of type "Record Page":
<actionOverrides>
    <isAvailableInTouch>false</isAvailableInTouch>
    <name>View</name>
    <pageId>0M090000000GnVCCA0</pageId>
    <url xsi:nil="true"/>
</actionOverrides>

Note that value for "url" is set to null/xsi:nil="true" and because of that when we try to describe this object using describeSObject method using Salesforce client it fails with following error:

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: The element: url  cannot be null
    at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) ~[axis2-kernel-1.6.2.jar:1.6.2]
    at com.sforce.soap.partner.SforceServiceStub.fromOM(SforceServiceStub.java:27652) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.SforceServiceStub.describeSObject(SforceServiceStub.java:17202) ~[sfdc-client-34.0.jar:?]
    ... 21 more
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: The element: url  cannot be null
    at com.sforce.soap.partner.ActionOverride$Factory.parse(ActionOverride.java:656) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.DescribeSObjectResult$Factory.parse(DescribeSObjectResult.java:2288) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.DescribeSObjectResponse$Factory.parse(DescribeSObjectResponse.java:410) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.SforceServiceStub.fromOM(SforceServiceStub.java:26904) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.SforceServiceStub.describeSObject(SforceServiceStub.java:17202) ~[sfdc-client-34.0.jar:?]
    ... 21 more
Caused by: org.apache.axis2.databinding.ADBException: The element: url  cannot be null
    at com.sforce.soap.partner.ActionOverride$Factory.parse(ActionOverride.java:627) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.DescribeSObjectResult$Factory.parse(DescribeSObjectResult.java:2288) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.DescribeSObjectResponse$Factory.parse(DescribeSObjectResponse.java:410) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.SforceServiceStub.fromOM(SforceServiceStub.java:26904) ~[sfdc-client-34.0.jar:?]
    at com.sforce.soap.partner.SforceServiceStub.describeSObject(SforceServiceStub.java:17202) ~[sfdc-client-34.0.jar:?]
    ... 21 more


Looks like either WSDL should be updated with <element name="url" type="xsd:string" nillable="true"/> or creation of "Record Page" should handle this appropriately so that we don't get this error.

Note: Latest Partner WSDL also has same issue.

Record Page Creation