Handling SOAP Errors

1

I'm consuming a webservice method via ExternalObject (imported from "WSDL Import").

In practice, the invocation takes the Id as a parameter and the service returns the corresponding file name:

&NomeArquivo = getDocumentName(&DocumentId)

What happens is that when the & DocumentId does not exist, the application returns an error for the output window:

  

The remote server returned an error: (500) Internal Server Error.SOAP Fault: Error in server execution.   Message: pt.xxx.ContentServerException: DOCUMENT_NOT_FOUND: Document not found: 5722 Detail: xxxx   at GeneXus.Programs.SdtContentServicesV2.getdocumentfile (Int32 gxTp_documentId, String gxTp_revisionName)   at GeneXus.Programs.acarregatodosfile.executePrivate ()   at GeneXus.Programs.acarregatodosfilename.Main (String [] args)   Execution Failed **

I wanted to (1) put this error in a table and (2) that execution would not be interrupted. Can you do that?

    
asked by anonymous 31.07.2014 / 11:50

1 answer

3

Using the property CancelOnError. This property is used to indicate how errors will be handled when calling a GeneXus object through SOAP and invoking a Web Service imported with GeneXus WSDL Inspector.

Learn more at link

    
31.07.2014 / 13:15