locked
SDK Implementation RRS feed

  • Question

  • User49523753 posted

    This might not be truly explained right but anyway here I go....I have an SDK that allows me to develop for a specific type of hardware that has a screen....the screen can then interact through web services to a server to display content on the screen.  The SDK is written for Visual Studio 2005 and is from Framework 2.0.  We want to update it a little and use MVC possibly.  Now I can follow the tutorial to get a skeleton project up and running, but the problem lies in the case where I need to add a web reference for a WSDL.  I understand that WSDL is old technology but I do not really want to rewrite that part of the SDK I would rather use an old technology then try to learn WCF....

    Now to the task at hand, I can successully add the WSDL to the project and it shows up under the folder Web References but I have Utility Classes that are part of the SDK.  I add those and the references they use to get to the Web Service do not work.  For example I name the web reference xxx.xxxservice and in my utility classes using xxx.xxxservice the xxxservice part says "the type or namespace 'xxxWebService' does not exist in the namespace 'xxx' (are you missing an assembly reference?)

    I get this same error if I create a web project or an mvc project, my question is do I "Have" to go WCF or can I stay with a WSDL and just reference it differently or am I doing something wrong?  Help!

    Thursday, March 21, 2013 9:16 AM

Answers

  • User-1662538993 posted

    Line 7:  using projectname.xxx.xxxWebService;

    Project name is the namespace name or try to use directly in the code instead of adding as using directive.

    Like in code whereever you use use projectname.xxx.xxxwebservice and try or xxx.xxxwebservice.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 21, 2013 3:17 PM

All replies

  • User-1662538993 posted

    Have you tried deleting the web reference and adding it one more time?

    Whatever you are explaining you do not require to go to wcf if you do not want to.

    You can still work with old service. Once you add web reference you should able to create client of that service and use any of the methods in you app.

    For Example - 

    You gave name of your web reference as service1 then -

    service1.client svc = new service1.client();

    svc.methodname

    Thursday, March 21, 2013 11:46 AM
  • User49523753 posted

    The SDK - says to do "using xxx.xxxWebService;"

    That I assume worked on Visual Studio 2005, when I try that in 2012 it doesn't like it and I have to use the namespace of my project as

    using projectname.xxx.xxxWebService;

     

    Just seems I am not doing something right.  So I don't need to create an ASMX file then just need to incorporate this WSDL through a web reference?

     

    Thursday, March 21, 2013 11:55 AM
  • User-1662538993 posted

    No. You can directly use that wsdl in your vs2012 by adding web reference or service reference.

    If you want to declare using then you can do it in your page where you are using that service by declaring in using block in .cs/vb file.

    Thursday, March 21, 2013 11:57 AM
  • User49523753 posted

    My WSDL is a Web reference not a service reference....

    Now I am confused, my project compiles...but when I try to run it on a web page I get....

    Compiler Error Message: CS0246: The type or namespace name 'projectname' could not be found (are you missing a using directive or an assembly reference?)

     

    Line 5:  using System.Linq;
    Line 6:  using System.Web;
    Line 7:  using projectname.xxx.xxxWebService;

    Thursday, March 21, 2013 1:34 PM
  • User-1662538993 posted

    Line 7:  using projectname.xxx.xxxWebService;

    Project name is the namespace name or try to use directly in the code instead of adding as using directive.

    Like in code whereever you use use projectname.xxx.xxxwebservice and try or xxx.xxxwebservice.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 21, 2013 3:17 PM