• prem jonnala 11
  • NEWBIE
  • 30 Points
  • Member since 2017

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 7
    Replies
Hi, I have done all the settings for SSO in Salesforce but while routing to the AD url we are facing below error. Moreover the URL of identity provider (Identity Provider Login URL) also getting changed wile try to login. Is there any additional setting need to configue other than mentioned in SSO Seeting in salesforce. 
User-added image
I'm trying to make an HTTP Request to other System.

They provided the endpoint URL which contains a Port number.

https://Test.com:50001/RESTAP/BGN/PRDV/CREATE

When I'm trying to make the request I facing with this ERROR:

> System.CalloutException: Unable to tunnel through proxy. Proxy returns
> "HTTP/1.1 503 Service Unavailable"

although I have added the URL in remote sites.

When I make the request from Postman - I get the response as expected.

My code is : 

    Http httpProtocol = new Http();
            HttpRequest request = new HttpRequest();
            String url = 'https://Test.com:50001/RESTAP/BGN/PRDV/CREATE';
            String username2 = 'Name';
            String password2 = 'Passowrd';
            Blob headerValue = Blob.valueOf(username2 + ':' + password2);
            String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
            request.setEndpoint(url);
            request.setMethod('POST');
            request.setHeader('Authorization', authorizationHeader);
            request.setTimeout(60000);
    
    
            request.setHeader('Content-Type','application/json');
            request.setHeader('proxyPort','50001');
            request.setHeader('proxyHost','PROXYHOST URL');
            request.setHeader('proxySet','true');
    
            HttpResponse response = httpProtocol.send(request);


Note: The userName and Password will be filled from Custom setting.

I tried with and without the proxy header, I tried to turn the BASIC auth to Basic and many other little changes that didn't work.

I'm still getting this Error.

How can I know if it not blocked by Firewall? 

Any help or Idea to solve this issue

Thanks!
  • August 27, 2019
  • Like
  • 0
Hi. 

I'm doing an integration with an external service (web service), I generated the apex classes through WSDL2Apex until here everything goes well, the problem is that the WS has a web service security header and I do not know how to add it. The header I have to add is the following:

   <soapenv:Header>
 <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" wsse:mustUnderstand="1">
     <wsse:UsernameToken>
         <wsse:Username>XXXXX</wsse:Username>
         <wsse:Password>XXXX</wsse:Password>
        </wsse:UsernameToken>
   </wsse:Security>
   </soapenv:Header>


If someone has done something similar and can help me would be greatly appreciated.
Thanks in advance for any help.
Hi,
I am getting following exception when webservice callout is made.
sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
Can anyone let me know what could be the exact cause of why this error is encountered?

Thanks 
 
Hi I am using Connected App for Using Oauth2 connection. where Third Party can access rest API's devloped in salesforce using connected App.
while we are stablish connetion with Third part app using Connected App token is avilabel for 20 minutes only.
my connected app 
Refresh Token Policy: Refresh token is valid until revoked. so why token is expired in 20 minutes.
I want to use same Token until I revoke it. so Third party App dosen required connection every 20 minutes.
Hi, I have done all the settings for SSO in Salesforce but while routing to the AD url we are facing below error. Moreover the URL of identity provider (Identity Provider Login URL) also getting changed wile try to login. Is there any additional setting need to configue other than mentioned in SSO Seeting in salesforce. 
User-added image