Q1. 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
Q2. 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: AD
Q3. 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
Q4. In designing the security for your enterprise application with multiple Web services, you don't want that each of the services handle user authentication by itself. Then which of the following you can use in your design?
A. enable secure conversation for each service
B. a centralized Policy Decision Point (PDP) via XACML
C. a Security Token Service (STS)
D. use transport level security with SSL
Answer: C
Q5. A company has contracted a developer to create their new accounting system. The system the developer will replace runs a monolithic web application using one web server and one database server. Technical requirements state the developer must write the business logic in Java, deploy to the application server and push the presentation logic onto the web servers. What are three characteristics that services in the proposed Service Oriented Architecture should honor? (Choose three.)
A. Services are coarse grained.
B. Services are finely grained.
C. Services are loosely coupled.
D. Services are tightly coupled.
E. Clients must be implemented in the Java technology.
F. Services are platform agnostic, network-addressable web APIs.
Answer: ACF
Q6. What are three best practices that can be implemented when generating WS-I Basic Profile compliant Web services? (Choose three.)
A. Send arrays of nulls to ensure .NET and Java clients receive the same data.
B. Define data types early in the integration cycle.
C. Use complex data types to reduce the number of items exchanged.
D. Test interoperability at every stage of development.
E. Insert conformance headers in all SOAP messages.
F. Keep data types simple for speed and stability.
Answer: BDF
Q7. 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
Q8. Given the class:
Choose the option that describes what would happen if this class were deployed (Choose one):
A. Any HTTP GET or POST request with the URL "/resource" would result in a call to getName().
B. Any HTTP GET or POST request with URLs that begin with "/resource" would result in a call to getName().
C. A runtime error would result, since a method cannot be responsible for both GET and POST requests.
D. A compile error would result, since a method cannot be responsible for both GET and POST requests.
Answer: A
Q9. Given that a developer implemented a web service using Stateless Session EJB:
If a web service client invokes increment web service method twice consecutively, what must be the returned value after the second invocation ? (Choose one)
A. 0
B. 1
C. 2
D. 3
E. Undefined
Answer: E
Q10. 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
Q11. Given stock quote web service endpoint:
and the corresponding client side artifacts for the above web service are :
StockQuoteService is the Service class and StockQuoteProvider is the corresponding SEI.
Which of the following two options enable addressing feature for proxy for the StockQuoteProvider SEI ? (Choose two)
A. proxy = new StockQuoteService().getStockQuoteProvider()
B. proxy = new StockQuoteService().getStockQuoteProvider(new AddressingFeature())
C. proxy = new StockQuoteService().getStockQuoteProvider(new AddressingFeature(false))
D. proxy = new StockQuoteService().getStockQuoteProvider(new AddressingFeature(false, true))
Answer: AB
Q12. What is an accurate description of the handling of application exceptions thrown by a JAX-WS service endpoint?
A. Application exceptions can be mapped to faults in WSDL.
B. Application exceptions are NOT handled by JAX-WS SEI clients.
C. Application exceptions are always propagated to JAX-WS clients as RemoteExceptions.
D. Application exceptions are always propagated to JAX-WS SEI clients as WebServiceExceptions.
E. Application exceptions are always propagated to JAX-WS SEI clients as SOAPFaultExceptions.
Answer: A
Q13. 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
Q14. Choose the types of Enterprise Beans that can be made into JAX-RS root resources (Choose two):
A. Stateful Session Beans
B. Stateless Session Beans
C. Message-Driven Beans
D. Singleton Beans
Answer: BD
Q15. In the code fragment below, the client will use os to upload data to the web service provider.
Choose the statement that must be placed in line 5, to ensure this fragment works as intended. (Choose one)
A. connection.setDoOutput(true);
B. connection.setAllowUserInteraction(true);
C. connection.setIfModifiedSince(new Date().getTime());
D. connection.setUseCaches(false);
Answer: A
Q16. 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
Q17. Which two statements are true about WSIT client development and using the WSIT configuration file? (Choose two.)
A. Client configuration files do NOT contain information security features, such as authentication.
B. The file contains the URL for the WSDL.
C. To maintain interoperability, the configuration file must not name packages.
D. A WSIT client uses the file as a WSDL proxy is available from any WSIT compliant service.
E. The wsimport tool uses the file to access the WSDL and build stubs to access a service.
Answer: BE
Q18. 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