Skip to main content


Exercise 1: Modify the SaveContact method in SOAPTutorial.SOAPService so that it generates a SOAP Fault if it cannot save the Contact instance.

Exercise 2: Add a class method named DemoSave to the ContactApplication.SOAPServiceSoap class. The method should satisfy the following requirements:

  • It uses the SOAPTutorial.SOAPService SaveContact method to save a Contact instance — using the ContactApplication.SOAPServiceSoap SaveContact method as a proxy.

  • It traps any SOAP Faults generated by the SOAPTutorial.SOAPService SaveContact method.

Use the Terminal to test the error generating and trapping code written in exercises 1 and 2. First, create a ContactApplication.s0.Contact object. Do not assign a value to the object's Name property. Then, use the ContactApplication.SOAPServiceSoap DemoSave method to attempt to save the object.

FeedbackOpens in a new tab