• AruAru
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 7
    Replies

Hi,

 

I am trying to invoke Hoovers API from Salesforce. I am getting the following exception. When i am trying to invoke the api from the VF page.

 

Exception:

System.CalloutException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint =http://hapi.hoovers.com/HooversAPI-32 

 

I added the site in salesforce to the remote site, However it is saved in the below format.

I got the url from the Hoovers documents. http://developer.hoovers.com/docs34
Is it the issue with Hoovers Endpoint url or Salesforce not able to recognize the url.
Please suggest, 
Thanks,
Sunil
  • February 01, 2012
  • Like
  • 0

Hi,

 

I am trying to invoke Hoovers API from Salesforce. I am getting the following exception. When i am trying to invoke the api from the VF page.

 

Exception:

System.CalloutException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = http://hapi.hoovers.com/HooversAPI-32 

 

I added the site in salesforce to the remote site, However it is saved in the below format.

I got the url from the Hoovers documents. http://developer.hoovers.com/docs34
Is it the issue with Hoovers Endpoint url or Salesforce not able to recognize the url.
Please suggest, 
Thanks,
Sunil
  • February 01, 2012
  • Like
  • 0

Hi,

 

As part of a Project, we are in the process of identifying the

1. Number of ways to connect to an External System from Salesforce(As we need to connect to the external system, get required data from the external system and use that data in the Salesforce application) and

2. Finalizing the feasible/suitable approach of the above.

 

Can anyone please provide the different approaches of connecting Salesforce to External Systems and their feasibility in usage.

If you can give me a sample code for each of the approaches that would be of really great help for me.

 

Thanks in advance,

Sush.

Hi,

 

I am trying to invoke Hoovers API from Salesforce. I am getting the following exception. When i am trying to invoke the api from the VF page.

 

Exception:

System.CalloutException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = http://hapi.hoovers.com/HooversAPI-32 

 

I added the site in salesforce to the remote site, However it is saved in the below format.

I got the url from the Hoovers documents. http://developer.hoovers.com/docs34
Is it the issue with Hoovers Endpoint url or Salesforce not able to recognize the url.
Please suggest, 
Thanks,
Sunil
  • February 01, 2012
  • Like
  • 0

Hi

 

how to make a call to the API out of the class ?

  • January 31, 2012
  • Like
  • 0

Hi,

I am trying to make a callout from APEX to an HTTP endpoint(Hoover's API)  but am receiving the following error:

 
 500, internal server error'.

Here is my Apex class :



global public with sharing class HttpCallout_CLS {

    Public static void sendRequest(){
   
    String API_KEY = 'XXX';
   
    String env;
    env =  '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://applications.dnb.com/webservice/schema/">'+
             '<soapenv:Header>'+
                '<sch:API-KEY>XXX</sch:API-KEY>'+
             '</soapenv:Header>'+
             '<soapenv:Body>'+
               '<sch:FindCompanyByKeywordRequest>'+
                 '<sch:sortDirection>Ascending</sch:sortDirection>'+

                 '<sch:keyword>xyz</sch:keyword>'+

- Hide quoted text -

                 '<sch:searchBy>companyName</sch:searchBy>'+
                 '<sch:returnSearchNavigation>false</sch:returnSearchNavigation>'+
                 '<sch:orderBy xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>'+
                 '<sch:searchNavigation>'+
                   '<sch:employeeSearchNavigation>'+
                   '</sch:employeeSearchNavigation>'+
                   '<sch:ownershipTypeSearchNavigation>'+
                   '</sch:ownershipTypeSearchNavigation>'+
                   '<sch:locationTypeSearchNavigation>'+
                   '</sch:locationTypeSearchNavigation>'+
                   '<sch:salesSearchNavigation>'+
                   '</sch:salesSearchNavigation>'+
                   '<sch:locationSearchNavigation>'+
                     '<sch:countryNavigation>'+
                       '<sch:countryNavigationValue>${#Project#countryNavigationValue}</sch:countryNavigationValue>'+
                       '<sch:stateNavigation>'+
                        '<sch:stateNavigationValue>${#Project#stateNavigationValue}</sch:stateNavigationValue>'+
                        '<sch:cityNavigation>'+
                          '<sch:cityNavigationValue>${#Project#cityNavigationValue}</sch:cityNavigationValue>'+
                        '</sch:cityNavigation>'+
                      '</sch:stateNavigation>'+
                    '</sch:countryNavigation>'+
                  '</sch:locationSearchNavigation>'+
                  '<sch:industrySearchNavigation>'+
                  '</sch:industrySearchNavigation>'+
                '</sch:searchNavigation>'+
              '</sch:FindCompanyByKeywordRequest>'+
            '</soapenv:Body>'+
          '</soapenv:Envelope>';
 
   Http h = new Http();
    HttpRequest req = new HttpRequest();
    req.setEndpoint('http://hapi.hoovers.com/HooversAPI-32');
    req.setMethod('POST');
    req.setBody(env);
    req.setTimeout(12000);
   

    Blob headerValue = Blob.valueOf(API_KEY);


    String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);

    req.setHeader('Authorization',authorizationHeader)

;

       
    HTTPResponse res = h.send(req);
    System.debug(res.getBody());
    }
}




  I tried with username and password also, even though i'm facing the same issue. Has anyone experienced anything similar to this?.   Any help must be appreciated.
