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
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="InboundSoap" />
        <binding name="BasicHttpBinding_IARMSDirectMsg" />
      </basicHttpBinding>
      <customBinding>
        <binding name="InboundSoap12">
          <textMessageEncoding messageVersion="Soap12" />
          <httpTransport />
        </binding>
      </customBinding>
    </bindings>
    <client>
      <endpoint address="http://ws.interfax.net/inbound.asmx" binding="basicHttpBinding"
        bindingConfiguration="InboundSoap" contract="InterFaxInBound.InboundSoap"
        name="InboundSoap" />
      <endpoint address="http://ws.interfax.net/inbound.asmx" 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" />
    </client>
  </system.serviceModel>

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

ARMSAPI

Open in new window


What to do?
LVL 8
CamilliaAsked:
Who is Participating?
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.
0

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

Folder
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.
    [ServiceContract]
    public interface IARMSDirectMsg
    {
        [OperationContract]
       // 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?
0
CamilliaAuthor Commented:
I don't see the namespace "ServiceReference1ARMS" in intellisense

Screenshot
0
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.
0
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.

screenshot
0
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
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.