• Bms270
  • NEWBIE
  • 30 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 17
    Replies

Hi,

 

When our app makes a callout to an external webservice over SSL, we get the following Exception:

 

System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

 

 This doesn't happen with regular http callout. our certificate is NOT expired on the target server and everything seems to be normal. no alert or anything from the browser.

 any idea?

 

Thanks,

 

P.S We need to resolve this for security review.

 

 

 

 

 

 

Message Edited by Bms270 on 05-14-2009 07:17 PM
Message Edited by Bms270 on 05-14-2009 07:19 PM

I have a class which contains functions that are used to make webservice callouts only. I need to cover these functions in my test methods but "Run Test" fails after running the first function with the following message:

(Older API) Methods defined as TestMethod do not support Web service callouts, test skipped

 

(NEW API - 15) System.TypeException: Testmethods do not support webservice callouts.

 

in this scenario I need to know how I can obtain the required coverage (75%) on my Apex class.  is there anyway that I can ignore callouts but force the test method to continue? in my class more than 75% of the code is the functions that each make a callout to an external webservice. any Idea?
 

Thanks

 

P.S: I have searched the forum and this has been posted several times but no answer yet.

  • April 14, 2009
  • Like
  • 0

I have a class which contains functions that are used to make webservice callouts only. I need to cover these functions in my test methods but "Run Test" fails after running the first function with the following message:

(Older API) Methods defined as TestMethod do not support Web service callouts, test skipped

 

(NEW API - 15) System.TypeException: Testmethods do not support webservice callouts.

 

in this scenario I need to know how I can obtain the required coverage (75%) on my Apex class.  is there anyway that I can ignore callouts but force the test method to continue? in my class more than 75% of the code is the functions that each make a callout to an external webservice. any Idea?
 

Thanks

 

P.S: I have searched the forum and this has been posted several times but no answer yet.

  • April 14, 2009
  • Like
  • 0

Hi,

 

When I run my test method I get the following exception:

 

System.TypeException: Testmethods do not support webservice callouts.

 

this happens at the line that my code calls a webservice and from that point the test method doesnt cover any lines of code (even those lines that has nothing to do with webservices). Is there any workaround for this? I cant increase the coverage just because of this issue.

 

 

Any Idea?

 

Thanks.

  • April 13, 2009
  • Like
  • 0

Hi,

 

I need a trigger for when a "pricebookEntry" gets updated, being created or getting deleted. (on Insert, on update and on delete). I noticed "product2" triggers do not fire  on "pricebookEntry" changes. is there any way to handle this? 

 

 

Thanks

  • April 13, 2009
  • Like
  • 0
Hi,

i have a problem regarding installing a package. This failure:

Unable to install this package for the following reasons:


  
Missing Organization Feature: Contact.RecordType  


I have created this app on dev account (beta package) and I dont have any Record Type in the package/system. I am trying to install this package in another dev account which fails. I have not used "Record Type" feature anywhere in the application but I did change the master layout of "Contact" view. not sure if that requires creating a record type and then including that in the package. any idea?

Thanks.
  • October 23, 2008
  • Like
  • 0
I need to add a custom field to the "Contact" object which would hold Social Security number. since this is a sensitive info I want it to showup like a password field (<input type="password">) in the contact form. how this can be done?

Thanks,
Bijan

  • October 22, 2008
  • Like
  • 0
I have a class which contains functions that are used to make webservice callouts only. I need to cover these functions in my test methods but "Run Test" fails after running the first function with the following message:

Methods defined as TestMethod do not support Web service callouts, test skipped

in this scenario I need to know how I can obtain the required coverage (75%) on my Apex class.  is there anyway that I can ignore callouts but force the test method to continue? in my class more than 75% of the code is the functions that each make a callout to an external webservice. any Idea?

Thanks

  • October 21, 2008
  • Like
  • 0
This is the definition of type LONG in Programming Languages:

long: The long data type is a 64-bit signed two's complement integer. It has a minimum value of -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807 (inclusive). Use this data type when you need a range of values wider than those provided by int.

Then why all my long numbers in SF carry one digit decimal? this prevents me to send long values to my application since my app cannot implicitly cast numbers with decimal to long. is there any reason for this or SF dev's dont understand the definition of type "Long" ?
  • October 09, 2008
  • Like
  • 0
