![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Converting sample code from WSE Hi all, I am trying to implement an Ohio tax rate finder web server from code that seemed to be written in WSE to WCF. I am a complete newbie with WSE and WCF and have only used regular old web services in the past so I'd really appreciate it if someone could tell me what to do to consume this web service using WCF from an ASP.NET 2.0 project. Here is the sample code from the State of Ohio, which assumes there is a web reference in your ASP.NET project that has WSE extensions: --- // Create new instance of web service reference using WSE OHFinderServiceWse finderService = new OHFinderServiceWse(); // Create authentication token UsernameToken tkn = new UsernameToken("[username]", "[password]", PasswordOption.SendPlainText); // Add authentication token to web service request finderService.RequestSoapContext.Security.Tokens.Add(tkn); // Create new date for method calls DateTime todayDate = new DateTime(); // Tax rate lookup by address... Finder.AddressReturn addressReturn = finderService.GetOHSalesTaxByAddress( "[address]", "[city]", "[state abbr]", "[postal code]", "US", [tax amount], todayDate, [true/false]); --- I would really appreciate any details you can provide on where I start. Thanks so much! Bill |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Converting sample code from WSE Check the following URL http://msdn2.microsoft.com/en-us/library/ms731075.aspx "Bill Henning" <no_spam@hotmail.com> wrote in message news:eurF%23CDQHHA.4244@TK2MSFTNGP04.phx.gbl... > Hi all, I am trying to implement an Ohio tax rate finder web server from > code that seemed to be written in WSE to WCF. I am a complete newbie with > WSE and WCF and have only used regular old web services in the past so I'd > really appreciate it if someone could tell me what to do to consume this > web service using WCF from an ASP.NET 2.0 project. > > Here is the sample code from the State of Ohio, which assumes there is a > web reference in your ASP.NET project that has WSE extensions: > --- > // Create new instance of web service reference using WSE > OHFinderServiceWse finderService = new OHFinderServiceWse(); > > // Create authentication token > UsernameToken tkn = new UsernameToken("[username]", "[password]", > PasswordOption.SendPlainText); > > // Add authentication token to web service request > finderService.RequestSoapContext.Security.Tokens.Add(tkn); > > // Create new date for method calls > DateTime todayDate = new DateTime(); > > // Tax rate lookup by address... > Finder.AddressReturn addressReturn = finderService.GetOHSalesTaxByAddress( > "[address]", "[city]", "[state abbr]", "[postal code]", "US", > [tax amount], todayDate, [true/false]); > --- > > I would really appreciate any details you can provide on where I start. > Thanks so much! > > Bill > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Script-based code sample library (HTA) | VB Script | |||
| Sample VFP or VB code for sending mails using Live Mail | Live Mail | |||
| [ann] code sample to convert html to vb or vbs... | VB Script | |||
| Need specific WCF code sample | .NET General | |||
| Efficiency in my sample code | PowerShell | |||