Question 01010101

What statements are true about the following WSDL operation:


<portType name="SubmitPurchaseOrderPortType">
    <operation name="SubmitPurchaseOrder">
        <input name="order" message="SubmitPurchaseOrderMessage"/>
    </operation>
</portType>

						

Options (select 2):

  1. This is a notification operation.

  2. This is a one-way operation.

  3. This is a two-way operation.

  4. JAX-WS implementation may NOT throw any checked exceptions.

  5. JAX-WS implementation may throw only unchecked exceptions.

  6. JAX-WS implementation may throw any exceptions.

Answer:

Correct options are 2 and 4.

WSDL has four transmission primitives that an endpoint can support. WSDL refers to these primitives as operations.

In one-way messaging, the client sends a message to a Web Service, but doesn't expect a reply message. This Message Exchange Pattern (MEP) is typically thought of as asynchronous messaging.

If an operation is declared with a single input but no output, it defines a one-way operation. By listing only an input message, the operation indicates that clients will send messages to the Web Service without expecting a response.

Unlike request-response operations, one-way operations MAY NOT specify fault elements and DO NOT generate fault messages. The messaging model is strictly unidirectional — faults cannot be sent back to the client.

Sources:

Web Services Description Language (WSDL) 1.1 - [http://www.w3.org/TR/wsdl#_one-way]