1Z0-897 | Avant-garde 1Z0-897 Exam Study Guides With New Update Exam Questions


Q11. A developer wants to use WebServiceContext in the web service endpoint. Which of the following is the correct way to get WebServiceContext object ? (Choose one) 

A. @WebService 

public class MyService { 

@WebServiceContext 

WebServiceContext ctxt; 

public String echo(String str) { 

... 

B. @WebService 

public class MyService { 

WebServiceContext ctxt; 

public String echo(String str) { ctxt = jndi.lookup("java:com/env/WebServiceContext"); } 

C. @WebService 

public class MyService { 

@Inject 

WebServiceContext ctxt; 

public String echo(String str) { 

... 

D. @WebService 

public class MyService { 

@Resource 

WebServiceContext ctxt; 

public String echo(String str) { 

... 

Answer:

Q12. Which of the following two EJB types can be used as web service endpoints ? (Choose two.) 

A. Stateful Session EJB 

B. Message-Driven EJB 

C. Stateless Session EJB 

D. Singleton Session EJB 

Answer: CD 

Q13. Which of the following can be used on the SEI's method parameter so that the corresponding generated schema type is wsiap:swaref ? (Choose one) 

A. @XMLSchemaType 

B. @SwaRef 

C. @XmlMimeType 

D. @XMLAttachmentRef 

Answer:

Q14. An automobile manufacturer publishes a Web service for use by their suppliers. The manufacturer has stringent security requirements that require suppliers to verify their identity. Data integrity and confidentiality must be maintained between the client and the server. Which two technologies can be used to meet the requirements? (Choose two) 

A. XACML and XKMS 

B. SSL with mutual authentication 

C. Message level security with WS-Security 

D. Private network and XML Signature 

Answer: BC 

Q15. A developer creates a Web service for his company's inventory service. He uses servlet container to deploy the web service and wants to enable basic authentication for all web service invocations. Where does the developer configure security requirements for the above case? 

A. sun-jaxws.xml 

B. web.xml 

C. webservices.xml 

D. domain.xml 

Answer:

Q16. Which two statements are true about public key digital signatures applied to Web services? (Choose two) A. The receiver verifies that the message matches the digital signature using its own private key. 

B. The sender creates a digital signature using its own private key and sends that signature along with the original document. 

C. The sender creates a digital signature using its own public key and sends that signature along with the original document. 

D. The receiver verifies that the message matches the digital signature using the sender's public key. 

Answer: BD 

Q17. What are two features of a WSDL 1.1 document? (Choose two.) 

A. Service defines a collection of related endpoints. 

B. Service describes the message's payload using XML. 

C. Service assigns an Internet address to a specific binding. 

D. Porttype declares complex data types and elements used elsewhere. 

E. Porttype elements are used to group a set of abstract operations. 

F. Porttype defines a concrete protocol and data format specification. 

Answer: AE 

Q18. Which of the following option represents the behavior of the endpoint, when the addressing feature is enabled on the service with the use of @Addressing() annotation. 

A. The endpoint accepts only messages containing Addressing headers and rejects any messages not containing Addressing headers. 

B. The endpoint accepts any messages with or without any Addressing headers and does not validate addressing headers because "required" annotation element is not true. 

C. The endpoint accepts messages only if the messages contain wsa:Action header but does not require presence of any other addressing headers. 

D. The endpoints accepts messages with or without addressing headers. If the message contains wsa:Action header, it validates all other addressing headers in the message. 

Answer:

Q19. An airline built and deployed a back-end application to manage reservations. To support interoperability with as large a base of standalone client applications as possible, the services provided by this back-end application are exposed as XML-based restful web services. Management just added a new requirement that AJAX-based web application clients be supported, too. One of the developers suggested that it is enough to extend the existing application to support both XML-based and JSON-based restful web services. Assuming the developer is correct, choose the sentence that best describes an attempt to introduce this ability as this developer suggests (Choose one): 

A. The attempt will fail, because JAX-RS does not support both XML- and JSON- based restful services in parallel. 

B. The attempt will be trivial to implement, since JAX-RS just needs for the application to specify that both XML- and JSON-based interaction will be supported. 

C. The attempt can succeed, but it will require a significant amount of new code, since JAX-RS does support both XML- and JSON-based interaction - but not single resource can support both kinds of interaction simultaneously. 

D. The attempt will fail, because there is more to the difference between XML-based and JSON-based interactions than just the data representation used. 

Answer:

Q20. Given that: 

What is X in the above code? (Choose one) 

A. byte[] 

B. DataHandler 

C. Image 

D. Byte[] 

Answer: