• Victor Cazacu 4
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
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
We have a Java Program which uses Bulk API (with PK Chunking)  to extract records from an Object. The "select query" has a where clause, which should extract a subset of records, to honour the where clause, but we see that huge numer of batches are created on the Salesforce Server side, and many a times, the BULK API limits are hit

For example :
Number of records in the Object Account : 20000 We enable the connection and set the Pk Chunking header as , with chunk size as 2000
 
bulkConnection.addHeader("Sforce-Enable-PKChunking","chunkSize=2000");

Select Query :
SELECT Id, Name FROM Account WHERE CreatedDate >= 2018-07-20T05:00:00.000Z"


As per the query to match the condition, the query should return only 10 records (at most 1 batch), but we see that there are 10 batches created on the Salesforce Server.
Why is there 10 batches that are created, when the number of records to be extracted is only 10 which can fit in 1 batch.
Is there any setting that can be applied, or code tuning that can be done so that only 1 batch is created on the Salesforce Server
Hello all,
We are a Taxicab Organisation.  My organisation stores information about all taxicabs in an object. It includes VIN,make model etc. We are looking for an integration with Carfax/Vina udit or...any company that provides the API. The company should provide reports of vehicle history. 


My requirement is.. when we are saving a new record of a vehicle the fields like make,model of the vehicle  and title should be auto populated based on the VIN of the vehicle. Is this possible? Any suggestion is greatly appreciated.
Hello everyone,

Looking for some advice. We are encountering the dreaded ConcurrentPerOrgApex limit which I realise can be tricky to deal with. We've researched a number of articles including:
  • https://developer.salesforce.com/blogs/engineering/2013/05/force-com-concurrent-request-limits.html
  • http://www.slideshare.net/developerforce/concurrency-designpatterns-mt
  • http://www.eltoro.it/ArticleViewer?id=a07A000000NPRi8IAH
Salesforce support aren't being the most helpful and wanted to confirm a couple of things:
  1. Documentation states that its Apex, SOQL, etc. that counts towards this limit. We've used Developer Console to look at timelines and looking only at the Apex and DB requests, they are always coming back in a few miliseconds, no where near five seconds. All actvitities may take longer than 5 seconds. So should we be reading the timeline from the start to the end for all parts, or just the Apex and DB rows?
  2. We have Email-to-Case enabled and one Email-to-Apex handler. We've been told that everytime E2C processes an email, the E2A handler is also fired, even though emails are NOT sent to this address. Is this correct? Anyone else found this?
Any other hints and tips on how to track these down without spending 10% of our license fee to get the monitoring option would be greatly appreciated.