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