Calling WS Instance from separate instance

Feb 5, 2009 at 11:49 PM

I have a web service that will be deployed on geographically disparate machines.  One instance will have to forward a file onto another instance.  My problem is that when I create a web reference in the business logic layer to the instance on another machine, it doesn't generate the reference.cs the same way.  I don't get the service definition in the code.  For example,  when I make my first web reference from the client app, it's simple:

namespace.servicename service = new namespace.servicename();
Response response = service.operation(request);

BUT... when I create the service reference from within the business logic layer, I don't see the service in the reference, just the Contract, ContractChannel (both interfaces), and the ContractClient. I tried to take the reference.cs from my client app and use it as a static proxy but it seems to call the code on the same box.

Is this causing some sort of a circular reference to the business logic layer, even though I'm trying to call the same service on a different box?

Hope I've explained this well enough and any help would be appreciated.

Feb 5, 2009 at 11:56 PM
It just dawned on me to add another endpoint.  I'll try this and post back.
Feb 6, 2009 at 11:37 AM
Adding another endpoint and using that endpoint name in your proxy should solve the addressing issue.
Feb 7, 2009 at 12:09 AM
Here was the ultimate solution.  I was getting the "could not find endpoint in the client config" error.  Well, I was making the service reference in the Resource Access Solution Folder, more specifically, in a project that managed the various instances.  It was creating the binding and endpoint elements in the app config of that folder.  However, I had to copy and paste it into the web config of the web service.  Then it found the elements.  Remember, the web service itself was a client as it was calling a different instance of itself.

Thanks for the help.