38. α
α
π
α
υπ
υα
α
α
π
α
α
α α ?
αφ
?
Method hiding
Method overriding
Η Η
The class method in Animal.
The instance method in Cat.
The instance method in Dog.
ά ε η2
Τ ή αΠ η φ
ή α Τη επ
ω
Α άπ υ η Λ γ
Χε ε
ά η 2013-2014
26
39. super
π
υ π
Χ
π
super
π υ
α
π
υ
υ
override,
α α
υ
α
α constructor.
Class ParentClass {
void methodA() {…}
}
Class ChildClass extends ParentCLass {
void methodA(){
super.methodA();
….}
}
Χ
ά ε η2
super
α
constructors
Η
super(<argument list>);
α π
απ
.
π
α
α
απ
π
α α α
super.
To run time π
α α
non-argument constructor (default constructor).
π
αα υ
constructors απ
πα
αφ
υ
υ Object constructor (constructor chaining).
α α
α
α
α απ
Object π
α
.
Τ ή αΠ η φ
ή α Τη επ
ω
Α άπ υ η Λ γ
Χε ε
ά η 2013-2014
27
94. XML Schema
Complex Type Elements:
Simple Type Elements:
Attributes:
Reference Elements:
ά ε η4
Τ
αΠ η φ
α Τη επ
ω
Α άπ υ η Λ γ
Χε ε
ά η 2ί13-2014
9
100. XML Binding (JAXB)
Η Java™Α χ
ο
γα
XML Binding (JAXB) πα
α
π
XML schemas
Java
α απα α
α
XML data
φα
Java.
Η JAXB πα
υ
α
αυ
α πα α
(unmarshal)
Java content trees απ XML
instance
αφα α α
φα
(marshal).
Η JAXB χ
π
α
υ υα
Java API for XML (JAX-WS) α
υ α Web Services
ά ε η4
Τ
αΠ η φ
α Τη επ
ω
Α άπ υ η Λ γ
Χε ε
ά η 2ί13-2014
15
101. Web Services
ά ε η4
Τ
αΠ η φ
α Τη επ
ω
Α άπ υ η Λ γ
Χε ε
ά η 2ί13-2014
16
108. Element
Defines
<types>
The data types used by the web service
<message>
The messages used by the web service
WSDL -
<portType>
The operations performed by the web service
<binding>
The communication protocols used by the web
service
<definitions>
<service>
The name and location of the web Service
<types>
definition of types........
</types>
<message>
definition of a message....
</message>
<portType>
definition of a port.......
</portType>
<binding>
definition of a binding....
</binding>
</definitions>
<message name="getTermRequest">
<part name="term" type="xs:string"/>
</message>
<message name="getTermResponse">
<part name="value" type="xs:string"/>
</message>
<portType name="glossaryTerms">
<operation name="getTerm">
<input message="getTermRequest"/>
<output message="getTermResponse"/>
</operation>
</portType>
http://www.w3schools.com/wsdl/default.asp
ά ε η4
Τ
αΠ η φ
α Τη επ
ω
Α άπ υ η Λ γ
Χε ε
ά η 2ί13-2014
23
109. WSDL Ports
One-way
Request-Response
<message name="newTermValues">
<part name="term" type="xs:string"/>
<part name="value" type="xs:string"/>
</message>
<portType name="glossaryTerms">
<operation name="setTerm">
<input name="newTerm"
message="newTermValues"/>
</operation>
</portType >
<message name="getTermRequest">
<part name="term" type="xs:string"/>
</message>
<message name="getTermResponse">
<part name="value" type="xs:string"/>
</message>
<portType name="glossaryTerms">
<operation name="getTerm">
<input message="getTermRequest"/>
<output message="getTermResponse"/>
</operation>
</portType>
Type
Definition
One-way
The operation can receive a message but will not return a response
Request-response
The operation can receive a request and will return a response
ά ε η7
Solicit-response
Τ
αΠ η φ
α Τη επ
ω ω
The operation can send a request and will wait for a response
Notification
The operation can send a message but will not wait for a response
Α άπ υ η Λ γ
Χε ε
ά η 2ί1ί-2011
110. WSDL Binding
binding element
name attribute: defines the name of the binding
type attribute: points to the port for the binding
soap:binding element
style attribute: can be "rpc" or "documentΠ
transport attribute: defines the SOAP protocol to use
operation element
a SOAP action for each operation
definition of the encoding for the input and output
<binding type="glossaryTerms" name="b1">
<soap:binding style="documentΠ transport="http://schemas.xmlsoap.org/soap/http" />
<operation>
<soap:operation soapAction="http://example.com/getTerm"/>
<input><soap:body use="literal"/></input>
<output><soap:body use="literal"/></output>
</operation>
</binding>
ά ε η4
Τ
αΠ η φ
α Τη επ
ω
Α άπ υ η Λ γ
Χε ε
ά η 2ί13-2014
111. WSDL Ν
α
α (1/3)
namespace
υ
web service
complex types π υ
α
π
απ
wsdl
Έ
ά ε η4
Τ
αΠ η φ
α Τη επ
ω
Α άπ υ η Λ γ
Χε ε
ά η 2ί13-2014
α