Creating proxy for using Webservice locally

Discussion in 'ASP .Net Web Services' started by Anitha, Jun 9, 2006.

  1. Anitha

    Anitha Guest

    i have developed a web service for converting temperatures in to Celsius and
    Fahrenheit. The web service is working fine.
    I want to use this web service in a web page and windows form locally .
    can anyone help me for this. please give the whole steps for doing this.

    I know i have to create a .dll file using WSDL and all other stuff.
    thanks and regards
     
    Anitha, Jun 9, 2006
    #1
    1. Advertising

  2. Anitha wrote:
    > i have developed a web service for converting temperatures in to Celsius and
    > Fahrenheit. The web service is working fine.
    > I want to use this web service in a web page and windows form locally .
    > can anyone help me for this. please give the whole steps for doing this.
    >
    > I know i have to create a .dll file using WSDL and all other stuff.


    You can generate the source code of a proxy class using e.g.
    wsdl.exe URLToWSDLDescriptionOfWebService
    Then you can compile that source code into a dll.
    If you use Visual Studio then it simplifies your work by allowing you to
    add a reference to the web service and doing the rest automatically.


    --

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jun 9, 2006
    #2
    1. Advertising

  3. Anitha

    Anitha Guest

    "Martin Honnen" wrote:

    >
    >
    > Anitha wrote:
    > > i have developed a web service for converting temperatures in to Celsius and
    > > Fahrenheit. The web service is working fine.
    > > I want to use this web service in a web page and windows form locally .
    > > can anyone help me for this. please give the whole steps for doing this.
    > >
    > > I know i have to create a .dll file using WSDL and all other stuff.

    >
    > You can generate the source code of a proxy class using e.g.
    > wsdl.exe URLToWSDLDescriptionOfWebService
    > Then you can compile that source code into a dll.
    > If you use Visual Studio then it simplifies your work by allowing you to
    > add a reference to the web service and doing the rest automatically.
    >
    >
    > --
    >
    > Martin Honnen --- MVP XML
    > http://JavaScript.FAQTs.com/
    >



    Hi Martin,
    I have created the proxy class using this
    wsdl.exe http://localhost/TempConversion/TempConversion.asmx?WSDL

    then this creates a .cs file called as TempConversion.cs
    this .cs file is created in c:/ directory..

    after this i am required to create a .bat file to convert source file into
    an assembly or dll.
    this part i am not getting. I unable to create a .dll file . can u please
    tell the steps to create a dll file and how to use this dll file in my
    ASP.Net page...
     
    Anitha, Jun 12, 2006
    #3
  4. Anitha

    Simon Hart Guest

    Anitha,

    You can use the command-line tool csc.exe ie:

    csc /out:TempConversion.dll /target:library TempConversion.cs

    Or as pointed out in a previous post, it is easier to right click "Web
    References" and navigate to your Web Service as VS.NET 2003 and 2005 will
    create
    the proxy class and compile it etc for you. However sometimes WSDL.exe is
    required when changing namespaces or if you want to crreate types can are
    easily added to
    multiple projects etc.

    As mentioned, if you want the type, then add the generated .cs file to a
    class library within VS.NET as it is soooo much easier than the method
    above. This all depends
    on your requirements though.

    Regards
    Simon.

    "Anitha" <> wrote in message
    news:...
    >
    >
    > "Martin Honnen" wrote:
    >
    >>
    >>
    >> Anitha wrote:
    >> > i have developed a web service for converting temperatures in to
    >> > Celsius and
    >> > Fahrenheit. The web service is working fine.
    >> > I want to use this web service in a web page and windows form locally .
    >> > can anyone help me for this. please give the whole steps for doing
    >> > this.
    >> >
    >> > I know i have to create a .dll file using WSDL and all other stuff.

    >>
    >> You can generate the source code of a proxy class using e.g.
    >> wsdl.exe URLToWSDLDescriptionOfWebService
    >> Then you can compile that source code into a dll.
    >> If you use Visual Studio then it simplifies your work by allowing you to
    >> add a reference to the web service and doing the rest automatically.
    >>
    >>
    >> --
    >>
    >> Martin Honnen --- MVP XML
    >> http://JavaScript.FAQTs.com/
    >>

    >
    >
    > Hi Martin,
    > I have created the proxy class using this
    > wsdl.exe http://localhost/TempConversion/TempConversion.asmx?WSDL
    >
    > then this creates a .cs file called as TempConversion.cs
    > this .cs file is created in c:/ directory..
    >
    > after this i am required to create a .bat file to convert source file into
    > an assembly or dll.
    > this part i am not getting. I unable to create a .dll file . can u please
    > tell the steps to create a dll file and how to use this dll file in my
    > ASP.Net page...
     
    Simon Hart, Jun 12, 2006
    #4
  5. Anitha

    Anitha Guest

    Hi Simon,
    Thanks for ur Reply,
    I have created the .dll file as u mentioned below. then i have placed that
    ..dll file in the bin directory of the asp.net page. say i have created an
    asp.net application called TempConversionClient. The page is
    TempConversionClienct.aspx.

    I have placed the TempConversion.dll file the bin directory of the
    TempConversionClient.

    The namespce is not show in the intellisence of the client project while
    trying to use the NameSpace " TempConversion"
    One more thing i have webservice name and the class name same for the
    webservice that i have created ..
    thanks.
    "Simon Hart" wrote:

    > Anitha,
    >
    > You can use the command-line tool csc.exe ie:
    >
    > csc /out:TempConversion.dll /target:library TempConversion.cs
    >
    > Or as pointed out in a previous post, it is easier to right click "Web
    > References" and navigate to your Web Service as VS.NET 2003 and 2005 will
    > create
    > the proxy class and compile it etc for you. However sometimes WSDL.exe is
    > required when changing namespaces or if you want to crreate types can are
    > easily added to
    > multiple projects etc.
    >
    > As mentioned, if you want the type, then add the generated .cs file to a
    > class library within VS.NET as it is soooo much easier than the method
    > above. This all depends
    > on your requirements though.
    >
    > Regards
    > Simon.
    >
    > "Anitha" <> wrote in message
    > news:...
    > >
    > >
    > > "Martin Honnen" wrote:
    > >
    > >>
    > >>
    > >> Anitha wrote:
    > >> > i have developed a web service for converting temperatures in to
    > >> > Celsius and
    > >> > Fahrenheit. The web service is working fine.
    > >> > I want to use this web service in a web page and windows form locally .
    > >> > can anyone help me for this. please give the whole steps for doing
    > >> > this.
    > >> >
    > >> > I know i have to create a .dll file using WSDL and all other stuff.
    > >>
    > >> You can generate the source code of a proxy class using e.g.
    > >> wsdl.exe URLToWSDLDescriptionOfWebService
    > >> Then you can compile that source code into a dll.
    > >> If you use Visual Studio then it simplifies your work by allowing you to
    > >> add a reference to the web service and doing the rest automatically.
    > >>
    > >>
    > >> --
    > >>
    > >> Martin Honnen --- MVP XML
    > >> http://JavaScript.FAQTs.com/
    > >>

    > >
    > >
    > > Hi Martin,
    > > I have created the proxy class using this
    > > wsdl.exe http://localhost/TempConversion/TempConversion.asmx?WSDL
    > >
    > > then this creates a .cs file called as TempConversion.cs
    > > this .cs file is created in c:/ directory..
    > >
    > > after this i am required to create a .bat file to convert source file into
    > > an assembly or dll.
    > > this part i am not getting. I unable to create a .dll file . can u please
    > > tell the steps to create a dll file and how to use this dll file in my
    > > ASP.Net page...

    >
    >
    >
     
    Anitha, Jun 13, 2006
    #5
  6. Anitha

    Simon Hart Guest

    You need to add the DLL you created to the "References" under your ASP.NET
    project. The class/namespace will then show in intelisense.

    Regards
    Simon.

    "Anitha" <> wrote in message
    news:...
    > Hi Simon,
    > Thanks for ur Reply,
    > I have created the .dll file as u mentioned below. then i have placed that
    > .dll file in the bin directory of the asp.net page. say i have created an
    > asp.net application called TempConversionClient. The page is
    > TempConversionClienct.aspx.
    >
    > I have placed the TempConversion.dll file the bin directory of the
    > TempConversionClient.
    >
    > The namespce is not show in the intellisence of the client project while
    > trying to use the NameSpace " TempConversion"
    > One more thing i have webservice name and the class name same for the
    > webservice that i have created ..
    > thanks.
    > "Simon Hart" wrote:
    >
    >> Anitha,
    >>
    >> You can use the command-line tool csc.exe ie:
    >>
    >> csc /out:TempConversion.dll /target:library TempConversion.cs
    >>
    >> Or as pointed out in a previous post, it is easier to right click "Web
    >> References" and navigate to your Web Service as VS.NET 2003 and 2005 will
    >> create
    >> the proxy class and compile it etc for you. However sometimes WSDL.exe is
    >> required when changing namespaces or if you want to crreate types can are
    >> easily added to
    >> multiple projects etc.
    >>
    >> As mentioned, if you want the type, then add the generated .cs file to a
    >> class library within VS.NET as it is soooo much easier than the method
    >> above. This all depends
    >> on your requirements though.
    >>
    >> Regards
    >> Simon.
    >>
    >> "Anitha" <> wrote in message
    >> news:...
    >> >
    >> >
    >> > "Martin Honnen" wrote:
    >> >
    >> >>
    >> >>
    >> >> Anitha wrote:
    >> >> > i have developed a web service for converting temperatures in to
    >> >> > Celsius and
    >> >> > Fahrenheit. The web service is working fine.
    >> >> > I want to use this web service in a web page and windows form
    >> >> > locally .
    >> >> > can anyone help me for this. please give the whole steps for doing
    >> >> > this.
    >> >> >
    >> >> > I know i have to create a .dll file using WSDL and all other stuff.
    >> >>
    >> >> You can generate the source code of a proxy class using e.g.
    >> >> wsdl.exe URLToWSDLDescriptionOfWebService
    >> >> Then you can compile that source code into a dll.
    >> >> If you use Visual Studio then it simplifies your work by allowing you
    >> >> to
    >> >> add a reference to the web service and doing the rest automatically.
    >> >>
    >> >>
    >> >> --
    >> >>
    >> >> Martin Honnen --- MVP XML
    >> >> http://JavaScript.FAQTs.com/
    >> >>
    >> >
    >> >
    >> > Hi Martin,
    >> > I have created the proxy class using this
    >> > wsdl.exe http://localhost/TempConversion/TempConversion.asmx?WSDL
    >> >
    >> > then this creates a .cs file called as TempConversion.cs
    >> > this .cs file is created in c:/ directory..
    >> >
    >> > after this i am required to create a .bat file to convert source file
    >> > into
    >> > an assembly or dll.
    >> > this part i am not getting. I unable to create a .dll file . can u
    >> > please
    >> > tell the steps to create a dll file and how to use this dll file in my
    >> > ASP.Net page...

    >>
    >>
    >>
     
    Simon Hart, Jun 19, 2006
    #6
  7. Anitha

    Anitha Guest

    Thanks Simon.
    I am able to o it.

    "Simon Hart" wrote:

    > You need to add the DLL you created to the "References" under your ASP.NET
    > project. The class/namespace will then show in intelisense.
    >
    > Regards
    > Simon.
    >
    > "Anitha" <> wrote in message
    > news:...
    > > Hi Simon,
    > > Thanks for ur Reply,
    > > I have created the .dll file as u mentioned below. then i have placed that
    > > .dll file in the bin directory of the asp.net page. say i have created an
    > > asp.net application called TempConversionClient. The page is
    > > TempConversionClienct.aspx.
    > >
    > > I have placed the TempConversion.dll file the bin directory of the
    > > TempConversionClient.
    > >
    > > The namespce is not show in the intellisence of the client project while
    > > trying to use the NameSpace " TempConversion"
    > > One more thing i have webservice name and the class name same for the
    > > webservice that i have created ..
    > > thanks.
    > > "Simon Hart" wrote:
    > >
    > >> Anitha,
    > >>
    > >> You can use the command-line tool csc.exe ie:
    > >>
    > >> csc /out:TempConversion.dll /target:library TempConversion.cs
    > >>
    > >> Or as pointed out in a previous post, it is easier to right click "Web
    > >> References" and navigate to your Web Service as VS.NET 2003 and 2005 will
    > >> create
    > >> the proxy class and compile it etc for you. However sometimes WSDL.exe is
    > >> required when changing namespaces or if you want to crreate types can are
    > >> easily added to
    > >> multiple projects etc.
    > >>
    > >> As mentioned, if you want the type, then add the generated .cs file to a
    > >> class library within VS.NET as it is soooo much easier than the method
    > >> above. This all depends
    > >> on your requirements though.
    > >>
    > >> Regards
    > >> Simon.
    > >>
    > >> "Anitha" <> wrote in message
    > >> news:...
    > >> >
    > >> >
    > >> > "Martin Honnen" wrote:
    > >> >
    > >> >>
    > >> >>
    > >> >> Anitha wrote:
    > >> >> > i have developed a web service for converting temperatures in to
    > >> >> > Celsius and
    > >> >> > Fahrenheit. The web service is working fine.
    > >> >> > I want to use this web service in a web page and windows form
    > >> >> > locally .
    > >> >> > can anyone help me for this. please give the whole steps for doing
    > >> >> > this.
    > >> >> >
    > >> >> > I know i have to create a .dll file using WSDL and all other stuff.
    > >> >>
    > >> >> You can generate the source code of a proxy class using e.g.
    > >> >> wsdl.exe URLToWSDLDescriptionOfWebService
    > >> >> Then you can compile that source code into a dll.
    > >> >> If you use Visual Studio then it simplifies your work by allowing you
    > >> >> to
    > >> >> add a reference to the web service and doing the rest automatically.
    > >> >>
    > >> >>
    > >> >> --
    > >> >>
    > >> >> Martin Honnen --- MVP XML
    > >> >> http://JavaScript.FAQTs.com/
    > >> >>
    > >> >
    > >> >
    > >> > Hi Martin,
    > >> > I have created the proxy class using this
    > >> > wsdl.exe http://localhost/TempConversion/TempConversion.asmx?WSDL
    > >> >
    > >> > then this creates a .cs file called as TempConversion.cs
    > >> > this .cs file is created in c:/ directory..
    > >> >
    > >> > after this i am required to create a .bat file to convert source file
    > >> > into
    > >> > an assembly or dll.
    > >> > this part i am not getting. I unable to create a .dll file . can u
    > >> > please
    > >> > tell the steps to create a dll file and how to use this dll file in my
    > >> > ASP.Net page...
    > >>
    > >>
    > >>

    >
    >
    >
     
    Anitha, Jun 19, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bthomasIDFG
    Replies:
    0
    Views:
    151
    bthomasIDFG
    Oct 12, 2005
  2. Madjid Nasiri

    Call a webservice with out using proxy class

    Madjid Nasiri, Oct 26, 2004, in forum: ASP .Net Web Services
    Replies:
    5
    Views:
    317
    Madjid Nasiri
    Nov 21, 2004
  3. Joydeep
    Replies:
    1
    Views:
    203
  4. andy

    How make webservice run locally in asp.net 2.0

    andy, Jan 2, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    187
  5. Roberto Giorgetti

    Error connection using webservice locally (3 webservice in balanci

    Roberto Giorgetti, Jun 13, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    212
    Roberto Giorgetti
    Jun 13, 2006
Loading...

Share This Page