I created a WCF service, now this WCF service should call the web service. I am doing this adding a web service service link to WCF and calling the web service method that I want to use.
An example shown below:
CalcWebReference.CalculatorSoapClient fct =
new CalcWebReference.CalculatorSoapClient();
int rq = fct.Add(q, r);
return rq;
Now this method, when I tried to call from the client, gives the following error
The server was unable to process the request due to an internal error. For more error information, either enable IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server to send client exception information or enable tracking in accordance with the Microsoft .NET Framework 3.0 SDK documentation and server trace log checking.
Thank you, I did what I said, but now I get the following error: "Could not find the default endpoint element that references the contract" CalcWebReference.CalculatorSoap "in the configuration section of the ServiceModel client. Perhaps this is because the configuration file is not found for your application, or because no endpoint element matching this contract can be found in the client element. "
Now I need to provide some endpoints in the WCF service or in the web service in order to get the function from the web service, and if so, how can I give it.
Please, help.
Hi,
CalcWebReference.CalculatorSoapClient refers to a web service, not to WCF. Below is the code written in WCF (sample code) that calls the web service: -
CalcWebReference.CalculatorSoapClient fct = new CalcWebReference.CalculatorSoapClient();
int rq = fct.Add(12, 10);
return rq;
- , ?