• No results found

QUESTION NO: 83 Given:

In document 240441540-dumps (Page 43-55)

<soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<!- insert envelope contents here -->

</soap:Envelope>

Which two XML fragments, when inserted into this soap:Envelope, result in a

WS-I Basic Profile 1.1 conformant SOAP message? (Choose two.)

A. <soap:Body>

<tns:Person xmlns:tns="http://sun.cert/types">

<name>Fred</name>

</tns:Person>

<age>33</age>

</soap:Body>

B. <soap:Body>

<tns:Person xmlns:tns="http://sun.cert/types">

<name>Fred</name>

<age>33</age>

</tns:Person>

QUESTION NO: 84

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: C,F

QUESTION NO: 85

Which two characteristics can be defined in a WSDL 1.1 document that is specific to

HTTP? (Choose two.)

A. The location for the port can be defined.

B. The address for the service can be defined.

C. The transport attribute of a soapbind:binding child MAY have the value

"http://schemas.xmlsoap.org/soap/http".

D. The transport attribute of a soapbind:binding child MUST have the value

"http://schemas.xmlsoap.org/soap/http".

E. The transport attribute of a soapbind:binding child MUST have the value

"http://www.w3.org/ns/wsdl/soap".

Answer: A,D

QUESTION NO: 86

According to the WS-I Basic Profile 1.1, which two statements are true about the

targetNamespace attribute for xsd:schema elements that are children of WSDL 1.1 type

element? (Choose two.)

A. Its value must be valid unless it has xsd:import, xsd:annotation, or both as its only child elements.

B. Its value must be empty unless it has xsd:import, xsd:annotation, or both as its only child elements.

C. It should have same the value as the namespace attribute on the wsdl:import element in a document being imported.

D. It must have same the value as the namespace attribute on the wsdl:import element in a document being imported.

Answer: A,D

QUESTION NO: 87

A developer is trying to incorporate an existing schema into a document.In the code

fragments, which types definition correctly uses an existing schema?

A. <types>

import namespace="http://www.sun.com/jws"

schemaLocation="http://www.sun.com/jws/my.xsd"

QUESTION NO: 88

Which two statements are true about WSDL 1.1 and the Basic Profile? (Choose two.)

A. WSDL does NOT recommend a specific system for user-defined datatypes.

B. WSDL recommends the use of XML Schema for user-defined datatypes.

C. WSDL mandates the use of XML Schema for user-defined datatypes.

D. Basic Profile recommends the use of XML Schema for user-defined datatypes.

E. Basic Profile mandates the use of XML Schema for user-defined datatypes.

F. Basic Profile recommends the use of either XML Schema or DTD for user-defined datatypes.

Answer: B,E

QUESTION NO: 89

Which two statements are true about elements in a WSDL document? (Choose two.)

A. Operation is an abstract set of port types supported by one or more endpoints.

B. Service is an abstract set of operations supported by one or more endpoints.

C. Message is an abstract description of an action supported by the service.

D. Operation is an abstract description of an action supported by the service.

E. Binding is a single endpoint defined as a combination of an operation and a network address.

F. Message is an abstract, typed definition of the data being communicated.

Answer: D,F

QUESTION NO: 90

Developers are creating a WSDL to describe an invoice in a Web service.Which code

fragment correctly describes an invoice?

A. <Type name="Invoice">

<all>

<element name="id" type="string/>

<element name="name" type="string"/>

<element name="items">

<complexType>

<all>

<element name="item" type="tns:Item" minOccurs="0" maxOccurs="unbounded"/>

</all>

</complexType>

</element>

</all>

</Type>

B. <complexType name="Invoice">

<all>

<element name="id" type="string/>

<element name="name" type="string"/>

<element name="items">

<complexType>

<all>

<element name="item" type="tns:Item" minOccurs="0" maxOccurs="unbounded"/>

</all>

</complexType>

</element>

</all>

</complexType>