I am trying to generate Apex class from my WSDL file. WSDL gets parsed with no error but I get the following error in the last step of the process:

The following generated class(es) have compilation errors:

Error: webservicesCommerce

Error: unexpected token: void at 240:16


and the generated class at 240:16 is the start of the following function:

public void update(webservicesCommerce.Customer in0) {   //line 240
    webservicesCommerce.update_element request_x = new webservicesCommerce.update_element();
    webservicesCommerce.updateResponse_element response_x;
    request_x.in0 = in0;
    Map<String, webservicesCommerce.updateResponse_element> response_map_x = new Map<String, webservicesCommerce.updateResponse_element>();
    response_map_x.put('response_x', response_x);
    WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              '',
              'http://webservices.commerce.xxx.com',
              'update',
              'http://webservices.commerce.xxx.com',
              'updateResponse',
              'webservicesCommerce.updateResponse_element'}
            );
            response_x = response_map_x.get('response_x');
        }


so what could be wrong here? does this mean that we cannot have void functions in Apex? I have more functions that they dont return anything. any Idea?



Message Edited by Bms270 on 09-29-2008 04:06 PM
  • September 29, 2008
  • Like
  • 0
I am using a third-party webservice to get some data from the server and load the data to my page in salesforce. The third-party service needs authentication through SOAP header in each request, so I defined the SOAP header in the WSDL but dont know how I can include my custom Tokens in it. my custom tokens are:

<VendorToken xmlns="urn:commerce:vendor">
   <VendorId xmlns="urn:commerce:vendor">xxxx</VendorId>
</VendorToken>
<AuthenticationToken xmlns="urn:commerce:authentication">
   <Username xmlns="urn:commerce:authentication">xxxx</Username>
   <Password xmlns="urn:commerce:authentication">yyyy</Password>
</AuthenticationToken>

I dont know if I have to define this in my wsdl document or I can set the content of the header from the apex class that is generated from the wsdl. I appreciate your help.

Thanks.
  • September 22, 2008
  • Like
  • 0
In normal usage of webservices I can put soap header info into <soapenv:Header> in the xml request. Now I want to know how I can set those information when using the Apex class that is generated with my WSDL file.

  • September 19, 2008
  • Like
  • 0

Hi,

 

When our app makes a callout to an external webservice over SSL, we get the following Exception:

 

System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

 

 This doesn't happen with regular http callout. our certificate is NOT expired on the target server and everything seems to be normal. no alert or anything from the browser.

 any idea?

 

Thanks,

 

P.S We need to resolve this for security review.

 

 

 

 

 

 

Message Edited by Bms270 on 05-14-2009 07:17 PM
Message Edited by Bms270 on 05-14-2009 07:19 PM

Hi,

 

When our app makes a callout to an external webservice over SSL, we get the following Exception:

 

System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

 

 This doesn't happen with regular http callout. our certificate is NOT expired on the target server and everything seems to be normal. no alert or anything from the browser.

 any idea?

 

Thanks,

 

P.S We need to resolve this for security review.

 

 

 

 

 

 

Message Edited by Bms270 on 05-14-2009 07:17 PM
Message Edited by Bms270 on 05-14-2009 07:19 PM

I have a class which contains functions that are used to make webservice callouts only. I need to cover these functions in my test methods but "Run Test" fails after running the first function with the following message:

(Older API) Methods defined as TestMethod do not support Web service callouts, test skipped

 

(NEW API - 15) System.TypeException: Testmethods do not support webservice callouts.

 

in this scenario I need to know how I can obtain the required coverage (75%) on my Apex class.  is there anyway that I can ignore callouts but force the test method to continue? in my class more than 75% of the code is the functions that each make a callout to an external webservice. any Idea?
 

Thanks

 

P.S: I have searched the forum and this has been posted several times but no answer yet.

  • April 14, 2009
  • Like
  • 0

I have a class which contains functions that are used to make webservice callouts only. I need to cover these functions in my test methods but "Run Test" fails after running the first function with the following message:

(Older API) Methods defined as TestMethod do not support Web service callouts, test skipped

 

(NEW API - 15) System.TypeException: Testmethods do not support webservice callouts.

 

in this scenario I need to know how I can obtain the required coverage (75%) on my Apex class.  is there anyway that I can ignore callouts but force the test method to continue? in my class more than 75% of the code is the functions that each make a callout to an external webservice. any Idea?
 

Thanks

 

