Java Reference
In-Depth Information
This class has four major operations (i.e., CRUD) on an employee record. Note that for each
operation, the service creates an EmployeeDao object to call the matching operation. The
call is then returned as the return of the operation of the service. Note that the marshalling
of the return object is accomplished with the assistance of the JAXB component in Java.
These four operations are simple. Each method calls the corresponding method provided by
EmployeeDao instance.
4.2.4.1.1 @WebService Annotation
@WebService annotation indicates that this class (or an interface) impelements a Web Ser-
vice. This annotation has six (6) optional elements that can be used for a more detailed
definition of a Web Service:
1.endpointInterface:the complete name of the service endpoint interface
2. name:the name of the <portType> element within the WSDL
3. portName: the name of the <port> element within the WSDL
4. serviceName:the name of the <service> element within the WSDL
5. targetNamespace: the targetNamespace attribute of the <definition>element
of the WSDL
6.
wsdlLocation:the content of the location attribute of the <soap:address>element
In this application, we did not include these optional elements. We will define the location
of the WSDL when we create an Endpoint within the server code (Server.java).
4.2.4.1.2 @SOAPBinding Annotation
This annotation specifies how to map a Web Service onto the SOAP message protocol.
These involve three optional elements:
1.
parameterStyle:This can be either BARE or WRAPPED.
2.
style:This can be either DOCUMENT or RPC
3.
use:This can be either LITERAL or ENCODED.
Search WWH ::




Custom Search