WSO2 Governance Registry can be used as a SOA Registry to store artifacts such as WSDL, Schema and Policy. You can point to the WSO2 Governance Registry using Microsoft Visual Studio and build Web Service Clients using the .NET framework in a few easy steps. Read more to understand how to connect to WSO2 Governance Registry from Visual Studio to discover Web Services and build clients.
...
1. Launch Visual Studio and create a new Console Application
.
2. Right-click on the References
section and select Add Service Reference
.
3. Click on the Advanced
button on the Add Service Reference
dialog box.
4. In the Service Reference Settings
screen select Add Web Reference
.
5. In the Add Web Reference
dialog box, type the Management Console URL (in our example we have used https://localhost:9443/carbon
) and click the Go
button.
6. The WSO2 Governance Registry homepage opens within Visual Studio.
Note | ||
---|---|---|
| ||
A situation may occur in which Visual Studio displays an insecure connection message, requiring the user's confirmation to proceed. The WSO2 Governance Registry Management Console is based on HTTPS protocol, which is a combination of HTTP and SSL protocols. This protocol is generally used to encrypt the traffic from the client to server for security reasons. The certificate with which it works is used for encryption purposes only and does not verify the server's identity. So, when users try to access the WSO2 Governance Registry Management Console, they may receive a warning that they are trying to connect to an untrusted connection. In order to continue working with this certificate, you must "accept" the certificate before access to the site is permitted. Please note that an insecure connection warning may be displayed every time the server is accessed. This scenario is suitable for testing purposes or for running the program on a company's internal networks. But in cases where there is a need to provide an interface to the outside world, a company should obtain a certificate signed by a well-known CA. The role of a CA is to verify that the server accessed actually has the name by which it is accessed and that this server actually belongs to the given organization. |
7. Once you have established a connection to the WSO2 Governance Registry, you will be prompted for a "Username" and "Password." Type in default "admin" as the "Username" and "admin" as the "Password." Click "Sign-in."
8. This should bring up the bring up the home screen of the WSO2 Governance Registry Management Console.
Note | ||
---|---|---|
| ||
A situation may occur in which Visual Studio appears to hang while trying to search for Web Services. The embedded browser of Microsoft Visual Studio has been specifically designed to search for Web Services deployed on remote web sites. However, the process of searching can take longer than anticipated and can become frustrating to a user. If such happens, please click on the Visual Studio might also present you with error messages asking your consent on running scripts. Please click on Please note that you might have to repeat one or both of these steps while following the rest of these guidelines. |
9. Navigate to the WSDL List page and select the SimpleStockQuoteService.wsdl file to open it in the Resource Browser.
10. Expand the metadata section after the page has completely loaded.
11. Right-click on the HTTP
permalink and select Copy Shortcut
.
12. Replace the URL
by clicking on it to selecting it, then right-clicking and finally selecting Paste
.
13. Click to Go
button to open the WSDL within the embedded browser of Microsoft Visual Studio.
14. Visual Studio will present you with a security challenge when accessing the permalink requiring you to provide your credentials. Type in default "admin" as the "Username" and "admin" as the "Password." Click the OK
button.
...
Note | ||
---|---|---|
| ||
Microsoft Visual Studio will prompt you with a warning on your credentials being forwarded to the server via clear text. Click The WSO2 Governance Registry uses HTTP Basic Authentication between client and server when you are using HTTP and HTTPS permalinks. If it is a risk to provide your credentials to access these resources please consider granting anonymous read permissions to the WSDL resource and its dependencies. See Managing Role Permissions for more information on how grant |
15. Microsoft Visual Studio will now complete discovering the Web Service. Click the Add Reference
button to complete the operation.
16. The Web Reference
should now be added to your project in Microsoft Visual Studio.
17. Double-click on the name of the Web Reference to open it and start working with it in your .NET application. The name is WebReference in this case.
Info | ||
---|---|---|
| ||
You can repeat the same steps to add more Web Service clients. Please note that the same steps can be followed for projects of types other than |
Excerpt | ||
---|---|---|
| ||
General information about using Microsoft Visual Studio to discover Web Services on WSO2 Governance Registry and build clients. |