• Lakshmi sambandham 14
  • NEWBIE
  • 0 Points
  • Member since 2019

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

Currently working on the project  sso integration with third party,

Process 1 :- SSO Third party connection (salesforce is an identity Provider and Third party (Fidelity is a service provider) è Done

Process 2:- Testing the end point URL with SOAP UI tool, Client has sent the WSDL file, I did generated the wsdl file.


public class wwwFmrCom {
    public class Echo {
        public String endpoint_x = 'https://b2b-test.efidelity.com/in/fi/extapixq1/apiecho/services/Echo';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x='SWBC_Fidelity_2019_UAT';
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        public xmlnsFmrComInstitutionalCommonHe.ExternalPrincipalIdentity ExternalPrincipalIdentity;
        public xmlnsFmrComInstitutionalCommonHe.ExternalProcessingDirectives ExternalProcessingDirectives;
        private String ExternalPrincipalIdentity_hns = 'ExternalPrincipalIdentity=http://xmlns.fmr.com/institutional/common/headers/2013/03/ExternalPrincipalIdentity';
        private String ExternalProcessingDirectives_hns = 'ExternalProcessingDirectives=http://xmlns.fmr.com/institutional/common/headers/2011/12/ExternalProcessingDirectives';
        private String[] ns_map_type_info = new String[]{'http://xmlns.fmr.com/institutional/api/2011/12/ExternalEcho', 'xmlnsFmrComInstitutionalApi', 'http://www.fmr.com/wsdl', 'wwwFmrCom', 'http://xmlns.fmr.com/institutional/common/headers/2013/03/ExternalPrincipalIdentity', 'xmlnsFmrComInstitutionalCommonHe', 'http://xmlns.fmr.com/institutional/common/headers/2011/12/ExternalProcessingDirectives', 'xmlnsFmrComInstitutionalCommonHe', 'http://xmlns.fmr.com/institutional/common/errors/2011/06/ServiceErrors', 'xmlnsFmrComInstitutionalCommonErr'};
        public String Echo(String Input) {
            xmlnsFmrComInstitutionalApi.Echo request_x = new xmlnsFmrComInstitutionalApi.Echo();
            ExternalPrincipalIdentity = new xmlnsFmrComInstitutionalCommonHe.ExternalPrincipalIdentity();
            ExternalPrincipalIdentity.B2BPartnerPrincipalId = '6060000690'; 
            ExternalPrincipalIdentity.RequestorId = '0136500009';
            ExternalPrincipalIdentity.AuthMethod = 'Certificate';
            ExternalPrincipalIdentity.PrincipalDomain = 'Correspondent';
            ExternalPrincipalIdentity.PrincipalRole = 'Correspondent';   
            ExternalProcessingDirectives = new xmlnsFmrComInstitutionalCommonHe.ExternalProcessingDirectives();
            ExternalProcessingDirectives.LogTrackingId = 'Sample';
            request_x.Input = Input;
            xmlnsFmrComInstitutionalApi.EchoResponseType response_x;
            Map<String, xmlnsFmrComInstitutionalApi.EchoResponseType> response_map_x = new Map<String, xmlnsFmrComInstitutionalApi.EchoResponseType>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'Echo',
              'http://xmlns.fmr.com/institutional/api/2011/12/ExternalEcho',
              'Echo',
              'http://xmlns.fmr.com/institutional/api/2011/12/ExternalEcho',
              'EchoResponse',
              'xmlnsFmrComInstitutionalApi.EchoResponseType'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.Echo;
        }
    }
}



wwwFmrCom.Echo  echoTest = new wwwFmrCom.Echo();
String  strResponse =  echoTest.Echo('Hello there');


Line: 31, Column: 1
System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: xmlns.fmr.com.institutional.common.errors.2011.06.ServiceErrors faultcode=ns2:ServiceErrors faultactor=

Please let me know any thing i need to change or is there any cert issue, i am stuck in here..

Thank you,
saravanarajlakshmi@gmail.com
 Hi Guys, am new to integration, currently working on the SSO project, Connection has already been done with third party(Fidelity), stuck with integration now,  is any body done integration with third party using SOAP before? Please contact me sambandham.dhana.lakshmi@gmail.com
Hello,

I am working on integrating Salesforce.com and external system (ERP).  I am making a call out using SOAP API

What I have provided to third party?
- Create a user for integration and shared the username,password&securitytoken
-Created an global apex class with webservice methods.
-Generated WSDL from above class
-Generated Enterprise WSDL

What I received from third party?
-WSDL (https end point)
-.PEM certificate and .pfx format certifcate

Development process on Salesforce side

I have generated a single Apex class (Gnerate from WSDL) from the WSDL I recieved from third party.

One of the classes generated is below

public class HTTPS_Port {
        public String endpoint_x = ‘bhla bhla…’;
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;



            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://sap.com/xi/WebService/soap1.1',
              'urn:sap-com:document:sap:soap:functions:mc-style',
              'YRequest',
              'urn:sap-com:document:sap:soap:functions:mc-style',
              'YRequestResponse',
              'WebServiceClient.YRequestResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.FStatus;
        }
    }


I have generated an apex class to call the third party service (above generated class). In this class I have to provide the following

public String clientCertName_x;// may be this is required if the certificate is generated with in SAlesforce org. So I might not need to pass this info.
        public String clientCert_x; // This is the certifcate which has based64. I am good with this
        public String clientCertPasswd_x; // what is the password i need to enter  here. I asked third party to give this password but they say don't have it. Where do i get this password from?

My call fails if I don't enter the password. Error is - CertPasswd cannot be null
If the give a blank string for the password, the Error is "Error MessageIO Exception: DER input, Integer tag error"

I am stuck with the password issue here. Can someone help me out if there is something to be on Salesforce side? Am I missing something?

Any help is greatly appreciated.

Thank you!