Results 1 to 2 of 2

Thread: [RESOLVED] Testing the WCF Client in the Web App.

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898

    Resolved [RESOLVED] Testing the WCF Client in the Web App.

    Thought I'd start a new thread as the existing one clouds this. I've decided to take a step back. I have my WCF Service library running in the IDE in the WCF Test Client. In my Web App. I have made a service reference to my running process.

    The problem I have is trying to expose the method that I want to call.

    The WCF program has a class called IRSService.cs :
    Code:
       public class IRSService : IRS
        {
           public void ProcessBorderaux()
            {.....
    and a second class called IIRSService.cs
    Code:
       [ServiceContract]
        public interface IRS
        {
            [OperationContract(IsInitiating=true)]
            void ProcessBorderaux();......
    in the WCF Test Client I can see my IRS Interface with the ProcessBorderaux() method attached.

    Back in my client code I have made a Reference to my service:
    Code:
    using Borderaux.wcfBorderauxIRSService;
    then Down in my code
    
    I would expect to  do:
    
    wcfBorderauxIRSService.IRS WCF = wcfBorderauxIRSService.IRSService(); 
                WCF.ProcessBorderaux();
    However, the IRSService is not being exposed at the above point How do I get a reference correctly so that I can run my method.
    I figured If I can get this far then I should be able to introduce the windows service

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898

    Re: Testing the WCF Client in the Web App.

    Ok, the way to expose the methods on the WCF interface is:

    Code:
                using (wcfBorderauxIRSService.RSClient WCF = new RSClient())
                {
                    WCF.ProcessBorderaux();
                }
    So I went back to basics and with my WCF Project running in the WCF test CLient via VS2010, with it running I can make a reference to this via my client app and successfully run the WCF service. If I stop the WCF Project, build this in the windows service project and deploy. As mentioned I can see the windows service running, but cannot make a reference to it from the client.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width