P.S: I have searched the forum and this has been posted several times but no answer yet.

  • April 14, 2009
  • Like
  • 0

Hi,

 

When I run my test method I get the following exception:

 

System.TypeException: Testmethods do not support webservice callouts.

 

this happens at the line that my code calls a webservice and from that point the test method doesnt cover any lines of code (even those lines that has nothing to do with webservices). Is there any workaround for this? I cant increase the coverage just because of this issue.

 

 

Any Idea?

 

Thanks.

  • April 13, 2009
  • Like
  • 0

Hi,

 

I need a trigger for when a "pricebookEntry" gets updated, being created or getting deleted. (on Insert, on update and on delete). I noticed "product2" triggers do not fire  on "pricebookEntry" changes. is there any way to handle this? 

 

 

Thanks

  • April 13, 2009
  • Like
  • 0
We have developed a Apex class which retrieves information from a external server where the response we get is sometimes more than 100000 charecters and the SFDC API is not able to handle it. We are using XML DOM for it. Can anyone suggest a solution to handle a response which is more than 100000 charecters ?
  • January 24, 2009
  • Like
  • 0
Please help.

I am trying to use the Google Spreadsheets API with a list feed. This works fine with a handful of rows.
 
However, with more than a handful of rows (approx 7 or 8), any other rows never get inserted/updated.
 
I think this might be because Apex will only make 10 callouts and just seems to 'stop working' without reporting any errors (I guess I use a couple of callouts to get the spreadsheet etc).
 
From the debug log:      Number of callouts: 10 out of 10 ******* CLOSE TO LIMIT
Is it the case that I can only make 10 callouts when working with a Google spreadsheet? If so, that's a pretty serious limitation.
 
I need to add a custom field to the "Contact" object which would hold Social Security number. since this is a sensitive info I want it to showup like a password field (<input type="password">) in the contact form. how this can be done?

Thanks,
Bijan

  • October 22, 2008
  • Like
  • 0
I am trying to generate Apex class from my WSDL file. WSDL gets parsed with no error but I get the following error in the last step of the process:

The following generated class(es) have compilation errors:

Error: webservicesCommerce

Error: unexpected token: void at 240:16


and the generated class at 240:16 is the start of the following function:

public void update(webservicesCommerce.Customer in0) {   //line 240
    webservicesCommerce.update_element request_x = new webservicesCommerce.update_element();
    webservicesCommerce.updateResponse_element response_x;
    request_x.in0 = in0;
    Map<String, webservicesCommerce.updateResponse_element> response_map_x = new Map<String, webservicesCommerce.updateResponse_element>();
    response_map_x.put('response_x', response_x);
    WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              '',
              'http://webservices.commerce.xxx.com',
              'update',
              'http://webservices.commerce.xxx.com',
              'updateResponse',
              'webservicesCommerce.updateResponse_element'}
            );
            response_x = response_map_x.get('response_x');
        }


so what could be wrong here? does this mean that we cannot have void functions in Apex? I have more functions that they dont return anything. any Idea?



Message Edited by Bms270 on 09-29-2008 04:06 PM
  • September 29, 2008
  • Like
  • 0
I am using a third-party webservice to get some data from the server and load the data to my page in salesforce. The third-party service needs authentication through SOAP header in each request, so I defined the SOAP header in the WSDL but dont know how I can include my custom Tokens in it. my custom tokens are:

<VendorToken xmlns="urn:commerce:vendor">
   <VendorId xmlns="urn:commerce:vendor">xxxx</VendorId>
</VendorToken>
<AuthenticationToken xmlns="urn:commerce:authentication">
   <Username xmlns="urn:commerce:authentication">xxxx</Username>
   <Password xmlns="urn:commerce:authentication">yyyy</Password>
</AuthenticationToken>

I dont know if I have to define this in my wsdl document or I can set the content of the header from the apex class that is generated from the wsdl. I appreciate your help.

Thanks.
  • September 22, 2008
  • Like
  • 0
In normal usage of webservices I can put soap header info into <soapenv:Header> in the xml request. Now I want to know how I can set those information when using the Apex class that is generated with my WSDL file.

  • September 19, 2008
  • Like
  • 0
Hi All,

Does anyone know what the API call limit is?  Also, is there a resource that I can print out that gives me=ore information regarding the API and what features are currently and not currently support?

Thanks.
Adam