0

I need to code to a WCF service from my dev box but the vendor only gave one machine on our network (our test server) access to their service. I'm not sure how that was done, and I asked them and our internal IT dept to give my dev box access as well, but that hasn't happened, and it seems like it might not happen.

So, I'm wondering if it's possible to create a WCF proxy/relay on the test server that I can call from my dev box which will allow me to do this integration work.

I tried doing this via WCF Routing but when I added the service reference to the routing service I do not get the contract from the vendor. This link seemed useful (http://www.dotnetcurry.com/ShowArticle.aspx?ID=385) but when I downloaded the code it looks like the client app actually has service references to the services and not the router.

My problem boils down to that I have to code the integration work but I cannot add the service reference. If there is another way to do this I'm open for suggestions as well.

Daniel
  • 3
  • 2
  • 2
    Try using their wsdl file http://stackoverflow.com/questions/950150/how-to-use-a-wsdl-file-to-create-a-wcf-service-not-make-a-call – athabaska Oct 02 '13 at 11:49
  • If you have their WSDL, you could set up a "dummy" server using e.g. SoapUI that would behave as if there is a service that responds to your requests. – marc_s Oct 02 '13 at 11:53
  • This is silly, if they want you to write code that uses their service they should give you access to the service! At least a definition (the wsdl file). If not, can you write code on your test server. – Jocke Oct 02 '13 at 12:40
  • Thanks everyone for the comments. We tried the dummy server and it works nicely. – Daniel Oct 08 '13 at 07:03

1 Answers1

0

WCF router just routes messages. It does not act as a proxy itself. A client will still need to understand the service contract.

It's basically impossible to consume a service to which you don't have any kind of access to.

If you could get hold of the service interface definitions (operation and data contracts), even in some kind of formal documentation, then you could call the service using the WCF channel stack without needing to construct a proxy.

tom redfern
  • 30,562
  • 14
  • 91
  • 126
  • Thanks for the answer. I didn't realize that the WCF router is just a router and had hoped that the client could interact with the router as if it was the service. My goal would probably be achieved by creating a proxy service using the wsdl from the vendor. Thanks for the clarification. – Daniel Oct 08 '13 at 06:29