NEW
Font size
WorksheetsHDV-1
Total questions: 75
Worksheet time: 38mins
Cho đoạn mã nguồn:
@Path("/orders")
public class OrderResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getOrders() {
// Get all orders from the database.
return Response.ok(orders).build();
}
@POST
@Consumes(MediaType.APPLICATION_JSON)
public Response createOrder(Order order) {
// Create a new order in the database.
return Response.ok().build();
}
@PUT
@Path("{id}")
@Consumes(MediaType.APPLICATION_JSON)
public Response updateOrder(@PathParam("id") long id, Order order) {
// Update the order with the given ID in the database.
return Response.ok().build();
}
@DELETE
@Path("{id}")
public Response deleteOrder(@PathParam("id") long id) {
// Delete the order with the given ID from the database.
return Response.ok().build();
}
}
Đường dẫn của phương thức createOrder() là gì?
Cho định nghĩa WSDL:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.example.com/onlinecharging" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="OnlineCharging" targetNamespace="http://www.example.com/onlinecharging">
<wsdl:types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://www.example.com/onlinecharging">
<xsd:element name="Customer">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CustomerId" type="xsd:string" minOccurs="1" />
<xsd:element name="CustomerName" type="xsd:string" minOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Charge">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CustomerId" type="xsd:string" minOccurs="1" />
<xsd:element name="Amount" type="xsd:double" minOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ChargeResult">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Status" type="xsd:string" minOccurs="1" />
<xsd:element name="Message" type="xsd:string" minOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="ChargeRequest">
<wsdl:part name="customer" element="tns:Customer" />
<wsdl:part name="charge" element="tns:Charge" />
</wsdl:message>
<wsdl:message name="ChargeResponse">
<wsdl:part name="result" element="tns:ChargeResult" />
</wsdl:message>
<wsdl:portType name="OnlineChargingPortType">
<wsdl:operation name="Charge">
<wsdl:input message="tns:ChargeRequest" />
<wsdl:output message="tns:ChargeResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="OnlineChargingBinding" type="tns:OnlineChargingPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Charge">
<soap:operation soapAction="http://www.example.com/onlinecharging/Charge" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="OnlineChargingService">
<wsdl:port name="OnlineChargingPort" binding="tns:OnlineChargingBinding">
<soap:address location="http://www.example.com/onlinecharging" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Đâu không phải là một phần tử đơn ?
