Multi-Endpoints

Topics: Service Factory Modeling Edition Forum
Apr 14, 2009 at 2:26 PM
Hopefully you can shed some light on my confusion.

In the Host Model I have defined 2 different Endpoints for a Service
1) Name           : EndpointX509
    Address        : X509
    Binding Type : basicHttpBinding
2) Name           : EndpointSQLServer
    Address        : SQLServer
    Binding Type : basicHttpBinding

Also In the Host Model created 2 different Proxies, one for each Endpoint
1) Name     : HouseManagementProxyX509
    Endpoint : EndpointX509
2) Name     : HouseManagementProxySQLServer
    Endpoint : EndpointSQLServer

I then created the following directories under http://localhost:15277/RFG.House.Svc.WCF.Host/
1) X509
2) SQLServer

I then Generated the service, Build Web Site, View in Browser
Next I go to generate the Proxies in the Host Model.

1) I select HouseManagementProxyX509 and Click Generate Proxy and then get the following Error:
The recipe 'Add WCF Service Reference' (CreateWCFClientProxy) throw an exception while executing the action 'UpdateClientConfig'.
Error description: There was an error downloading 'http://localhost:15277/RFG.House.Svc.WCF.Host/HouseManagement.svc/X509'..

2)  I select HouseManagementProxySQLServerand Click Generate Proxy and then get the following Error:
The recipe 'Add WCF Service Reference' (CreateWCFClientProxy) throw an exception while executing the action 'UpdateClientConfig'.
Error description: There was an error downloading 'http://localhost:15277/RFG.House.Svc.WCF.Host/HouseManagement.svc/SQLServer'..

and of course nothing gets written to the app.config file because proxy generation has failed.

What am I missing or still need to do???

Thanks



Developer
Apr 14, 2009 at 10:20 PM
Simply make sure that you have both services running before executing the proxy generation.
Apr 14, 2009 at 10:24 PM
There is only one service with two different Endpoints.
I have Built the Web Site with menu - Build Web Site
Then from menu - View in Browser
So web service is running.

Then try to generate Proxy and get the Errors.
The Proxy files in the Clien project are getting generated but the app.config file is not getting populated.
And getting that Error.
Developer
Apr 15, 2009 at 2:05 AM
This is a known issue in WSSF so you may need to generate the proxy using the built-in "Add Service Reference" menu option in your client project.

Thanks,
Hernan
Apr 16, 2009 at 3:12 PM
Got it to work, however. just to be clear.
WSSF - Modeling edition has the following bug/limitation:

When using Host Model/Host Explorer and a service that has more than one Endpoint,
which means at least one of the Endpoints has a non-empty Address property because it must to be a "Valid Model" or would get error
when "Validate Model" -> Error 88 The ServiceReference 'HouseManagement' contains more that one Endpoint with an empty address,
the developer can no longer use the Host Model/Host Explorer to "Generate Proxy" because the WSSF Modeling edition is not able to properly
handle the "Address" property value when attempting to generate the Proxy. An error is thrown:
The recipe 'Add WCF Service Reference' (CreateWCFClientProxy) throw an exception while executing the action 'UpdateClientConfig'.
Error description: There was an error downloading 'http://localhost:15277/RFG.House.Svc.WCF.Host/HouseManagement.svc/X509'.
(where X509 is the value of the Address property)

The developer must go to "Solution Explorer" to the "Client" project and right click "Service References" folder to get menu and choose
Add Service Reference...
Type in the Address of the running Web Service "http://localhost:15277/RFG.House.Svc.WCF.Host/HouseManagement.svc" click "Go" button.
Type in Namespace value "HouseManagementProxy" and Click "OK" button.

The proxy files is generated and the app.config file is updated to include all Endpoints defined in the Service.

Is this limitation/bug going to be fixed in next version of Modeling Edition?

Another thing I noticed when going through this exercise was that if I tried creating Proxy iin Host Model/Model Explorer that a Proxy could only
be associated with a single Endpoint and NOT all the Endpoints that were defined. Therefore a different Proxy would need to be created for every Endpoint. This seems wrong considering the above solution allows all Endpoints for a service to be associated with a single Proxy.
Is single Proxy with Multi-Endpoint association being considered in next version of Modeling Edition?

Thanks


defined in the service.

Developer
Apr 16, 2009 at 5:44 PM
Both of them should be addressed on the next version.
I just posted this issue in the Issue Tracker section.

Thanks,
Hernan