Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - Converting sample code from WSE

 
 
Old 01-24-2007   #1 (permalink)
Bill Henning


 
 

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 SpecsSystem Spec
Old 01-25-2007   #2 (permalink)
Mariano Omar Rodriguez


 
 

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 SpecsSystem Spec
 

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


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46