SOAPException
From Xojo Documentation
This item was deprecated in version 2019r2. |
Class (inherits from RuntimeException)
SOAPExceptions can be raised when using a WSDL to define your SOAP function. If the method name does not exist or the parameters passed do not match the WSDL specifications, a SOAPException runtime error will be raised.
Properties | |||
|
Methods | ||
|
Sample Code
This example raises an exception of type SOAPException because the method name "ValidEmail" does not exist in the WSDL. The method should be "isValidEmail". A SOAPException can also be raised by passing in an incorrect number of parameters.
Var sm As SOAPMethod
// create new method and load WSDL document from URL
sm = New SOAPMethod("http://www.webservicex.net/ValidateEmail.asmx?WSDL")
// execute and display function result
MessageBox(sm.validEmail("bob@hotmail.com"))
// catch exceptions
Exception e As SOAPException
MessageBox("SOAP Error: " + e.Message)
// create new method and load WSDL document from URL
sm = New SOAPMethod("http://www.webservicex.net/ValidateEmail.asmx?WSDL")
// execute and display function result
MessageBox(sm.validEmail("bob@hotmail.com"))
// catch exceptions
Exception e As SOAPException
MessageBox("SOAP Error: " + e.Message)
See Also
RuntimeException, SOAPMethod, SOAPResult classes; Exception, Try statements.