• ChunWu
  • NEWBIE
  • 0 Points
  • Member since 2010

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

I have a trigger which invokes a 'future' method in an Apex class.

The method with 'future' annotation looks like the following:

 

@future (callout=true)
public static void updateDocument(Id claimId) {
    // do the web service callout
}

 Now if there is an exception thrown from this future method, it won't be caught by the calling trigger then no error message can be displayed to the end user. It looks like there is no error at all after 'Save'. But I still got email containing the exception and the debug log shows that the exception is thrown from the FutureHandler. How can I catch this exception in the trigger and display it on the page?

 

  • December 22, 2010
  • Like
  • 0

In my current development org, I add a custom link on an object which is defined in a managed package. Now I am trying to persist the metadata and then migrate this custom link to another org. According to Force.com Migration Tool Guide, <Type> element with value 'Weblink' should be manually specified in package.xml. It also says, 'this type is retrieved or deployed as part of a custom object file. You must dot-qualify the object name before the component name.'. I put it like the following code in package.xml but it is not grabbing any custom link metadata in the custom object as is expected. Any comments would be highly appreciated.

 

<types>
    <members>[packagePrefix.customObject__c].[customLinkName]</members>
    <name>Weblink</name>
</types>

 

 

  • December 14, 2010
  • Like
  • 0

Got the following error when invoking a web service callout by using the generated apex code from wsdl (wsdl2apex)

 

System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element Client

It seems that the generated code does not recognize the element <Client> in the response message. In the wsdl file there is no specific definition for this <Client> element. Instead, the schema defines a complex type containing the <any> element which is the XML representation for a wildcard schema component. So the response can have any arbitrary tags. But in the generated Apex class, it even has no corresponding field for the content starting from <Client> element (The ‘any' part). It seems that the wsdl2apex cannot handle this <any> element properly.

 

Has anyone come across the same issue? Any suggestions to work this around?

Thanks.

 

  • November 01, 2010
  • Like
  • 0

In my current development org, I add a custom link on an object which is defined in a managed package. Now I am trying to persist the metadata and then migrate this custom link to another org. According to Force.com Migration Tool Guide, <Type> element with value 'Weblink' should be manually specified in package.xml. It also says, 'this type is retrieved or deployed as part of a custom object file. You must dot-qualify the object name before the component name.'. I put it like the following code in package.xml but it is not grabbing any custom link metadata in the custom object as is expected. Any comments would be highly appreciated.

 

<types>
    <members>[packagePrefix.customObject__c].[customLinkName]</members>
    <name>Weblink</name>
</types>

 

 

  • December 14, 2010
  • Like
  • 0

Got the following error when invoking a web service callout by using the generated apex code from wsdl (wsdl2apex)

 

System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element Client

It seems that the generated code does not recognize the element <Client> in the response message. In the wsdl file there is no specific definition for this <Client> element. Instead, the schema defines a complex type containing the <any> element which is the XML representation for a wildcard schema component. So the response can have any arbitrary tags. But in the generated Apex class, it even has no corresponding field for the content starting from <Client> element (The ‘any' part). It seems that the wsdl2apex cannot handle this <any> element properly.

 

Has anyone come across the same issue? Any suggestions to work this around?

Thanks.

 

  • November 01, 2010
  • Like
  • 0