Thanks Inadvance,
Satheesh

Hi,

I am trying to make a callout from APEX to an HTTP endpoint(Hoover's API)  but am receiving the following error:

 
 500, internal server error'.

Here is my Apex class :



global public with sharing class HttpCallout_CLS {

    Public static void sendRequest(){
   
    String API_KEY = 'XXX';
   
    String env;
    env =  '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://applications.dnb.com/webservice/schema/">'+
             '<soapenv:Header>'+
                '<sch:API-KEY>XXX</sch:API-KEY>'+
             '</soapenv:Header>'+
             '<soapenv:Body>'+
               '<sch:FindCompanyByKeywordRequest>'+
                 '<sch:sortDirection>Ascending</sch:sortDirection>'+

                 '<sch:keyword>xyz</sch:keyword>'+

- Hide quoted text -

                 '<sch:searchBy>companyName</sch:searchBy>'+
                 '<sch:returnSearchNavigation>false</sch:returnSearchNavigation>'+
                 '<sch:orderBy xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>'+
                 '<sch:searchNavigation>'+
                   '<sch:employeeSearchNavigation>'+
                   '</sch:employeeSearchNavigation>'+
                   '<sch:ownershipTypeSearchNavigation>'+
                   '</sch:ownershipTypeSearchNavigation>'+
                   '<sch:locationTypeSearchNavigation>'+
                   '</sch:locationTypeSearchNavigation>'+
                   '<sch:salesSearchNavigation>'+
                   '</sch:salesSearchNavigation>'+
                   '<sch:locationSearchNavigation>'+
                     '<sch:countryNavigation>'+
                       '<sch:countryNavigationValue>${#Project#countryNavigationValue}</sch:countryNavigationValue>'+
                       '<sch:stateNavigation>'+
                        '<sch:stateNavigationValue>${#Project#stateNavigationValue}</sch:stateNavigationValue>'+
                        '<sch:cityNavigation>'+
                          '<sch:cityNavigationValue>${#Project#cityNavigationValue}</sch:cityNavigationValue>'+
                        '</sch:cityNavigation>'+
                      '</sch:stateNavigation>'+
                    '</sch:countryNavigation>'+
                  '</sch:locationSearchNavigation>'+
                  '<sch:industrySearchNavigation>'+
                  '</sch:industrySearchNavigation>'+
                '</sch:searchNavigation>'+
              '</sch:FindCompanyByKeywordRequest>'+
            '</soapenv:Body>'+
          '</soapenv:Envelope>';
 
   Http h = new Http();
    HttpRequest req = new HttpRequest();
    req.setEndpoint('http://hapi.hoovers.com/HooversAPI-32');
    req.setMethod('POST');
    req.setBody(env);
    req.setTimeout(12000);
   
    Blob headerValue = Blob.valueOf(API_KEY);

    String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
    req.setHeader('Authorization',authorizationHeader);

       
    HTTPResponse res = h.send(req);
    System.debug(res.getBody());
    }
}




  I tried with username and password also, even though i'm facing the same issue. Has anyone experienced anything similar to this?.   Any help must be appreciated.

Thanks Inadvance,
Satheesh

Hi,

 

I'm creating a date / time formula field in which I would like to keep te time of another date time field and subtract five hours from it.

 

For example, in field A I would have "11/23/2010 9:03 PM" and in field B (the formula one I should see "11/23/2010 4:03 PM"

 

 

Is this possible?

 

Thanks

 

Tzuvy

  • November 25, 2010
  • Like
  • 0