tailieunhanh - Building XML Web Services for the Microsoft .NET Platform phần 4
Nhớ lại rằng phương pháp OrderItem tiếp xúc với các dịch vụ Web Thương mại chấp nhận một tham số được gọi là khoản. Trong ví dụ trước, tôi xác định một loại được gọi là ProductID để xác định loại dữ liệu có thể được chứa trong phần tử mục. | xmlns http 2001 XMLSchema targetNamespace http somedomain Calculator schema -- Common result element for HTTP GET POST binding element name Result type int schema types -- Messages for HTTP GET POST-based Web service -- -- Note Previously defined messages omitted for clarity -- message name AddHttpMsgIn part name x type xsd string part name y type xsd string message message name AddHttpMsgOut part name result element s Result message message name SubtractHttpMsgIn part name x element xsd string part name y element xsd string message message name SubtractHttpMsgOut part name result element s Result message -- More definitions will go here. -- definitions The preceding WSDL document defines a new element of type int called Result that will be used to contain the result of the Add and Subtract methods returned to the client. This element is referenced by two new outbound messages one for each method. The document also defines new inbound messages for the Add and Subtract methods. The outbound messages define individual parts for each parameter. Since the name value pairs containing the parameters are not strongly typed the type of each part is defined as string. HTTP GET POST extension elements are contained within the http wsdl http namespace. The convention I follow throughout the remainder of this chapter is to associate references to the namespace using the http moniker. In a few scenarios HTTP GET POST bindings leverage the MIME extension elements. They are defined within the http wsdl mime namespace and referenced using the mime moniker. binding Element Binding 116 Extensibility elements added to the binding element provide information about how the parameters are encoded within the HTTP message. Extensibility elements are added to the bind operation input output and fault messages. The http binding element specifies whether the parameters are passed within the URL or within the body of the HTTP request The verb
đang nạp các trang xem trước