Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Creating proxy for using Webservice locally

Reply
Thread Tools

Creating proxy for using Webservice locally

 
 
Anitha
Guest
Posts: n/a
 
      06-09-2006
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

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      06-09-2006


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/
 
Reply With Quote
 
 
 
 
Anitha
Guest
Posts: n/a
 
      06-12-2006


"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/Temp...sion.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...
 
Reply With Quote
 
Simon Hart
Guest
Posts: n/a
 
      06-12-2006
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:CE7BECE6-D58C-4180-BB11-...
>
>
> "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/Temp...sion.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...



 
Reply With Quote
 
Anitha
Guest
Posts: n/a
 
      06-13-2006
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:CE7BECE6-D58C-4180-BB11-...
> >
> >
> > "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/Temp...sion.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...

>
>
>

 
Reply With Quote
 
Simon Hart
Guest
Posts: n/a
 
      06-19-2006
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:ECDF26E3-52A1-4A57-888C-...
> 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:CE7BECE6-D58C-4180-BB11-...
>> >
>> >
>> > "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/Temp...sion.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...

>>
>>
>>



 
Reply With Quote
 
Anitha
Guest
Posts: n/a
 
      06-19-2006
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:ECDF26E3-52A1-4A57-888C-...
> > 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:CE7BECE6-D58C-4180-BB11-...
> >> >
> >> >
> >> > "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/Temp...sion.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...
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error connection using webservice locally (3 webservice in balanci Roberto Giorgetti ASP .Net Web Services 0 06-13-2006 06:40 PM
How make webservice run locally in asp.net 2.0 andy ASP .Net Web Services 0 01-02-2006 07:30 PM
Error creating Proxy Class for XMethods Currency Converter WebService. Joydeep ASP .Net Web Services 1 12-07-2005 10:36 AM
listbox losing multiple selections thru proxy, but not locally bthomasIDFG ASP .Net Web Controls 0 10-12-2005 12:01 AM
Call a webservice with out using proxy class Madjid Nasiri ASP .Net Web Services 5 11-21-2004 06:31 AM



Advertisments