Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

Converting sample code from WSE

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 01-24-2007   #1 (permalink)
Bill Henning
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 SpecsSystem Spec
Old 01-25-2007   #2 (permalink)
Mariano Omar Rodriguez
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 SpecsSystem Spec
 

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


Update your Vista Drivers Update Your Vista Drivers Now!!

Vistax64.com 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 2005-2008
Page generated in 0.27597 seconds with 10 queries