.NET Framework Bookmark and Share   
 index > ASMX Web Services and XML Serialization > Web services in Win Forms application.
 

Web services in Win Forms application.

I've created a web service for my company's website, and it is working fine, in a live environment.

I am trying to incorporate that same web service into a new Win Forms project, and I am able to add the web reference to the project fine, and browse through all the web methods and see that it's all there using the object viewer, but when I try and run one of the methods in the web service I get an error, "SOAP header Action was not understood."

Specifically, I am trying to fill a DataTable by using a method on the web service which return a DataTable. It works fine on the website. After adding the web reference and making sure it's all there, I tried using the same code as I am using for the website:

DataTable dt = new nisWebService.Quote().GetLifeQuote("10000", "CA", 33, true, 0, false, 50000, true, 50, true);

this throws the following exception:SOAP header Action was not understood.

One thing that I did notice, was that in the website, instead of using nisWebService.Quote, it uses nisWebService.QuoteClient. I'm not sure where the "Client" part comes in, maybe it's something visual studio express web edition adds on its own?

As I mentioned, the website is built with Visual studio 2008 express web edition, and the win forms application is being built with visual studio 2008 express c# edition.

Thanks for any help or direction you can provide, this has got me pulling out hair :)

Edit: I was also curious as to why the webservice automatically created method parameters like "IsSoandsoSpecified."

Kevin Humfreville
  • Edited byKHumfreville Thursday, August 06, 2009 5:38 PM
  • Moved byLinda LiuMSFTFriday, August 07, 2009 2:40 AMWinform related issue. (From:Windows Presentation Foundation (WPF))
  • Edited byKHumfreville Thursday, August 06, 2009 5:41 PM
  • Moved byKira QianMSFTMonday, August 10, 2009 2:45 AMMore relate to Web service, not winform data control problem (From:Windows Forms General)
  •  
KHumfreville
Are you using an ASMX web service or a WCF web service?

Thanks,
Erica
Erica Mohler - MSFT
Erica Mohler - MSFT

You can use google to search for other answers

Custom Search

More Threads

• WebService Proxy generated with earlier Framework version cannot connect to WebService written with later one.
• Ixmlserialization interface????
• Problem building C# Client consuming Java Web Service
• WSE3.0 policycache.config
• Testing Webservice on IIS with Postgre Database
• Problems about using the password recovery function in ASP.NET
• Pass file stream between projects
• XML Serialize Generic List Subclass Content Element Name
• SoapHttpClientProtocol and Custom Attribute modification
• Why am I getting OutOfMemory Exceptions???