![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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) |
| Guest | 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 | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [ann] code sample to convert html to vb or vbs... | mr_unreliable | VB Script | 0 | 07-07-2008 11:55 AM |
| Embed images in email powershell code sample | Matt Duguid | PowerShell | 4 | 05-08-2008 07:06 AM |
| Need specific WCF code sample | Gregory Gadow | .NET General | 2 | 04-21-2008 09:07 PM |
| Efficiency in my sample code | Pete Zerger | PowerShell | 6 | 03-23-2008 02:59 PM |
| Sample Music | Travis King | Vista General | 4 | 06-11-2007 10:31 AM |