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






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

 

Our web partners: Inexpensive Web Hosting Java Web Hosting personal webspace webspace php  linux webhost

 html web templates DreamweaverQuality Web Templates PSD Web Templates

cheap webhost j2ee web Hosting buy webspace ftp webspace adult webspace

frontpage WebHosting webspace hosting cheap webhost

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

webhosting