C. <types name="Invoice">

<all>

<element name="id" type="string/>

<element name="name" type="string"/>

<element name="items">

<complexType>

<all>

<element name="item" type="tns:Item" minOccurs="0" maxOccurs="unbounded"/>

</all>

</complexType>

</element>

</all>

</types>

D. <complexType name="Invoice">

<all>

<element name="id" type="string/>

<element name="name" type="string"/>

<element name="items">

<type>

<all>

<element name="item" type="tns:Item" minOccurs="0" maxOccurs="unbounded"/>

</all>

QUESTION NO: 91

An engineer is describing a function call that is being used in a Web service.Which code

fragment correctly describes this call?

A. <wsdl:definitions .... >

<wsdl:port .... > *

<wsdl:operation name="nmtoken" parameterOrder="nmtokens">

<wsdl:input name="nmtoken"? message="qname"/>

<wsdl:output name="nmtoken"? message="qname"/>

<wsdl:fault name="nmtoken" message="qname"/>*

</wsdl:operation>

</wsdl:port >

</wsdl:definitions>

B. <wsdl:definitions .... >

<wsdl: operation.... > *

<wsdl: portType name="nmtoken" parameterOrder="nmtokens">

<wsdl:input name="nmtoken"? message="qname"/>

<wsdl:output name="nmtoken"? message="qname"/>

<wsdl:fault name="nmtoken" message="qname"/>*

</wsdl: portType >

</wsdl: operation >

</wsdl:definitions>

C. <wsdl:definitions .... >

<wsdl:portType .... > *

<wsdl:operation name="nmtoken" parameterOrder="nmtokens">

<wsdl:input name="nmtoken"? message="qname"/>

<wsdl:output name="nmtoken"? message="qname"/>

<wsdl:fault name="nmtoken" message="qname"/>*

</wsdl:operation>

</wsdl:portType >

</wsdl:definitions>

D. <wsdl:definitions .... >

<wsdl: operation.... > *

<wsdl:port name="nmtoken" parameterOrder="nmtokens">

<wsdl:input name="nmtoken"? message="qname"/>

<wsdl:output name="nmtoken"? message="qname"/>

<wsdl:fault name="nmtoken" message="qname"/>*

</wsdl:port>

</wsdl: operation >

</wsdl:definitions>

Answer: C

QUESTION NO: 92

A team of developers is working with UDDI. They use the delete_tModel function to

remove a tModel.Which three statements are true about the delete_tModel? (Choose

three.)

A. The delete_tModel physically deletes the tModels.

B. The deleted tModels still appear in the results returned by find_tModel.

C. The deleted tModels are omitted from any results returned by find_tModel.

D. An authentication token is required.

E. An authentication token is recommended.

F. If any error occurs in processing this API call, a tModelError element will be returned to the caller within a SOAP Fault.

G. If any error occurs in processing this API call, a dispositionReport element will be returned to the caller within a SOAP Fault.

Answer: C,D,G

QUESTION NO: 93

A software engineer is adding her company's Web services to a UDDI registry with

JAXR so that the company's suppliers can discover them easily.What are three functions

available to them through the Publisher API? (Choose three.)

A. find_binding B. save_binding C. get_service D. delete_service

E. save_publisherAssertions F. set_publisherAssertions Answer: B,D,F

QUESTION NO: 94

What are two characteristics of the UDDI Inquiry API? (Choose two.)

A. It requires user authentication.

B. It can be used to query the Internet.

C. It does NOT require user authentication.

D. find_binding is used to get full bindingTemplate information suitable for making one or more service requests.

E. It provides a mechanism to perform a case-sensitive search on services.

F. It provides a mechanism to get a list of services ordered by their creation date.

Answer: C,E

QUESTION NO: 95

Which three are valid JAX-WS clients? (Choose three.)

A. UDDI

B. Java SE 6 classes C. SOAP

D. a WSDL presented by Ajax E. stateful session bean

