Web Services Certification Free Mock Exam

Question 1 of 16 [Create an SOAP web service in a servlet container]
The JAX-WS tool, wsimport is used to process a WSDL file and generate portable Java artifacts that are used to create a Web service client.
Which of the following artifacts wsimport tool can generate?
Choice 1Service Endpoint Interface (SEI)
Choice 2Exception class mapped from wsdl:fault (if any)
Choice 3Service Endpoint Enterprise Java Bean class including business interfaces
Choice 4Service
Choice 5Async Reponse Bean derived from response wsdl:message (if any)
Choice 6JAXB generated value types (mapped java classes from schema types)
Question 2 of 16 [Create a RESTful web service in a servlet container]
Which annotation is used to specify the MIME media types of representations a resource can consume that were sent by the client?
Choice 1@Produces
Choice 2@Consumes
Choice 3@Provider
Question 3 of 16 [Create a RESTful web service in a servlet container]
A developer has written the following Resource classes.
@Path("license")
public class LicenseResource { @GET
@Path("process")
public License getLicense() {...}
@Path("{id}")
public OrderResource findOrder(@PathParam("id") String id) {
return new OrderResource(id);
}
}

public class OrderResource {
public OrderResource(String id) {...}
@GET
public Order getOrder() {...}
}
Which method will handle GET request for the license/process URI?
Choice 1getLicense of LicenseResource
Choice 2getOrder of OrderResource
Choice 3findOrder of LicenseResource
Question 4 of 16 [Create a SOAP based web service implemented by an EJB component]
You are assigned to develop web service implementation for EPractize Labs's affiliate reporting system. Your architect decided to use servlet-based end point.
Which of the following a servlet-based Web service endpoint use?
Choice 1HTTP sessions
Choice 2Java EE 6 declarative security
Choice 3Java EE 6 programmatic security
Choice 4client-demarcated transactions
Choice 5container-managed transactions
Choice 6Method level security by @RolesAllowed annotation
Question 5 of 16 [Create a SOAP based web service implemented by an EJB component]
Which utility class can create URIs that refer to resources in the service?
Choice 1javax.ws.rs.core.UriBuilder
Choice 2javax.ws.rs.UriBuilder
Choice 3javax.ws.rs.core.URIBuilder
Choice 4javax.ws.core.UriBuilder
Question 6 of 16 [Create a RESTful web service implemented by an EJB component]
Which of the following statements are true about Web Service Endpoint Implementation by EJB 3.1?
Choice 1The class must be annotated with either the javax.jws.WebService or javax.jws.WebServiceProvider annotations.
Choice 2The business methods of the implementing class must be public, and must not be declared static or final.
Choice 3Business methods that are exposed to web service clients must be annotated with javax.jws.WebMethod.
Choice 4The implementing class can be declared final and must not be abstract.
Choice 5The implementing class may or may not have a default public constructor.
Question 7 of 16 [Configure Java EE security for a SOAP web service]
EPractize Labs Skill Evaluation Lab ReportManager(stateless session) is a web service endpoint bean used to manage PDF and RTF reports.
Which of the following can enable role based access control for the business logic implemented in ReportManager?
Choice 1By specifying security annotations like @RolesAllowed in the EJB class
Choice 2Using method-permission element in ejb-jar.xml
Choice 3Using method-permission element in web.xml
Choice 4Using method-permission element in jax-ws.xml
Question 8 of 16 [Create a web service client for a SOAP based web service]
Which of the following can be generated by wsimport tool?
Choice 1Service Endpoint Interface (SEI)
Choice 2Exception class mapped from wsdl:fault (if any)
Choice 3JAXB generated value types (mapped java classes from schema types)
Choice 4RMI Stub and Skelton Classes for Webservice communication
Question 9 of 16 [Create a web service client for a RESTful web service]
A developer wants to access JAX-RS service with HTTP authentication.
Which class can be extended and statically registered to achieve this goal?
Choice 1java.net.Authenticator
Choice 2javax.net.ssl.SSLContext
Choice 3java.net.CookieHandler
Choice 4javax.net.ssl. Authenticator
Question 10 of 16 [Create a SOAP based web service using Java SE platform]
Which of the following statements are true about JAX-WS Dispatch API?
Choice 1When using the PAYLOAD mode, the Dispatch client is only responsible for providing the contents of the <soap:Body>
Choice 2When using the PAYLOAD mode, the Dispatch client is responsible for providing the entire SOAP envelope.
Choice 3When using the MESSAGE mode, the Dispatch client is only responsible for providing the contents of the <soap:Body>
Choice 4When using the MESSAGE mode, the Dispatch client is responsible for providing the entire SOAP envelope.
Question 11 of 16 [Create handlers for SOAP web services]
Which of the following methods must be implemented in a JAX-WS SOAP handler class?
Choice 1soapHandleMessage
Choice 2handleMessage
Choice 3handleFault
Choice 4close
Choice 5soapHandleFault
Question 12 of 16 [Create low-level SOAP web services]
Which of the following XML processing programming models is best suited to an environment with a small memory footprint and only needs to read the information once?
Choice 1SAX
Choice 2DOM
Choice 3JAXB
Choice 4XSLT
Choice 5TrAX
Question 13 of 16 [Use MTOM and MIME in a SOAP web service]
Which of the following statements are true about @MTOM annotation?
Choice 1JAX-WS supports the use of SOAP Message Transmission Optimized Mechanism (MTOM) for sending binary attachment data.
Choice 2To enable MTOM on an endpoint, use the @MTOM (javax.xml.ws.soap.MTOM) annotation on the endpoint.
Choice 3To enable MTOM on an endpoint, use the @WEBSERVICE_MTOM (javax.xml.ws.soap.WEBSERVICE_MTOM) annotation on the endpoint.
Question 14 of 16 [Use WS-Addressing with a SOAP web service]
Which of the following statements are true about FaultAction?
Choice 1The FaultAction annotation cannot be used inside an Action annotation
Choice 2The wsam:Action attribute value in the fault message in the generated WSDL operation mapped for className class is equal to the corresponding value in the FaultAction.
Choice 3The FaultAction annotation is used inside an Action annotation to allow an explicit association of a WS-Addressing Action message addressing property
Question 15 of 16 [Configure Message Level security for a SOAP web service]
Which of the following are used to implement message level security?
Choice 1XML Encryption
Choice 2XML Digital signature
Choice 3XKMS
Choice 4SAML
Choice 5SSL
Question 16 of 16 [Apply best practices to design and implement web services]
Which of the following encoding styles are acceptable according to the WS-I Basic Profile 1.1?
Choice 1rpc-literal
Choice 2rpc-encoded
Choice 3document-literal
Choice 4document-encoded
Choice 5literal wrapped-encoded