78
Designing a Service's Interaction Layer
...
Code Example 3.5
Generated WSDL for 
WeatherService
 Interface
Notice that the WSDL represents the 
getWeather
 overloaded methods as two
different SOAP messages, naming one 
getWeather
, which takes an integer for the
zip code as its parameter, and the other 
getWeather2
, which takes a string parame 
ter for the city. As a result, a client interested in obtaining weather information
using a city name invokes the service by calling 
getWeather2
, as shown in Code
Example 3.6.
...
Context ic = new InitialContext();
WeatherWebService weatherSvc = (WeatherWebService)
ic.lookup("java:comp/env/service/WeatherService");
WeatherServiceIntf port = (WeatherServiceIntf)
weatherSvc.getPort(WeatherServiceIntf.class);
String returnValue = port.getWeather2("San Francisco");
...
Code Example 3.6
Using Weather Service Interface with Java to WSDL Approach
<





New Page 1








Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

 

Our web partners:  Jsp Web Hosting  Unlimited Web Hosting  Cheapest Web Hosting  Java Web Hosting  Web Templates  Best Web Templates  Web Design Templates  Interland Web Hosting  Cheap Web Hosting  Filemaker Web Hosting  Tomcat Web Hosting  Quality Web Hosting  Best Web Hosting  Mac Web Hosting

 
 

Virtualwebstudio. Business web hosting division of Vision Web Hosting Inc. All rights reserved

Web Hosting Apache