Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2007

Tip: Looking for answers? Try searching our database.

web methods returning boolean : always returns false

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ndrw_cheung@yahoo.ca - 27 Nov 2007 13:49 GMT
Hi, all. I have a created a web service with a web method that returns
a boolean (bool) value.

[WebMethod]
   public bool IsUser(String username)
{
....
}

When I tested it on the local server using the .asmx page, it returns
the appropriate value depending on the parameter passed in. However,
when I created some code to consume the web service and invokes the
web method, it always returns false regardless.

The webservice and the page that consumes it are running under .NET
2.0.

Any ideas why that's happening? How do I fix it?

Thanks in advance for your help.

 -Andrew
Cowboy (Gregory A. Beamer) - 28 Nov 2007 19:06 GMT
You also have to be sure any SOAP message you put together properly adheres
to the WSDL. Start by looking at the WSDL (contract) and you should be able
to see which elements you have set up incorrectly.

My suggestion, as it is one of the best ways to learn, is to download
Fiddler2 and examine the actual SOAP sent to the method. It will shine a bit
of light. There are equivalent tools that plug into both IE and FireFox, if
you prefer a tool that plugs into the browser. These tools are also a great
way to "cheat" and see where you are setting up your own SOAP calls
incorrectly.

Another help is setting up a test project with a web reference and ripping
through the proxy code created.

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************

| Think outside the box!

*************************************************
> Hi, all. I have a created a web service with a web method that returns
> a boolean (bool) value.
[quoted text clipped - 18 lines]
>
>  -Andrew

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.