Question: 1. Using the example of Listing 4.6 create a Web Service that returns Hello World . Create a client using Listing 4.7 as an example.
1. Using the example of Listing 4.6 create a Web Service that returns "Hello World" . Create a client using Listing 4.7 as an example. Submit the codes when your client invokes your Hello World Service when clicked.
Listing 4.6 example:
'http://server/namespace', 'location' => 'http://swe.umbc.edu/~pcomitz/programs/wk4/soapserver.php', ); $server = new SoapServer(null, $options); $server->setObject(new MyService()); $server->handle(); ?>
Listing 4.7 example:
'http://server/namespace', 'location' => 'http://swe.umbc.edu/~pcomitz/programs/wk4/soapserver.php', ); $client = new SOAPClient(null, $options); echo $client->add(10, 10); ?>
2. Continue with the example of Listing 4.6. Modify the service so that it includes subtract, multiply, and divide methods.
3. Create a php form with radio buttons for add, subtract, multiply, and divide. You should also have inputs for two numbers. Your should invoke the appropriate method based on the radio button that is selected (you do not need to validate the input) . Display the result.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
