Q1. Given this class: Choose the statement that best describes the potential to write a client implemented using JAX-WS to interact with the JAX-RS (restful) web service defined by this class (Choose one):
A. It is impossible, since JAX-WS requires that the underlying interaction be SOAP-based, and JAX-RS does not support SOAP.
B. It is impossible, since JAX-RS does not support the same extension mechanism via JAX-WS Handlers that JAX-WS supports.
C. It is possible, since the JAX-WS API can be used to create a client that uses a simple raw XML protocol to interact with a service at a given URL.
D. It is possible, since a JAX-WS proxy Port type can be generated to use a simple raw XML protocol to interact with a service at a specific fixed URL.
Answer: C
Q2. 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
Q3. 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
Q4. Given that StockQuoteService is a Service class and StockQuoteProvider is a corresponding SEI for a web service. Which of the following options enable MTOM feature for proxy for the StockQuoteProvider SEI ? (Choose one)
A. proxy = new StockQuoteService().getStockQuoteProvider()
B. proxy = new StockQuoteService().getStockQuoteProvider(new MTOMFeature())
C. proxy = new StockQuoteService(new MTOMFeature()).getStockQuoteProvider()
D. proxy = new StockQuoteService().getStockQuoteProvider(new RespectBindingFeature())
Answer: B
Q5. 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
Q6. 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
Q7. Which of the following WS-Security token profiles is not supported in Metro?
A. X509 Token Profile
B. Kerberos Token Profile
C. SAML Token Profile
D. SOAP with Attachments (SWA) profile
E. Right Expression Language (REL) Token Profile
Answer: E
Q8. Given the resource class:
Choose the fragment that a client could use to request "/res/value" using its JSON representation (Choose one):
A. WebResource resource = client.resource("/res/value");
Value val =
resource.accept("application/json").get(Value.class);
B. WebResource resource = client.resource("/res/value");
Value val =
resource.type("application/json").get(Value.class);
C. WebResource resource = client.resource("/res");
Value val =
resource.accept("value").type("application/json").get(Value.class);
D. WebResource resource = client.resource("/res/value");
Value val = resource.get(Value.class);
Answer: A
Q9. 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
Q10. What are two valid facts about WS-I? (Choose two.)
A. The I-Stack is a great development tool.
B. The WS-I promotes and supports generic protocols for the interoperable exchange of messages.
C. The WS-I governs languages and protocols such as SOAP, WSDL, and UDDI.
D. The WS-I specifies specific rules that address either weaknesses in component specifications or issues of how to combine the collected technology.
E. The WS-I has been a guiding force in creating StAX.
Answer: BD