I'm trying to make a call to a remote WCF service from within an existing service.
I've added a Service Reference to the method I need to consume in the remote service, and use it as follows in this WebMethod of my own service:
[WebMethod(Description = "My local service."]
public RemoteService.ServiceResponse ServiceRequest(RemoteService.SendRequest myObject)
{
// Instance of remote service's method I'm
RemoteService.ServiceResponse SendResponse;
SendResponse = ServiceRequest(RemoteService.SendRequest)
return SendResponse;
}
My question, with the call to the ServiceRequest web method of the remote service, am I actually calling the remote service?! Or, am I just calling my own local instance of the remote service's ServiceRequest method?
If I'm right about my being wrong, what would be the proper way to do what I need to do, to kind of act I guess as a passthrough or proxy to pass requests and responses to and from my service and the remote service?