Exam Code: 1Z0-862 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Java Enterprise Edition 5 Web Services Developer Certified Professional Exam
Certification Provider: Oracle
Free Today! Guaranteed Training- Pass 1Z0-862 Exam.

2021 May 1Z0-862 Study Guide Questions:

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


Q102. Which two statements are true about SOAP faults? (Choose two.)

A. A valid actorcode element must be returned.

B. The faultstring is a hashed value used to identify an actor.

C. The faultcode may use either standard or private codes.

D. The detail element is open content and application-specific.

E. The faultactor specifies the intermediary designated to correct SOAP errors.

Answer: CD


Q103. Click the Exhibit button.

***MISSING EXHIBIT***

<SOAP-ENV:Envelope xmlns:SOAPENV="

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

<SOAP-ENV:Header/>

<SOAP-ENV:Body>

<SOAP-ENV:Fault>

<faultcode>SOAP-ENV:Client</faultcode>

<faultstring>

Invalid Message

</faultstring>

<faultactor>http://flashnsizzle.com/order</faultactor>

<detail>

<PO:order xmlns:PO="http://flashnsizzle.com/orders/">

Incomplete order

</PO:order>

<PO:confirmation xmlns:PO="http://flashnsizzle.com/confirm">

Invalid address

</PO:confirmation>

</detail>

</SOAP-ENV:Fault>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

A developer is implementing a Java client for a Web service. Occasionally the Web service call fails unexpectedly, so the developer wants to print out the error messages being returned from the call. Which two code fragments retrieve the faultcode, faultstring, and faultactor from the message? (Choose two.)

A. try {

...

// business logic to access a Web service method ...

} catch (SOAPFaultException sfe) {

SOAPFault fault = sfe.getFault();

System.out.println("An error occurred:");

System.out.println("actor:"+fault.getFaultActor()); System.out.println("code:"+fault.getFaultCode()); System.out.println("message:"+fault.getFaultString()); } catch (Exception ex) {

ex.printStackTrace();

}

B. try {

...

// business logic to access a Web service method ...

} catch (SOAPFaultException sfe) {

SOAPFault fault = sfe.getFault();

FaultElement code = fault.getElementsByTagName("faultcode"); FaultElement string = fault.getElementsByTagName("faultstring"); FaultElement actor = fault.getElementsByTagName("faultactor"); System.out.println("An error occurred:"); System.out.println("actor:"+actor.getValue()); System.out.println("code:"+code.getValue());

System.out.println("message:"+actor.getValue()); } catch (Exception ex) {

ex.printStackTrace();

}

C. try {

...

// business logic to access a Web service method ...

} catch (SOAPFaultException sfe) {

SOAPFault fault = sfe.getFault();

NodeList code = fault.getElementsByTagName("faultcode"); NodeList string = fault.getElementsByTagName("faultstring"); NodeList actor = fault.getElementsByTagName("faultactor"); System.out.println("An error occurred:");

System.out.println("actor:"+ actor.item(0).getNodeValue()); System.out.println("code:"+ code.item(0).getNodeValue()); System.out.println("message:"+ string.item(0).getNodeValue()); } catch (Exception ex) {

ex.printStackTrace();

}

D. try {

...

// business logic to access a Web service method ...

} catch (SOAPFaultException sfe) {

SOAPFault fault = sfe.getFault();

Node code = fault.getElementsByTagName("faultcode"); Node string = fault.getElementsByTagName("faultstring"); Node actor = fault.getElementsByTagName("faultactor"); System.out.println("An error occurred:");

System.out.println("actor:"+actor.getNodeValue()); System.out.println("code:"+code.getNodeValue()); System.out.println("message:"+ string.getNodeValue()); } catch (Exception ex) {

ex.printStackTrace();

}

E. try {

...

// business logic to access a Web service method ...

} catch (SOAPFaultException sfe) {

SOAPFault fault = sfe.getFault();

System.out.println("An error occurred:");

System.out.println("actor:"+fault.getSOAPFaultActor()); System.out.println("code:"+fault.getSOAPFaultCode()); System.out.println("message:"+fault.getSOAPFaultString()); } catch (Exception ex) {

ex.printStackTrace();

}

Answer: AC


1Z0-862  free draindumps

Abreast of the times 1Z0-862 exam answers:

Q104. Which two statements are true about a UDDI registry? (Choose two.)

A. All services are interoperable.

B. Applications can perform case sensitive searches in the registry server.

C. Users must be authenticated.

D. It requires SOAP over HTTP.

E. UDDI tightly couples the Web service to the client so that the service can be used.

Answer: BD


Q105. Which three security technologies are included in WS-Security? (Choose three.)

A. security pattern injection

B. encryption

C. single sign-on

D. security tokens

E. digital signatures

Answer: BDE


Q106. A customer who desires to use a secure Web service sends a user name token to a Security Token Service (STS). The STS authenticates the client and returns a digitally signed SAML token. The customer system presents the SAML token to the service and is accepted as an authorized user for a request. Which statement is true?

A. This is an example of the Web Services specifications for SAML 1.0.

B. This authentication is handled by WS-Trust.

C. This scenario is the base case of WS-Security.

D. This is WS-ReliableMessaging viewed from the perspective of the secure system.

E. This is a case of the WS-SecurityPolicy being attached to a WSDL.

Answer: B


2passeasy.com

Pinpoint 1Z0-862 preparation exams:

Q107. A company is undergoing a massive security audit and they are examining how an application complies with the WS-Security specification for Web service message security standards. What are the three key standards combined by WS-Security? (Choose three.)

A. SOAP

B. JSSE

C. XML Encryption

D. JAX-WS

E. UDDI

F. XML Signature

Answer: ACF


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

</type>

</element>

</all>

</complexType>

Answer: B


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


Q110. A developer needs to implement stateful Web services for their new application by maintaining a session with the client application. Which two technologies should the developer use to implement Web services? (Choose two.)

A. EJB Endpoint

B. Servlet Endpoint

C. JSON

D. REST

E. SOAP

F. JAXP

Answer: BE