Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam v6.0 (1z0-897)

Page:    1 / 8   
Total 120 questions

Given that a web service endpoint is based on the stateless session EJB:
Which is true about the security roles of clients of MrBean? (Choose one)

  • A. Only EJB clients must be in role A.
  • B. Only Web Service clients must be in role A.
  • C. Both EJB and web service clients must be in role A.
  • D. Both EJB and web service clients must NOT be in role A.


Answer : C

Choose the option that best describe the deployer's choices, when deploying an EJB that is also exposed as a RESTful web service using JAX-RS (Choose one):

  • A. The EJB can only be deployed to a web container, since RESTful access to the EJB requires a web container to support the HTTP interaction needed.
  • B. The EJB can be deployed to any EJB or web container that would support local references to the EJB from the JAX-RS runtime in the ejb container.
  • C. The EJB can be deployed to any EJB or web container that would support local references to the EJB from the JAX-RS runtime in the web container.
  • D. The EJB can be deployed to an EJB or web container that is visible to the JAX-RS runtime, even on an application server separate from the JAX-RS runtime, since EJBs support local or remote interactions via RMI.


Answer : C

A developer needs to write a Web service that supports user sessions that timeout after
120 seconds. Which configuration file is correct for the developer use? (Choose one)

  • A. web.xml
  • B. server.xml
  • C. ejb-jar.xml
  • D. service-config.xml


Answer : A

A developer is creating a web service endpoint using a stateless session EJB for the business logic of an application. Choose two methods to select role based access control for the business logic ? (Choose two)

  • A. Using method-permission element in ejb-jar.xml
  • B. Using .htaccess file in the application's ear
  • C. Using <security-role> element in web.xml
  • D. By specifying security annotations like @RolesAllowed in the EJB class


Answer : A,D

A developer creates the following web service:
Assuming that he packages the class in a war file without deployment descriptors, the web service is hosted by a EE container relative to module context at ? (Choose one)

  • A. "/Invoice"
  • B. "/InvoicePort"
  • C. "/InvoiceService"
  • D. "/InvoiceWebService"


Answer : C

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 : B

Given the JAX-RS root resource class fragment:
Choose the statement that best describes the configuration that would be required to support the access control constraint shown:

  • A. No further configuration is required - the JavaEE runtime will pick up the security constraint and configure the web container to match.
  • B. The developer will have to configure the web container to require authenticated access to the URLs corresponding to this resource, so the proper information can be propagated to the EJB container.
  • C. The developer will have to turn on authentication in the web container configuration file, so that all incoming requests are authenticated in order to be processed.
  • D. The developer will have to configure the web container to require authenticated access to the URLs corresponding to this resource, and then map web-tier roles to ejb-tier roles, since the JAX-RS and EJB runtimes cannot use the same set of roles.


Answer : B

In which order do LogicalHandlers and SOAPHandlers configured on a Web Service endpoint execute on an incoming message ? (Choose one)

  • A. SOAPHandlers in the order specified in configuration are executed first and later the LogicalHandlers specified in the order get executed
  • B. LogicalHandlers in the order specified in configuration are executed first and later the SOAPHandlers specified in the order get executed
  • C. All the handlers are executed in the order specified in the configuration
  • D. All the handlers are executed in the reverse order specified in the configuration.


Answer : A

Choose two options from the following that can be achieved by setting the standard
BindingProvider properties on a SEI proxy: (Choose two)

  • A. Configuring HTTP Basic Authentication credentials to access a service
  • B. Validating against schema for outgoing client messages
  • C. Adding additional SOAP headers for outgoing messages
  • D. Specifying web service endpoint address for service invocations


Answer : A,D

Given the following web service:
How many web methods are there in the above web service ? (Choose one)

  • A. 1
  • B. 2
  • C. 3
  • D. 4
  • E. 5


Answer : D

What does the <service-name-pattern> element in the following set of XML statements do:


  • A. Applies the handlers specified in the <handler-chain> element to all the services with targetNamespace http://example.com/handlers.
  • B. Applies the handlers specified in the <handler-chain> element to all services whose name is Hello*.
  • C. Applies the handlers specified in the <handler-chain> element to all services whose names begin with Hello.
  • D. Applies the handlers in the specified in the <handler-chain> element to the service whose name begins with Hello and targetNamespace is http://example.com/handlers.


Answer : D

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

  • A. byte[]
  • B. DataHandler
  • C. Image
  • D. Byte[]


Answer : C

What would be the HTTP content-type header when a message is optimized using MTOM
-> (Choose one)

  • A. multipart/related
  • B. text/xml
  • C. application/soap+xml
  • D. application/xop+xml


Answer : A

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 : D

When a SOAP envelope is optimized on the wire, the following can be said about the optimized infoset : (Choose one)

  • A. optimized infoset contains xop:Include elements with href attribute pointing to attachment data
  • B. optimized infoset contains mtom:Import with location attribute pointing to attachment data
  • C. optimized infoset doesn't have any specific elements for MIME attachment.
  • D. optimzed infoset's element contain cid:Content-ID as the text and Content-ID refers to the associated attachment


Answer : A

Page:    1 / 8   
Total 120 questions