• Gabriel Ejezie 4
  • NEWBIE
  • 0 Points
  • Member since 2015

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

Hi,

 

Has anyone done integration of Salesforce with any other Application using MQ as Middleware. I could not find any documentation on this. Please provide some pointers.

 

Thanks,

Sushil

I got an error: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML"

 

Can anyone tell me how I can generate some test code in Execute Anonymous to troubleshoot the following Callout SOAP request and response. The callout logic is very simple and it's about celsius to farenheit conversion. 

 

//Generated by wsdl2apex

public class ConverterWS {
    public class ConverterHttpSoap11Endpoint {
        public String endpoint_x = 'http://localhost:8080/Axis2WSTest/services/Converter.ConverterHttpSoap11Endpoint/';
        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;
        private String[] ns_map_type_info = new String[]{'http://wtp', 'ConverterWS'};
        public Double celsiusToFarenheit(Double celsius) {
            ConverterWS.celsiusToFarenheit_element request_x = new ConverterWS.celsiusToFarenheit_element();
            ConverterWS.celsiusToFarenheitResponse_element response_x;
            request_x.celsius = celsius;
            Map<String, ConverterWS.celsiusToFarenheitResponse_element> response_map_x = new Map<String, ConverterWS.celsiusToFarenheitResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'urn:celsiusToFarenheit',
              'http://wtp',
              'celsiusToFarenheit',
              'http://wtp',
              'celsiusToFarenheitResponse',
              'ConverterWS.celsiusToFarenheitResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.return_x;
        }
        public Double farenheitToCelsius(Double farenheit) {
            ConverterWS.farenheitToCelsius_element request_x = new ConverterWS.farenheitToCelsius_element();
            ConverterWS.farenheitToCelsiusResponse_element response_x;
            request_x.farenheit = farenheit;
            Map<String, ConverterWS.farenheitToCelsiusResponse_element> response_map_x = new Map<String, ConverterWS.farenheitToCelsiusResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'urn:farenheitToCelsius',
              'http://wtp',
              'farenheitToCelsius',
              'http://wtp',
              'farenheitToCelsiusResponse',
              'ConverterWS.farenheitToCelsiusResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.return_x;
        }
    }
    public class celsiusToFarenheit_element {
        public Double celsius;
        private String[] celsius_type_info = new String[]{'celsius','http://www.w3.org/2001/XMLSchema','float','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://wtp','true','true'};
        private String[] field_order_type_info = new String[]{'celsius'};
    }
    public class celsiusToFarenheitResponse_element {
        public Double return_x;
        private String[] return_x_type_info = new String[]{'return','http://www.w3.org/2001/XMLSchema','float','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://wtp','true','true'};
        private String[] field_order_type_info = new String[]{'return_x'};
    }
    public class farenheitToCelsiusResponse_element {
        public Double return_x;
        private String[] return_x_type_info = new String[]{'return','http://www.w3.org/2001/XMLSchema','float','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://wtp','true','true'};
        private String[] field_order_type_info = new String[]{'return_x'};
    }
    public class farenheitToCelsius_element {
        public Double farenheit;
        private String[] farenheit_type_info = new String[]{'farenheit','http://www.w3.org/2001/XMLSchema','float','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://wtp','true','true'};
        private String[] field_order_type_info = new String[]{'farenheit'};
    }
}

Hi.

We need 3 Certifcates
1.SSL Certificate.
2.CA Intermediate Certiticate.
3.Root Certifcate.
If you dont got the root certitifcate from the provider,you can download it from the provider website/home page.

Uploading CA-Signed Certiifcate as follows.
1.Open a Notepad.
2.Paste each certificate as per below order into the note pad.
-----BEGIN CERTIFICATE----- 
(SSL certificate) 
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- 
(CA Intermediate certificate) 
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- 
(Root certificate) 
-----END CERTIFICATE------
3.Save the notepad as "sitesSSL.cer" or "xxx.cer"
4.Now goto Settting>Security Control>Certtificate and Key Managment
5.Select the certificate in which you want to upload.
6.Upload the newly created sitesSSL.cer
7.If no errors than your done and chek your site from the browser whether you have a lock sign in the browser or not.
cheer
suresh