1Z0-897 | 10 Tips For Improve 1Z0-897 practice test


Q31. Given the resource class fragment: Choose the code fragment below that would secure access only to the Resource update() method (Choose one): 

A. <security-constraint> 

<web-resource-collection> 

<url-pattern>/rest</url-pattern> 

<http-method>GET</http-method> 

<http-method>POST</http-method> 

</web-resource-collection> 

B. <security-constraint> 

<web-resource-collection> 

<url-pattern>/rest</url-pattern> 

<http-method>POST</http-method> 

</web-resource-collection> 

C. <security-constraint> 

<web-resource-collection> 

<url-pattern>/rest/id</url-pattern> 

<http-method>POST</http-method> 

<http-method>GET</http-method> 

</web-resource-collection> 

D. <security-constraint>D.<security-constraint> 

<web-resource-collection> 

<url-pattern>/id</url-pattern> 

<http-method>POST</http-method> 

</web-resource-collection> 

Answer:

Q32. A company is refactoring an existing website to use Web services clients. The application retrieves lists of parts and displays them to the users in a browser window. Previously, the data was stored as files on the web server and, in order to access the files, the user would simply click on a hyperlink. Now the data must be dynamically generated via a service that another developer has created. They want the easiest way to refactor their website to use Web services. Which three client-side technologies should they use? (Choose three.) 

A. SOAP 

B. REST 

C. Javascript 

D. XML 

E. JSON 

F. JAVA 

Answer: BCE 

Q33. Which two statements are true about JAX-WS support for data bindings? (Choose two.) 

A. Data binding is performed with only generated classes to reduce errors and hide complexity. 

B. JAXB 2.0 is preferred. 

C. Inline binding declarations with XML Schema are NOT supported for JAXB 2.0. 

D. SAAJ 1.3 is supported for data binding with SOAP. 

E. JAX-RPC data binding is recommended for cross-platform interoperability. 

Answer: BD 

Q34. A Web service needs to encrypt certain SOAP headers when responding. Which statement about this encryption is true? 

A. The Web service runtime is the appropriate place for such encryption. 

B. The Web service business logic is the appropriate place for such encryption. 

C. Either the Web service business logic or runtime is appropriate for such encryption. 

D. Neither the Web service business logic nor runtime is appropriate for such encryption. 

E. Transport level security protocol like SSL should be used to meet the requirements without code changes. 

Answer:

Q35. What is an advantage of enabling Addressing feature on an endpoint? 

A. Addressing ensures reliable transfer of messages between client address and the service address. 

B. Addressing ensures the message exchanges between the client and service are properly secured. 

C. Addressing enables the optimization of messages exchanged between the client and the service. 

D. Addressing provides transport-neutral way to address the endpoints and messages. 

Answer:

Q36. Which two statements are true about creating a Web service with JAX-WS? (Choose two.) 

A. Stateless Web services must be created with HTTP servlet endpoints. 

B. Creating the portable artifacts by hand is slow, but makes a service easier to maintain. 

C. All Java-based endpoints share a common packaging model. 

D. EJBs can serve as endpoints if hosted in a container with runtime and service support. 

E. JAX-WS supports creating services from source and compiled code without a WSDL. 

Answer: DE 

Q37. An enterprise has a requirement to create a Web service to accept purchase orders. The order data contains some authorization information that is specific to each order (such as, who can access which parts of the order). Keeping in mind future enhancements in types of orders that the enterprise needs to accept, which two design solutions provide the most flexibility? (Choose two.) 

A. a Web service interface with one method per accepted XML document type for a purchase order 

B. a procedure-style Web service method that lists all data elements and all possible access control options 

C. a document-style Web service method that accepts all types of XML documents representing purchase orders. 

D. a Web service interface with one method for each combination of data elements and the access control options 

Answer: AC 

Q38. Given the class: 

Choose the URL path that would result in a call to getToken()? (Choose one) 

A. /id 

B. /resource/id 

C. /resource/id/token 

D. /resource/token 

Answer:

Q39. Choose the statement that best describes the use of Enterprise Beans as JAX-RS root resources: 

A. An Enterprise Bean can be made a JAX-RS root resource only if EJB-specific features such as transaction management or security validation are not used. 

B. JAX-RS imposes no limitations on the characteristics ofthose Enterprise Beans that can be exposed as JAX-RSresource classes. 

C. An Enterprise Bean that is exposed as a JAX-RS root resourcecan no longer be used directly as a remote bean itself - thebean implementation class can be accessed via the remote EJBdistributed framework (RMI), or a JAX-RS root resource, but not both concurrently within the same application. 

D. An Enterprise Bean that is exposed as a JAX-RS root resource supports all the same features as a JAX-RS resource that it supports as an EJB. 

Answer:

Q40. Which two statements are true about creating a Web service with JAX-WS? (Choose two.) 

A. Stateless Web services must be created with HTTP servlet endpoints. 

B. Creating the portable artifacts by hand is slow, but makes a service easier to maintain. 

C. All Java-based endpoints share a common packaging model. 

D. EJBs can serve as endpoints if hosted in a container with runtime and service support. 

E. JAX-WS supports creating services from source and compiled code without a WSDL. 

Answer: DE