Professional Documents
Culture Documents
"Incubate, Nurture and Deploy Technology Experts Innovate, Build and Deliver Technology Solutions
TPG Confidential
Introduction
Business Unit Group Practice Sub-Practices Initiative Competency Level Experience Level Pre-Requisite Version Author Total number of slides Duration of learning BFSI Technology Practices Group Java Practice Java CoE technologies Competency Framework
1.0 Java TPG 92 4 TPG Confidential Hours including coding and exercise2
Agenda
SOA Introduction & Architecture Web Services Introduction & Architecture Web Services Type Introduction to SOAP Introduction to WSDL
Introduction to UDDI
Introduction to Java WS
SOA - Definition
The policies, practices and frameworks
SOA Defined..
a service?
service orientation? A way of integrating your business as linked services and the outcomes that they bring
A repeatable business task e.g., check customer credit; open new account
a composite application?
A set of related & integrated services that support a business process built on an SOA
More
First Order Concept: Services are an independent, first order concept Loosely Coupled: Abstracted: Services are independent of a specific software implementation Platform Independent: Services are delivered in a platform independent technology Designed and built for Agility: Services should incorporate agility into their design, not just use loosely coupled technology. Articulating: Services should be designed as points of flexibility across functional boundaries and technology layers Meaningful: Services should be delivered at a level of granularity and abstraction that is meaningful to the service consumer. Contract-Based: Services should use a design by contract approach to ensure that all participants are aware of their precise obligations when providing or consuming the Service Standards-Based: Services should comply with appropriate standards for both technology and business domains Discoverable: Services should be published in a manner by which they can be discovered and consumed without intervention of the provider
Federation: The SOA is a collaboration of independent components, that provide services according to contractual obligations Traceability: Service should be visible throughout life cycle, from business perspective to deployed software service Alignment of Business and IT: The SOP should ensure clear alignment and mapping between the business service, and the software service Evolutionary: SOP should be an agile process that facilitates continuous change Managed: Services should be managed as an asset throughout the service life cycle Application Neutral: The concept of SOP and SOA is applicable to all classes of interoperability
Contracted interfaces to software functionality and data that communicate via messages Technically, a Service interface
Characteristics of Services
Services are loosely coupled making a change to a Service provider does not mandate changing any Service consumers. Business processes are composed of Services, and are in turn exposed as Services. Services are policy-driven business users can change how a Service behaves. Systems are inherently integrated by virtue of composable Services not through layers of middleware. Services leverage legacy systems SOA does not mandate replacement of runtime infrastructure, but enable migration when needed. In SOA, metadata control how the system behaves instead of code business logic trumps application logic. In SOA, its the contracted interface that matters, not the underlying runtime environment.
Architectural Scope
Some architecture is always required Focus shifts to the interfaces as scope increases How do the parts connect Role of the architect depends on scope Am I designing the building? Only care about my building External interfaces are a given cant change Or the city plan? What should the interfaces be? Need wide agreement Dont design every single building
Architecture Layers
Business Process Layer Cross Functional End-toend Sales Order Process Service Layer How do you connect sales to customers?
Customer
Dir
Siebel
Application Layer Applications, Components, Software How do you connect SAP to Siebel? Technology Layer Hardware, Network How do you connect J2EE to .NET?
Linux
MQ OS/390
.NET
J2EE
Unix
DB2
Services are an independent, first order concept A Service provides a view of a functional capability that is consistent across many use cases. The Service view is common to business requirements, design, deployment, assets and configured resources. A software Service might be related to a functional interface, but should not be taken as a synonym for interface. This applies to both the Business Service and Software Service. This enables: Improved alignment of business to software Service in comparison to mapping to functional interfaces A more abstract view to be taken of the service Complex mappings of software service to functional interface (e.g. many to many) Service treatment as an asset and resource
Types of Service
Business Product Supports Business Process
Business Service
Business
Implements Application Software Service
Executes
Deployment
Software Service
Business
Implements Application Register Journey
Service Management
Service Providers Who is allowed in? Am I meeting Service Level Agreements? Who will get the bill? How do we route requests to different implementations Service Consumers Who used the service? Are Service Level Agreements being met? Which budget holder will pay? How do we route requests to different Service Providers The problem is the same and the solution should be symmetrical
Consuming Application Consuming Application Consuming Application Web Service Service Implementation Services Manager Service Implementation Service Implementation
C O N S U M E R
Services Manager
Web Service
Web Service
P R O V I D E R
Service Intermediary
Service Provider
Service Request
Service
Sales System
Addressing
J2EE
Secure,
.NET
Business
Publication
UDDI
WSDL SOAP XML
Summary
SOA is more than Web Services Service is the important concept, not Web Service SOA is not just a wiring diagram Services AND Components are required to fully deliver IT and Business Agility Component Based Service Engineering (CBSE) Service Orientation A set of principles and policies An approach Consider Service across the whole lifecycle, not just deployment Follow the Principles of Service Orientation Comprehend Agility at all stages Analysis, Design, Build, Deployment
Introduction to SOAP
Introduction to SOAP
SOAP SOAP SOAP SOAP SOAP SOAP SOAP SOAP SOAP SOAP SOAP stands for Simple Object Access Protocol is a communication protocol is for communication between applications is a format for sending messages is designed to communicate via Internet is platform independent is language independent is based on XML is simple and extensible allows you to get around firewalls will be developed as a W3C standard
Why SOAP? Today's applications communicate using Remote Procedure Calls (RPC) between objects like DCOM and CORBA, but HTTP was not designed for this. RPC represents a compatibility and security problem; firewalls and proxy servers will normally block this kind of traffic. A better way to communicate between applications is over HTTP, because HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this. SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.
1. 2. 3. 4.
A SOAP client formats a message in XML including a SOAP envelope element describing the message The client sends the message to a SOAP server in the body of an HTTP request The server determines whether the message is valid and supported The server formats its response in XML and sends it to the client in the body of an HTTP response
Syntax Rules
Here are some important syntax rules:
A A A A A
MUST be encoded using XML MUST use the SOAP Envelope namespace MUST use the SOAP Encoding namespace must NOT contain a DTD reference must NOT contain XML Processing Instructions
Envelope (required) Contains Header and Body Defines namespaces (optional) Declares encoding rules (optional) Header (optional) Contains metadata entries about message a la HTTP headers Specifies which entries must be understood and by which target actor in chain of recipients
Body (required) Contains application-specific message May be encoded variously Fault element (optional) Contained in Body Describes error class (version mismatch, headers not understood, client error, server error) Extensible, hierarchical fault codes, e.g. Server.Availability.NotAvailable
body
The Header is optional SOAP specializations for RPC require using the body to pass parameters and results (well get to that later) Otherwise, no reason The SOAP spec notes that a body entry is semantically-equivalent to an optional header entry (with mustUnderstand = 0)
SOAP permits arbitrary encoding styles and defines a default encoding style Based on XML-Schema Supports data types All built-in XML-Schema types (e.g. string, float, integer, date, IDREF) Derived types: enumerations, arrays, structs, generic compound types
Typed elements are called accessors Accessor types are specified in externally-referenced XML-Schema definitions Or with the xsi:type attribute, e.g. <a:uid xsi:type=xsd:integer> 4737 </a:uid>
Values can be used in multiple places using references <e:Book> <title>My Life</title> <author href="#Person-1"/> </e:Book> <e:Person id="Person-1"> <name>Henry Ford</name> </e:Person> Including refs to external resources
Methods are invoked by making a SOAP request to a URI representing the target object Method calls are represented in the Body by a struct named after the method Struct members represent in/out parameters to the method The method result is encoded similarly and returned in a SOAP response Errors are signaled with the Fault entry
Supports card catalog search and checkout Target objects / methods Catalog / search Circulation / checkout, return Security Authentication: patron ID Fault: unrecognized user
Catalog Represented by a URI, e.g. http://www.lib.org/catalog/ Supports one method: Search Find items which match a particular query Result: list of entries containing information about items Fault condition: malformed query
POST /catalog/ HTTP/1.1 Content-type: text/xml <SOAP-ENV:Envelope> <SOAP-ENV:Body> <lib:Search> <author>Kafka</author> </lib:Search> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
HTTP/1.1 200 OK Content-type: text/xml <SOAP-ENV:Envelope> <SOAP-ENV:Body> <lib:SearchResponse> <lib:Item> <callNo>473.57</callNo> </lib:Item>
Introduction to WSDL
What is WSDL?
Web Service Description Language WSDL is a document written in XML The document describes a Web service Specifies the location of the service and the methods the service exposes
Why WSDL
Without WSDL, calling syntax must be determined from documentation that must be provided, or from examining wire messages With WSDL, the generation of proxies for Web services is automated in a truly language- and platform-independent way
SOAP is the envelope containing the message WSDL describes the service UDDI is a listing of web services described by WSDL
Document Structure
Written in XML Two types of sections Abstract and Concrete Abstract sections define SOAP messages in a platform- and languageindependent manner Site-specific matters such as serialization are relegated to the Concrete sections Abstract sections Types: Machine- and language-independent type definitions. Messages: Contains function parameters (inputs are separate from outputs) or document descriptions. PortTypes: Refers to message definitions in Messages section that describe function signatures (operation name, input parameters, output parameters). Concrete Descriptions Bindings: Specifies binding(s) of each operation in the PortTypes section. Services: Specifies port address(es) of each binding. Operations An operation is similar to a function in a high level programming language A message exchange is also referred to as an operation Operations are the focal point of interacting with the service
Big Picture
An Example
<?xml version="1.0" encoding="UTF-8" ?> This first line declares the document as an XML document. Not required, but helps the XML parser determine whether to parse the file or signal an error
Types Section
The type element defines the data types that are used by the web service.
<xsd:complexType name="PERSON"> <xsd:sequence> <xsd:element name="firstName type="xsd:string"/> <xsd:element name="lastName" type="xsd:string"/> <xsd:element name="ageInYears" type="xsd:int"/> </xsd:sequence> </xsd:complexType>
Messages Section
A message element defines parameters The name of an output message element ends in "Response" by convention
<message name="Simple.foo"> <part name="arg" type="xsd:int"/> </message> <message name="Simple.fooResponse"> <part name="result" type="xsd:int"/> </message>
PortTypes Section
Defines a web service, the operations that can be performed, and the messages that are involved.
<portType name="SimplePortType"> <operation name="foo" parameterOrder="arg" > <input message="wsdlns:Simple.foo"/> <outputmessage="wsdlns:Simple.fooResponse"/> </operation> </portType>
Bindings Section
The binding element defines the message format and protocol details for each port.
<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetLastTradePrice"> <soap:operation soapAction="http://example.com/GetLastTradePrice"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding>
Each <port> element associates a location with a <binding> in a one-to-one fashion <port name="fooSamplePort" binding="fooSampleBinding"> <soap:address location="http://carlos:8080/fooService/foo.asp"/> </port>
Services Section
A collection of related endpoints, where an endpoint is defined as a combination of a binding and an address
<service name="FOOSAMPLEService"> <port name="SimplePort binding="wsdlns:SimpleBinding"> <soap:address location="http://carlos:8080/FooSample/ FooSample.asp"/> </port> </service>
Namespaces
The purpose of namespaces is to avoid naming conflicts. Imagine two complimentary web services, named A and B, each with an element named foo. Each instance of foo can be referenced as A:foo and B:foo Example: "xmlns:xsd" defines a shorthand (xsd) for the namespace See http://www.w3.org/2001/XMLSchema.
WSDL: Example
<?xml version="1.0" encoding="UTF-8"?> <definitions name ="DayOfWeek" namespace="http://www.roguewave.com/soapworx/examples" targetNamespace="http://www.roguewave.com/soapworx/examples/DayOf Week.wsdl" xmlns:tns="http://www.roguewave.com/soapworx/examples/DayOfWeek.w sdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/"> <message name="DayOfWeekInput"> <part name="date" type="xsd:date"/> </message> <message name="DayOfWeekResponse"> <part name="dayOfWeek" type="xsd:string"/> </message> <portType name="DayOfWeekPortType"> <operation name="GetDayOfWeek"> <input message="tns:DayOfWeekInput"/> <output message="tns:DayOfWeekResponse"/> </operation> </portType> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <service name="DayOfWeekService" > <documentation> Returns the day-of-week name for a given date </documentation> <port name="DayOfWeekPort" binding="tns:DayOfWeekBinding"> <soap:address location="http://localhost:8090/dayofweek/DayOfWeek"/> </port> </service> </definitions> <output> <soap:body use="encoded"
<binding name="DayOfWeekBinding" type="tns:DayOfWeekPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetDayOfWeek"> <soap:operation soapAction="getdayofweek"/> <input> <soap:body use="encoded" namespace="http://www.roguewave.com/soapworx/examples" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input>
Sample WSDL file Describes port type, binding, input, output, Service name and URL
Introduction to UDDI
UDDI is a open, cross-industry effort driven by major platform and software providers, as well as marketplace operators and e-business leaders within the OASIS standard consortium It defines a standard method for publishing and discovering the network-based software components of a service-oriented architecture UDDI creates a standard interoperable platform that enables companies and applications to quickly, easily and dynamically find and use Web services over the Internet
The UDDI protocol is another XML-based building block of the Web services stack along with SOAP (standard for invoking remote operations) and WSDL (standard for specifying what these operations look like) UDDI supplies an infrastructure for systematically addressing needs such as discovery, manageability and security of Web services beyond what is the simple organization of their interactions By addressing integration, coordination and flexibility issues of service-oriented systems, UDDI plays an important role within the service-oriented approach to enterprise software design
In some cases it may be that the information that are necessary to access Web services are known and thus directly stored within the applications that use them Nonetheless it is possible that the definitions and descriptions of such services (WSDL) are published to be discovered on ad hoc on-line registries UDDI defines how these registry should be designed and how to use them to describe, publish and discover services on a network Rather than forcing applications to include information about an external service's application programming interfaces, UDDI registry provide this binding information dynamically, at run-time UDDI guarantees flexibility with respect both to the dynamic run-time changes that occur during the life-cycle of web services and to the evolution of web application requirements
By adopting UDDI, it turns out that convenience for developers, requirements of enterprise architects, and underlying business policies are not in opposition UDDI facilitates Web services software development by providing systematic, interoperable, standards-based: Management of the development process of web services Approach for documenting and publishing web services Organizations and managing of web services across multiple systems and development teams Documenting interface specification through teams and through time and for external applications above all in case of change UDDI help drive better code reuse and developer productivity (can help developers - across groups - find a shared service and use that service within their own applications)
UDDI facilitates Service-Oriented Infrastructure: Insulates critical applications from changes or failures in backend services: Provides a formal layer of indirection (almost a firewall) necessary for service-oriented application development and management, useful for accommodating changes in the life cycle of specific components (updates, policy considerations, service termination) Helps an organization share information about services in a controlled way that reflects its own business rules and policies: Client authentication and publish/subscribe for peer registries satisfy operational governance needs as control of the publication and distribution of information about deployed services according to business policies Solutions are not hard-coded but takes advantage of run-time binding
The UDDI Project enables businesses to: Discover each other Define how they interact over the internet and share information in a global registry architecture Enact policy-based distribution and management of enterprise web services The UDDI project is not industry specific Any industry, of any size, worldwide, offering products and services can benefit from this open initiative because the specifications comprehensively addresses problems that limit the growth and synergies of B2B commerce and Web services. Before the UDDI project, there was no industry-wide approach for business to reach their customers and partners with information about their products and Web services, nor there was a method of how to integrate into each other's systems and processes. UDDI is the building block that enables businesses to quickly, easily and dynamically find and transact with one another via their preferred applications.
Problems solved: Makes it possible for organizations to quickly discover the right business from millions currently on line Defines how to enable commerce to be conducted once the preferred business is discovered Immediate benefits for businesses: Reaching new customers Expanding offerings Extending market reach Increasing access to current customers Solving customer-driven need to remove barriers to allow for rapid participation in the global Internet economy Describing their services and business processes programmatically in a single, open and secure environment Using a set of protocols that enables businesses to invoke services over the internet to provide additional value to their preferred customers
UDDI Features
UDDI is similar to the concepts of DNS and yellow pages In short, UDDI provides an approach to: Locate a service Invoke a service Manage metadata about a service UDDI specifies: Protocols for accessing a registry for Web services Methods for controlling access to the registry Mechanism for distributing or delegating records to other registries
UDDI Specifications
UDDI defines: SOAP APIs that applications use to query and to publish information to a UDDI registry XML Schema schemata of the registry data model and the SOAP messages format WSDL definitions of the SOAP APIs UDDI registry definitions (technical model - tModels) of various identifier and category systems that may be used to identify and categorize UDDI registrations The UDDI Specifications Technical Committee also develops Technical Notes and Best Practice documents that aid users in deploying and using UDDI registries effectively
The UDDI specifications define a registry service for Web services and for other electronic and non-electronic services A UDDI registry service is a Web service that support the description and discovery of service providers, service implementations, and service metadata UDDI is a meta service for locating web services by enabling robust queries against rich metadata. Service providers can use UDDI to advertise the services they offer Service consumer can use UDDI to discover services that suites their requirements and to obtain the service metadata needed to consume those services.
UDDI Registry
Functional purpose: representation of data and metadata about Web services Either for use on a public network or within on organizational internal infrastructure Offers standards-based mechanism to classify, catalog and manage Web services so that they can be discovered and consumed by other applications Implements generalized strategy of indirection amongst services based applications Offers benefits to IT managers both at design and run-time, including code reuse and improving infrastructure management
UDDI allows operational registries to be maintained for different purposes in different contexts A business may deploy one or more: Private registries: Isolated from the public network, firewalled Restricted access No shared data Public registries: Unrestricted open and public access Data is shared with other registries Affiliated registries Controlled environment Access limited to authorized clients Data shared in a controlled manner Private registry supports intranet applications, while a public registry support extranet applications Affiliated registries supports all other infrastructural topologies e.g., involving delegation, distribution, replication, subscription, that reflects the realities and the relationship of the underlying business processes
The core information model of UDDI registries is made of several data structures: businessEntity (info about the organization that published the service) businessService (description of a service business function) bindingTemplate (services technical details, including a reference to the API) tModel (attributes or metadata about the service such as taxonomies, transports, digital signatures) publisherAssertions (relationship among entities in the registry, v2.0) Subscription (standing request to track changes to a list of entities) Each data structure within a given registry is assigned a unique UDDI key UDDI allows users to specify different taxonomies for providing semantic structure to the information about Web services contained in a registry
UDDI Servers
UDDI specifies hierarchical relationship between a single instance of a UDDI implementation and others to which it is related UDDI Servers can be: Nodes: supports a minimum set of functionalities of the specification (they are member of exactly one registry) Registry: composed of one or more nodes; supports the complete set of functionalities of the specification Affiliated registry: registry that implements a policy-based sharing of information together with other affiliated registry Registry Affiliation is the main achievement of UDDI V3.0 Recognition that UDDI is to support the design and operations of myriads software applications within and among business organizations (not only private/public registries)
UDDI API
Features that supports core data management: Publishing information about a service to a registry Searching a UDDI registry for information about a service Features that supports registry interaction: Replicating and transferring custody of data about a service Registration key generation and management Registration subscription API set Security and authorization These are divided in Node API Sets (for UDDI Servers) and Client API Sets (for UDDI Clients)
UDDI Solutions
Several categories of product and components UDDI Registry Server, UDDI-enabled IDEs and development tools, Java and .NET client toolkits and browsers, UDDIintegrated Web services platforms Supplied by multiple vendors, consortia and also available as open source Apache.org, BEA, IBM, Microsoft, Oracle, SAP, Sun, Systinet, UDDI4J.org jUDDI is an open sourceJava based implementation of a UDDI v2 registry and a toolkit UDDI4J is a Java class library that provides an API to interact with a UDDI registry Java Web Service Developer Pack by Sun Web Application Server by SAP Webshpere UDDI Registry by IBM
Part of Java EE. New in Java SE 6. API stack for web services. Replaces JAX-RPC. New APIs: JAX-WS, SAAJ, Web Service metadata New packages: javax.xml.ws, javax.xml.soap,javax.jws
Software required.
Application Server Sun Java System Application Server Platform Edition 8.1 2005Q2 UR2 may be used as the build and runtime environment. The Application Server and J2SE SDK are contained in the J2EE 1.4 SDK. you can download the Application Server from: http://java.sun.com/j2ee/1.4/download.html#sdk
What is JAX-WS
JAX-WS stands for Java API for XML Web Services. JAX-WS is a technology for building web services and clients that communicate using XML. JAX-WS allows developers to write message-oriented as well as RPCoriented web services. In JAX-WS, a remote procedure call is represented by an XML-based protocol such as SOAP. The SOAP specification defines the envelope structure, encoding rules, and conventions for representing remote procedure calls and responses. These calls and responses are transmitted as SOAP messages (XML files) over HTTP.
Invocation Proxies Represent Web Services in Java Interface to Messaging System (HTTP) QoS (Handlers) Marshalling (Impedance Matcher) Java/XML Binding Deployment Implement Web Service Endpoints (SOAP, REST) with Java
Invocation
param param
param
param
param
return
Response : SOAP
Response : SOAP
return
SOAP Endpoint
Java Interface
WSDL Interface
package com.soabook; import com.soabook.sales.Customer; import com.soabook.purchasing.PurchaseOrder; public interface PurchaseTransactions { public void newPurchase (Customer cust, PurchaseOrder po); ... }
Deployment
WSDL +someOperation()
Endpoint Listener
-url WSDL Deployment WSDL/Java Mapping SOAP Handlers
Java Target
+someMethod() Binding Context Container Deployment Descriptors
Business methods that are exposed to web service clients must be annotated with javax.jws.WebMethod.
Business methods that are exposed to web service clients must have JAX-B-compatible parameters and return types. See Default Data Type Bindings.
@WebService() public class Hello { private String message = new String("Hello, ");
public void Hello() {} @WebMethod() public String sayHello(String name) { return message + name + "."; } }
In this example, the implementation class, Hello, is annotated as a web service endpoint using the @WebService annotation. Hello declares a single method named sayHello, annotated with the @WebMethod annotation. @WebMethod exposes the annotated method to web service clients. sayHello returns a greeting to the client, using the name passed to sayHello to compose the greeting. The implementation class also must define a default, public, no-argument constructor
compile-service
The compile-service Task Thisasant task compiles Hello.java, writing the class files to the build subdirectory. It then calls the wsgen tool to generate JAX-WS portable artifacts used by the web service. The equivalent command-line command is as follows: wsgen -d build -s build -classpath build helloservice.endpoint.Hello The -d flag specifies the output location of generated class files. The -s flag specifies the output location of generated source files. The -classpath flag specifies the location of the input files, in this case the endpoint implmentation class, helloservice.endpoint.Hello.
You
Upon
deployment, the Application Server and the JAX-WS runtime generate any additional artifacts required for web service invocation, including the WSDL file.
In a terminal window, go to <INSTALL>/javaeetutorial5/examples/jaxws/helloservice/. Run asant create-war. Make sure the Application Server is started. Set your admin username and password in <INSTALL>/javaeetutorial5/examples/common/build.properties. Run asant deploy. You can view the WSDL file of the deployed service by requesting the URL http://localhost:8080/helloservice/hello?wsdl in a web browser. Now you are ready to create a client that accesses this service.
asant undeploy
Open the Admin Console by opening the following URL in a web browser: http://localhost:4848/
Enter the admin username and password to log in to the Admin Console. Click Web Services in the left pane of the Admin Console. Click Hello. Click Test. Under Methods, enter a name as the parameter to the sayHello method. Click the sayHello button. This will take you to the sayHello Method invocation page.
Under Method returned, you'll see the response from the endpoint.
Uses the javax.xml.ws.WebServiceRef annotation to declare a reference to a web service. WebServiceRef uses the wsdlLocation element to specify the URI of the deployed service's WSDL file. @WebServiceRef(wsdlLocation="http://localhost:8080/ helloservice/hello?wsdl") static HelloService service;
Retrieves a proxy to the service, also known as a port, by invoking getHelloPort on the service. Hello port = service.getHelloPort(); The port implements the SEI defined by the service. Invokes the port's sayHello method, passing to the service a name. String response = port.sayHello(name);
Building and Running the Client To build the client, you must first have deployed HelloServiceApp, as described in "Packaging and Deploying the Service with asant." Then navigate to <JAVA_EE_HOME>/examples/jaxws/simpleclient/ and do the following:
asant build
asant run
Thank You