Created a simple WCF, how can I reference it?

1. I used VS2015 Community Edition to build a simple WCF using this link Create WCF

Namespace, if this could be the issue, for WCF code is  ARMSAPI

2. I have a VS2013 Website project. It's Web Forms. It's a project from about 6 yrs ago. I added a "Service Reference"
Added WCF
3. Folder looks like this. Note that it doesn't create a separate "Service References" folder.It puts it under the "App_WebReferences" folder. Maybe because this is VS2013 Website project?
Second Screenshot
4. I see this in Web config
        <binding name="InboundSoap" />
        <binding name="BasicHttpBinding_IARMSDirectMsg" />
        <binding name="InboundSoap12">
          <textMessageEncoding messageVersion="Soap12" />
          <httpTransport />
      <endpoint address="" binding="basicHttpBinding"
        bindingConfiguration="InboundSoap" contract="InterFaxInBound.InboundSoap"
        name="InboundSoap" />
      <endpoint address="" binding="customBinding"
        bindingConfiguration="InboundSoap12" contract="InterFaxInBound.InboundSoap"
        name="InboundSoap12" />
      <endpoint address="http://localhost:51582/ARMSDirectMsg.svc"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IARMSDirectMsg"
        contract="ServiceReference1ARMS.IARMSDirectMsg" name="BasicHttpBinding_IARMSDirectMsg" />

Open in new window

5.  I have a Web Form page and I want to reference the WCF but not sure how it's done. I tried these:

using ServiceRerence1ARMS;

Open in new window

  ServiceReference1ARMS t = new ServiceReference1ARMS(); 

Open in new window

I tried the namespace of the WCF code but don't get intellisense for it


Open in new window

What to do?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
The name that you put into the "Name" field of "Add Service Reference" is what becomes the namespace of your service. In this case:  ServiceRerence1ARMS. Underneath that namespace, look for a class whose name ends with "...Client". That is your proxy class. Create an instance of that, and you should be able to see the methods that your WCF defines.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CamilliaAuthor Commented:
1. I did a search for "ServiceRerence1ARMS" in the code and I don't see any Namespace for it.

2. Expanding the folder, I see this

I don't see a class ending with "Client"

3. The WCF is in VS2015 (doubt it makes a difference). It's a simple one

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace ARMSAPI
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IARMSDirectMsg" in both code and config file together.
    public interface IARMSDirectMsg
       // void DoWork();

        void Send();


Open in new window

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace ARMSAPI
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "ARMSDirectMsg" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select ARMSDirectMsg.svc or ARMSDirectMsg.svc.cs at the Solution Explorer and start debugging.
    public class ARMSDirectMsg : IARMSDirectMsg
        //public void DoWork()

        public String username { get; set; }
        public String password { get; set; }
        public String endpointURL { get; set; }

        public void Send()
        { ...

Open in new window

What else to do?
CamilliaAuthor Commented:
I don't see the namespace "ServiceReference1ARMS" in intellisense

käµfm³d 👽Commented:
So two things:

1. Your not gonna see the code file unless you highlight that folder and then click the "Show All Files" button on the Solution Explorer toolbar. Once you do, you should see a file named "Reference.cs".

a) If you see that file, and when you open it it is blank, then there was a problem generating the proxy class from the WSDL file. You'll have to debug that issue as it could be anything.

2. You've got a website project (I think). I haven't worked with those yet. I think it should be the same process, but I can't say with 100% certainty. Try what I said in #1 first. At least then you can see if there's an issue with the file.
CamilliaAuthor Commented:
It might be something with VS2013  and Website project. I don't see "Show All Files"

This link says to choose the project and I did that and still won't show up. Link

I did "Update Service Reference" as well.

It is what it is now. At least I know what needs to be done. I might have to upgrade this project to VS2015 (open the project in VS2015) and see it if works.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.