1Z0-897 Premium Bundle

1Z0-897 Premium Bundle

Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Certification Exam

4.5 
(22455 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 23, 2024Last update

Oracle 1Z0-897 Free Practice Questions

Q1. A Java EE application contains business logic composed of EJB beans. All current clients are Java applications accessing the business logic using RMI. Some clients are remote (running in different JVMs) and some are local (running in the same JVM). Which of the following two occur if EJB components are exposed as Web services? (Choose two.) 

A. New client applications can be built using the published WSDL to access existing business logic 

B. Current remote clients must switch from RMI to web service access. 

C. New remote clients can access business logic using RMI or web service access 

D. New local clients must access business logic using only RMI 

E. New clients must only be written in java to access business logic 

Answer: AC 

Q2. 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:

Q3. 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 of services in the proposed Service Oriented Architecture? (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 

Q4. A developer is tasked with analyzing a new Web services project and must decide to use either SOAP or REST. Based on requirements, the developer determines the service must be stateful and have a documented interface and data types that clients can discover dynamically. Which two statements are true? (Choose two.) 

A. The SOAP approach consists of resources identified by unique URIs. 

B. SOAP services are self-documenting via the WSDL. 

C. Either SOAP or REST are suitable for the Web service. 

D. REST fully documents data types via the functional interface GET and POST. 

E. RESTful services are stateless by definition. 

Answer: BE 

Q5. 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:

Q6. Which two statements are true about the interoperability of Web services developed using the Java EE 6 platform? (Choose two.) 

A. Interoperability is improved by restricting access only to Java clients. 

B. EJB-based endpoints are more difficult for .NET clients to access. 

C. Only servlet-based endpoints are used when exposing services to non-Java clients. 

D. The signature of Web service methods is limited to parameters and return types that are concrete types and simple arrays of concrete types. 

E. The service must be published in both the .NET and Java UDDIs. 

F. Testing for WS-I Profile conformance improves interoperability. 

Answer: DF 

Q7. A developer is writing a Web service method that needs to accept multiple types of requests. Based on the request's content, the service performs time-consuming steps, such as verifying the user's account, checking credit ratings, and building a list of offers. Which two approaches are appropriate to use in this situation? (Choose two.) 

A. A synchronous, document-style approach. 

B. A synchronous, procedure-style approach. 

C. An asynchronous, document-style approach. 

D. An asynchronous, procedure-style approach. 

E. HTTP and HTTPS. 

F. SMTP or other asynchronous protocol. 

Answer: CF 

Q8. A developer is asked to consult on a Web services project and assist the team with a good design approach on a new project. The team members disagree on whether to use WSDL or Java first. Several members are skilled with XML and see a schema and WSDL as the correct place to start. The team has also learned the deadline for this project has been moved up and another team plans to reuse their code. Which statement is true about the proper course of action to take in this situation? 

A. Java should be used first because it is a strongly typed language and will result in a robust WSDL. 

B. WSDL should be used first because it will make the code easier to reuse for the other team. 

C. Java should be used first because it is often the fastest and easiest approach. 

D. WSDL should be used first because the team knows XML Schema. 

Answer:

Q9. A student developer has created a new library of math functions to share with friends in a linear algebra class. The developer is having difficulty getting people to come over to the dorm to see the new code library, so he decides to deploy it as a Web service so that everyone can enjoy the features via the Internet. One of the functions has this WSDL definition: 

<portType name="MyMathLib"><operation name="incCtr"><input message="tns:incCtr"/></operation></portType> 

Which two statements are true about this Web service? (Choose two.) 

A. This is an asynchronous receive. 

B. This indicates a one-way message exchange pattern 

C. The client must use SOAPFaultException to display any errors. 

D. It must send a SOAP fault back to the sender. 

E. It must NOT send a SOAP fault back to the sender. 

Answer: BE 

Q10. 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:

Q11. An engineer is creating a WSDL 1.1 document, and is having difficulty with the wsdl:messages section. 

Which two statements are true about wsdl:messages in a WSDL 1.1 document? (Choose two.) 

A. Both type and element attributes can be used on the same wsdl:part. 

B. Both type and element attributes can be used on the same wsdl:binding. 

C. The type and element attributes cannot be used on the same wsdl:part. 

D. The type and element attributes cannot be used on the same wsdl:binding. 

E. Document-style messaging allows the type attribute. 

F. Document-style messaging allows the element attribute. 

Answer: CF 

Q12. Which of the following two EJB types can be used as web service endpoints ? (Choose two.) 

A. Stateful Session EJB 

B. Message-Driven EJB 

C. Stateless Session EJB 

D. Singleton Session EJB 

Answer: CD 

Q13. Which of the following security technology is not covered in Metro project? (Choose one.) 

A. WS-Trust 

B. WS-SecurityPolicy 

C. WS-SecureConversation 

D. XACML 

Answer:

Q14. Which two statements are true about the I-Stack and annotations technologies? (Choose two.) 

A. With 64-bit Java, JAXB compatible parameters are preferred for performance. 

B. @WebMethod is required for private methods, but public methods are exposed in any service automatically. 

C. Declaring business methods final is a good way to protect the integrity of the implementation class. 

D. Method parameters and return types must be compatible with the JAXB 2.0. 

E. JAX-WS uses annotations to invoke Web service requests at runtime. 

Answer: DE 

Q15. 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:

Q16. Assume the code is free of gross flaws and syntax errors. Which two statements are true? (Choose two.) 

A. Line 8 specifies that addInventory accepts either a valid total or quantity. 

B. Line 1 indicates the portType is LogInventory. 

C. Line 3 shows the method is mapped to the WSDL operation called "checkProduct". 

D. Line 4 means that a method is not expected to return a value unless requested. 

E. Line 7 implies WSDL operation and method name are the same. 

Answer: BE 

Q17. 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 

Q18. Given the class: Choose the annotation to add on line 4 to enable the client to receive a JSON representation of the instance of Value that is returned (Choose one): 

A. @Produces("application/json"); 

B. @Consumes("application/json"); 

C. No annotation is needed, since JAX-RS supports marshalling and unmarshalling of JSON records. 

D. No annotation is possible, since JAX-RS does not support marshalling and unmarshalling of JSON records. 

Answer:

START 1Z0-897 EXAM