Web Services software factory
Web service software factory (wssf) walkthrough 4: Creating managed hosts, deploying and testing WSDL
Keywords: Web Services software factory, service contracts, service implementation
In my blog, I have Part I, Part II, and Part III of this exercise. Read them before performing the following exercises.
In the previous walkthrough, we have determined our services, created data contracts and service contracts, and implemented services and programming.CodeEnd Point. In this section, we will use endpoints to create a complete hosting host.
In your Solution Explorer, right-click mycryptographyservice. Model and choose add-> new model. In the dialog box that opens, select host model merge to fill in modelname (cryptographyservicehostcontracts) and XML namespace (http://www.cnblogs.com/LiYunQi/), and then click Finish.
A new host design area is opened, as shown in.
The first thing we need to do is right-click the host model in the host Explorer window and select "Add new host application ".
This will create hostapplication1. Right-click and view properties. Change the name to "cryptographyservicews" and select "WCF extensions" in the Implementation Technology drop-down list box ". In the Implementation Project attribute. Expand the drop-down list and select mycrytographyservice. Host.
Return to the host Explorer window, right-click cryptographyservicews, and select Add new service reference ". This will create servicereference1.
Right-click servicereference1, select properties, and set its name to cryptservice. Set the attribute of enable metadata publishing to true. Click the ellipsis after service implementation type. In the displayed dialog box, select cryptservice.
Go back to the host explorer. Right click on cryptservice and choose "add
Return to the host Explorer window. Right-click cryptservice and choose add new endpoint ". Endpont1 is created. Right-click endpoint1, select properties, and change the name to crypt. The binding type attribute is set to basichttpbinding. In the address column, enter "Basic" (note that no double quotation marks are included ). You can also add other endpoints (nodes) to create many host servers for different terminal devices in the same way and code,
When you click cryptservice again in the host Explorer window, you can see some changes in the left area and initial status. Click Generate service. If your previous drills are correct, the host service is generated. If you cannot generate a service, it indicates that a problem occurs in a certain step of your drill operation. Please refer to this tutorial for troubleshooting. If you think the above operations are debatable, your comments and suggestions are welcome.
Now, if you go back to your Solution Explorer and browse to the tests folder, you will see the cryptservice. SVC file under the mycryptographyservice. hosts project.
If you right-click it and select View in browser, you should see the following page.
If you click the link provided on the Web page, you can see the WSDL service itself.
Now that your WCF Service has been completed, it is fully functional and can be called. In the last part of this walkthrough, we will create a C # console applicationProgram, Use our services and return the expected results.
Web service software factory (wssf) walkthrough 5: creating simple clients and testing call services