• Enrico Maria Balatti
  • NEWBIE
  • 0 Points
  • Member since 2011
  • Senior Consultant
  • Telnext srl

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
Hi Community,

I am using the Continuation framework in order to  make asynchrous callout. In case of HTTP request callout all is fine.
I have a question when using the Continuation for imported WSDL callout (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_continuation_callout_soap.htm).

I need to identify possible issue on the communication, for example due to the Continuation Timeout that expire.
How I can into the response have the status code (e.g. 2000: The timeout was reached, and the server didn’t get a chance to respond.)

Currently when Continuation Timeout occour, the response method callback is triggered, the getValue() method rise an exception where I have just the following informations:

System.CalloutException: IO Exception: Time out.

Is there any way (not to parse the getMessage description) to get the Continuation error reason between the following?

When a problem occurs with the response, some possible status code values are:2000: The timeout was reached, and the server didn’t get a chance to respond.
2001: There was a connection failure.
2002: Exceptions occurred.
2003: The response hasn’t arrived (which also means that the Apex asynchronous callout framework hasn’t resumed).
2004: The response size is too large (greater than 1 MB).

BR
Enrico

 
Dear all,

I am using Continuation to manage asyncronous callouts.
I set the maximum timeout (limit si 120seconds).
Unfortunately one endpoint webservice is taking more time, so I receive a Timeout Exception.

I would like to know is there is a best practice to manage continuation timeout retry. I am thinking two possible alternative:

1. implement Continuation retyr on Visualforce Page (using actionFunction calls that retry basing on a controller variable that catch the timeout exceptions). I need to use Visuaforce logic because Continuation cannot be triggered from Apex directly
2. implement a custom asyncronous mechanism. So no more adopt continuation in this case but make the callout (store in a custom object record a transaction id) and than let the external system call me using that transaction id in order to handle the async callback

What is in you opinion the better way. There are other better alternatives?
BR
Enrico

Dear all,

 

I have the following situation:

- html Email signature  in the Personal Email User Settings

- Some Email Template (when in the body there is an Email Signature)

- Some email sent by apex code with SingleEmailMessage

 

What happens is that email sent by Apex with the Email Template are sent with both the Signature in the Email Template (and this is ok) and also the Signature of the Current logged in user (and this is NOT ok).

I think that when an email is sent with the TemplateId, the current user logged in Email signature should not be included in the sent email!

 

BR,
Enrico 

I would like if there is a Standard way into a visualforce page to show a big number/currency in a shorter form.

I mean for example to show 1000 as 1K or 1000000 as 1M.

 

 

 

If not, what is the best way to achieve that?

   - <apex:outputText  value="{0,number,......}   ">  ????

  - using an <apex:component

  - using a formula field (but i need to create a formaul fied for any currency/numnber field I have???

  - using a method in an apex class???

 

Thanks,
Enrico 

The example test case in Making an Asynchronous Callout from an Imported WSDL (https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_continuation_callout_soap.htm) doesn't work in practice.

Attempting to run tests using the pattern defined under Testing WSDL-Based Asynchronous Callouts gives the error:

<span unselectable="on" "="" style="display: block; padding: 3px 4px; overflow: hidden; margin-left: 0px; color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal; white-space: nowrap; background-color: rgb(218, 240, 249);">
Methods defined as TestMethod do not support Web service callouts, test skipped

Attempting to use Test.setMock(WebServiceMock.class, xyz); doesn't work as the respose Map<String, Object> parameter is null. Without populating the mock response you get a GACK:
 
Internal Salesforce Error: 104340792-768952 (-1841369010) (-1841369010)

There is a complete example using a basic WSDL in Asynchronous Callout from an Imported WSDL (http://salesforce.stackexchange.com/q/70259/102)

Hi,

 

Can anyone please help me regarding integration of lotus notes to salesforce.

 

Thanks

Vishal

  • September 24, 2013
  • Like
  • 0

Hi,

Am unable to refresh any of the resources in the IDE from the server.

When am trying to refresh a page from the web, getting an Exception saying:

 

 

Unable to refresh resource 'MileaeExension.cls':
com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

 

Unable to refresh resource 'MileaeExension.cls':


com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

 

Please assist to rectify the issue. 

 

Thanks in advance,

VNath