Java WS-Addressing: A Comprehensive Guide - Quiz
Total: 61 questions
1. What the WS-Addressing specification is used for?
2. Primary concepts of WS-Addressing.
3. Describe Endpoint references concept.
4. Describe Message addressing properties concept.
5. How to enable WS-Addressing?
6. Which tasks can be performed by using JAX-WS 2.1 annotations and feature classes?
7. Is WS-Addressing support disabled by default for web service clients?
8. Is WS-Addressing support enabled by default for web service providers?
9. Additional features of the JAX-WS enhancements?
Additional features of the JAX-WS enhancements?
a) Java representations of WS-Addressing endpoint references.
b) It is possible to create Java endpoint reference instances for the application endpoint, at run time.
c) It is possible to create Java endpoint reference instances for endpoints in other applications by specifying the URI of the endpoint reference.
d) It is possible to use annotations to specify whether WS-Addressing support is enabled and required on services or clients.
e) It is possible to configure client proxy or dispatch objects by using endpoint references.
f) Java support for endpoint references that represent WS-Resource instances.
g) Reference parameters can be associated with an endpoint reference at the time of its creation to correlate it with a particular resource instance.
h) It is possible to extract the reference parameters of an incoming message in targeted web services, so that the web service can route the message to the appropriate WS-Resource instance.
10. Which annotation does specify the use of WS-Addressing with the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding?
11. Can @Addressing annotation be used with other then SOAP 1.1/HTTP or SOAP 1.2/HTTP binding?
12. Which annotations are used in with @Addressing?
13. If @Addressing is used with a @WebService, where this annotation should be placed?
14. If @Addressing is used with a @WebServiceRef, when this annotation can be used?
15. Parameters of @Addressing.
16. What @Addressing.enabled is used for?
17. Default value of @Addressing.enabled?
18. What @Addressing.required is used for?
19. Default value of @Addressing.required?
20. What @Addressing.responses is used for?
21. Possible values of @Addressing.responses?
22. Default value of @Addressing.responses.
23. Example of using @Addressing with @Action.
24. Example of portType and binding sections of wsdl with @Action.
Example of portType and binding sections of wsdl with @Action.
<portType name="ExamWS">
<operation name="addExam">
<input wsaw:Action="http://addExam.com/input" message="tns:addExam"/>
<output wsaw:Action="http://addExam.com/output" message="tns:addExamResponse"/>
</operation>
</portType>
...
<binding name="ExamWSPortBinding" type="tns:ExamWS">
<wsaw:UsingAddressing/>
...
</binding>
25. Which element in the binding section signifies that it is set up for WS-Addressing?
Which element in the binding section signifies that it is set up for WS-Addressing?
<wsaw:UsingAddressing/>
26. What @Action annotation is used for?
27. How to create WS-Addressing-compliant SOAP faults?
28. If endpoint is using addressing, should it be indicated in WSDL? In which section?
29. Write WSDL(Addressing section) for this example:
@WebService()
@Addressing
public class ExamWS {}
Write WSDL(Addressing section) for this example:
@WebService()
@Addressing
public class ExamWS {}<wsam:Addressing wsp:Optional="true">
<wsp:Policy/>
</wsam:Addressing>
30. Write WSDL (Addressing section) for this example:
@WebService()
@Addressing(required = true)
public class ExamWS {...}
Write WSDL (Addressing section) for this example:
@WebService()
@Addressing(required = true)
public class ExamWS {...}<wsam:Addressing>
<wsp:Policy/>
</wsam:Addressing>
31. Write WSDL (Addressing section) for this example:
@WebService()
@Addressing(responses = Responses.NON_ANONYMOUS)
public class ExamWS {...}
Write WSDL (Addressing section) for this example:
@WebService()
@Addressing(responses = Responses.NON_ANONYMOUS)
public class ExamWS {...}<wsam:Addressing wsp:Optional="true">
<wsp:Policy>
<wsam:NonAnonymousResponses/>
</wsp:Policy>
</wsam:Addressing>
32. Example of specifying Addressing in webservices.xml.
Example of specifying Addressing in webservices.xml.
<xsd:element name="addressing"
type="javaee:addressingType"
minOccurs="0"
maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
...
</xsd:documentation>
</xsd:annotation>
</xsd:element>
33. What AddressingFeature is used for?
34. Which bindings AddressingFeature is supported with?
35. Which annotation does AddressingFeature correspond to?
36. What does AddressingFeature make by enabling it on the server?
37. What does AddressingFeature cause by enabling it on the client?
38. Will disabling of AddressingFeature prevent a JAX-WS runtime from processing or adding WS-Addressing headers from/to SOAP messages even if the associated WSDL specifies?
39. When disabling of AddressingFeature can be useful?
40. What the AddressingFeature's required property is used for?
41. What the AddressingFeature's responses property is used for?
42. Is AddressingFeature automatically enabled if the WSDL indicates the use of addressing?
43. What should be done to write a portable endpoint and its corresponding client?
What should be done to write a portable endpoint and its corresponding client?
An endpoint should explicitly specify WS-Addressing Actions to be used via the Action and FaultAction annotations. The client should explicitly enable addressing via the AddressingFeature, and for each invocation, the client should explicitly set the BindingProvider. SOAPACTION_URI_PROPERTY.
44. Describe the effect of AddressingFeature being enabled.
45. Describe the effect of AddressingFeature being disabled.
46. Which AddressingFeature property can be used to specify whether WS-Addressing headers MUST be present on incoming messages?
47. When AddressingFeature.required property only has meaning?
48. Default value of AddressingFeature.required property.
49. Constructors of AddressingFeature.
50. Is the @Action annotation applied to the methods?
51. What @Action is used for?
52. Attributes of @Action.
53. What does @Address.input attribute specify?
54. Default value of @Action.input attribute.
55. What does @Address.output attribute specify?
56. Default value of @Address.output.
57. What does @Address.fault attribute specify?
58. What the @FaultAction annotation is used for?
59. Attributes of @FaultAction.
60. Example of associating Action and FaultAction with input, output and fault messages of the mapped WSDL operation.
61. Write WSDL(operation section) for this example:
@Action(
input = "http://ec.com/input",
output = "http://ec.com/output",
fault = {
@FaultAction(className = AddExamException.class, value = "http://ec.com/fault")
})
public String addExam(String name1, String name2) throws AddExamException {
...
}
Write WSDL(operation section) for this example:
@Action(
input = "http://ec.com/input",
output = "http://ec.com/output",
fault = {
@FaultAction(className = AddExamException.class, value = "http://ec.com/fault")
})
public String addExam(String name1, String name2) throws AddExamException {
...
}<operation name="addExam">
<input wsaw:Action="http://ec.com/input" message="tns:addExam"/>
<output wsaw:Action="http://ec.com/output" message="tns:addExamResponse"/>
<fault message="tns:AddExamException" name="AddExamException" wsaw:Action="http://ec.com/fault"/>
</operation>