Jump to content

problems calling webservice

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Asaak

Asaak

    Newbie

  • Members
  • Pip
  • 1 posts
I am trying to use http://resultsservic...rvice.asmx?WSDL to check the results of euromillions every tuesday and friday. To do so, I included the webreference using vs2010 and name it Lottery. So far, so good. The problem is that when I try to instantiate the object using Lottery.LotteryResultsServiceSoapClient test = new Loteria.LotteryResultsServiceSoapClient(); it compiles but it generates and error on execution time. There are other 4 more constructors for the class but they involve some parameters I don't know how to use.

Please, can anybody help me??

Thanks a lot!

webservice -> LotteryResultsService Web Service

#2
kernelcoder

kernelcoder

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 288 posts
  • Location:Dhaka
  • Programming Language:C, Java, C++, C#, Visual Basic .NET
  • Learning:Objective-C, PHP, Python, Delphi/Object Pascal
Well, I make it working following steps...
  • Right click on your project --> 'Add Service Reference'
  • Click on the 'Advance' button on the 'Add Service Reference Wizard'
  • Click on the 'Add Web Reference' button 'Service Reference Settings' window
  • Put the web-service url in the 'URL' box and click on the '-->' button next to the box.
  • Wait few seconds to load the service description. Now click on the 'Add Reference' button.
Now use the web-service in your code following the code-segment.

ie.lottery.resultsservice.LotteryResultsService service = new ie.lottery.resultsservice.LotteryResultsService();
ie.lottery.resultsservice.RaffleResult result = service.GetCurrentRaffleResult();





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users