• Piyush Divecha
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi,

I am calling external web service for updating data from SFDC to external system.
We have CA signed certificate.
I am passing endpoint, certificate name that is installed but it is not working and giving below error.Can you please help.

System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: Authentication Failure:  SOAP body must be signed for signature-based authentication. No credentials were provided.  Contact IT SOASvsSupport. faultcode=soap:client faultactor=SOA

//Code
public class WaiverMgmtSfdcPointSynchSOAP {
        public String endpoint_x = 'xxxx';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x='certificate name';
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        


        private String[] ns_map_type_info = new String[]{'http://www.example.org/WaiverMgmtSfdcPointSynch/', 'OrgWaivermgmtsfdcpointsynch'};
        public OrgWaivermgmtsfdcpointsynch.StoreAllocatedPointsResponseType StoreAllocatedPoints(OrgWaivermgmtsfdcpointsynch.StoreAllocatedPointsRequestType StoreAllocatedPointsRequest) {
            OrgWaivermgmtsfdcpointsynch.StoreAllocatedPoints_element request_x = new OrgWaivermgmtsfdcpointsynch.StoreAllocatedPoints_element();
            request_x.StoreAllocatedPointsRequest = StoreAllocatedPointsRequest;
            OrgWaivermgmtsfdcpointsynch.StoreAllocatedPointsResponse_element response_x;
            Map<String, OrgWaivermgmtsfdcpointsynch.StoreAllocatedPointsResponse_element> response_map_x = new Map<String, OrgWaivermgmtsfdcpointsynch.StoreAllocatedPointsResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://www.example.org/WaiverMgmtSfdcPointSynch/StoreAllocatedPoints',
              'http://www.example.org/WaiverMgmtSfdcPointSynch/',
              'StoreAllocatedPoints',
              'http://www.example.org/WaiverMgmtSfdcPointSynch/',
              'StoreAllocatedPointsResponse',
              'OrgWaivermgmtsfdcpointsynch.StoreAllocatedPointsResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.StoreAllocatedPointsResponse;
        }
    }
 
Hi all,

I`m struggling to fix an issue which arise with the new Salesforce Lightning Experience. So, I have a Visualforce page which is assigned to the Edit functionality of Accounts. In Salesforce Classic mode everything works perfectly good, but when I switch to the new Lightning Experience I get a strange behavior on redirect - the lightning is removed and I get redirected to the classic mode page. I hope to clarify things with the below screenshots.

First, I edit one of my accounts to go to my Visualforce page.
User-added image

First, I edit one of my accounts to go to my Visualforce page.
User-added image

First, I edit one of my accounts to go to my Visualforce page.User-added image

I'm using PageReference object in my Apex controller for navigation, but from what I've red it is not working with the Lightning.
For example:
 
    PageReference pg = null;
    try{
        pg = stdController.save();  
    }catch(Exception ex){           
        Logger.Instance.LogException(ex, false);
    }

    return pg;
If anyone can give me directions, I would be very grateful!