Tiếp theo, tạo ra các ràng buộc đối với hai lỗi. Chọn các ràng buộc và bấm vào nút "Tạo Nội dung đóng" trong cửa sổ Properties: Chọn nó. Nó đại diện cho các ràng buộc Kiểm tra "Ghi đè lên thông tin hiện có ràng buộc" và sau đó bấm vào nút "Finish": | Chapter 8 Invoking lengthy operations 133 background thread created by the web service can send the result to that URL. This is very much like having a From address or Reply-To address in an email. This is called WS-Addressing 2 When sending the SOAP message add a header entry to tell the reply-to URL. 1 Pick a random port say 3344 and listen on it c Send the real result to http localhost 3344 However there is still a problem. If the client sends multiple requests to the web service or to different web services if it opens a new port for each request then it will use a lot of ports and will waste a lot of resources. Therefore it will open a single port only and let a single background thread listening on it 134 Chapter 8 Invoking lengthy operations 3 Send the request 2 Always listen on a single port 6060 by default However if multiple requests were sent then multiple responses will arrive. Then in step c above how can the background thread tell the response is for which request To solve this problem when sending the request the client will generate a unique message ID . m001 and include it in a header block see the diagram below . When the web service generates the response message it will copy the message ID m001 into the Relates-To header block. This way when the background thread receives the response it knows that it is the response for request m001 Chapter 8 Invoking lengthy operations 135 All these Reply-To Message-ID Relates-To header blocks are part of the WS-Addressing standard. Creating the WSDL for business registrations To implement this idea create a new project named ManualService as usual You may copy an old one. If so change the linked folder . Modify the WSDL file