F. JSPs

Answer: B,E,F

QUESTION NO: 96

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

QUESTION NO: 97

Which two statements are true about JAX-WS API using SOAP or REST? (Choose two.)

A. JAX-WS prefers base 64 encoding of binary attachments for SOAP and REST.

B. SOAP services require deployment descriptors and REST uses annotations.

C. XML and REST are often easier to use than SOAP for stateless services.

D. JAX-WS clients can bind both SOAP and raw XML from REST.

E. REST services must be used to generate portable artifact classes mapped to SOAP.

Answer: C,D

QUESTION NO: 98

A stateful Web service is implemented as an EJB-based endpoint.What are two ways to

maintain that state? (Choose two.)

A. by using URL re-writing

B. by adding a session cookie to the HTTP headers C. by adding a conversation id to the SOAP headers

D. by requiring clients to send a client id parameter to all methods Answer: C,D

QUESTION NO: 99

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?

A. web.xml B. server.xml C. ejb-jar.xml

D. service-config.xml Answer: A

QUESTION NO: 100

Which three can a servlet-based Web service endpoint use? (Choose three.)

A. HTTP sessions

B. Java EE 5 declarative security C. Java EE 5 programmatic security D. client-demarcated transactions E. container-managed transactions Answer: A,B,C

QUESTION NO: 101

Which three statements are true about JAX-WS Web services? (Choose three.)

A. EJB-based endpoints are always invoked one thread at a time.

B. Servlet-based endpoints are always invoked one thread at a time.

C. EJB-based endpoints can be invoked by multiple threads at the same time.

D. Servlet-based endpoints can be invoked by multiple threads at the same time.

E. Java SE 6 is suitable for development of a Web service endpoint interface.

Answer: A,D,E

QUESTION NO: 102

Which two statements are true about JAXB? (Choose two.)

A. Developers must design and code JAXB classes, based on the XML schema.

B. JAXB represents a schema in memory after parsing it with the SAX API.

C. JAXB maps Java classes to a derived schema.

D. JAXP is a lightweight version of JAXB, and is preferred for mapping classes and XML in Java SE 6 applications.

E. JAXB provides reading and writing to manipulate XML using Java classes.

Answer: C,E

QUESTION NO: 103

Which statement is true about StAX?

A. StAX provides client parsing control with memory usage similar to DOM.

B. StAX allows clients to start, pause and resume the parsing process.

C. StAX is the only XML parsing approach supported with JAX-WS.

D. StAX is a more efficient version of SAX, based on newer XML technology.

Answer: B

QUESTION NO: 104

A developer must design a program to parse XML orders, based on a schema the

company developed. The original documents serve no purpose after processing, but some

derived values will be inserted in the company's RDBMS before the documents are

discarded.Which technology should be used to process the orders?

A. JDBC 2.0 or higher B. JAXB 2.0

C. JAX-WS 2.0 D. XSLT

Answer: B

QUESTION NO: 105

A developer has an existing stateless session bean that contains a remote method. The

method needs to be made available as a WS-I Basic Profile 1.1 compliant Web

service.What is the correct mapping approach?

A. RMI B. JDBC

C. WSDL-to-Java D. Java-to-WSDL

Answer: D

QUESTION NO: 106

A developer is asked to determine which Web services approach is correct for a

new project. A SOAP-based Web service must be created and deployed in an

environment where many customers will use it. These customers will be responsible for

developing their own clients, based on the published WSDL. Which approach is correct

to use first in this situation?

A. Java, because the WSDL generated later will be more accurate

B. WSDL, because the service and customers can benefit from the strongly typed schema C. Java, because the service must be efficient to support many customers

D. WSDL, because tools allow existing classes to be easily mapped without modification Answer: B

QUESTION NO: 107

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

QUESTION NO: 108

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

QUESTION NO: 109

In document 240441540-dumps (Page 43-55)

Related documents