Hi,
hi****@cableone.net wrote:
Hello,
I am trying to learn about web services. I was able to get a working
VS 2005 web service and VS 2005 web service consumer application to
communicate. The service would return the passed in string parameter
and "Hello World", thus printing "myteststring Hello Word"
When I tried to use a Delphi 2006 win32 web service consumer for the
same service, the parameters were lost and it just returned "Hello
World". I first thought that there was something wrong with my Delphi
client, but when I tried to use another service made from .NET it
worked fine. Now I am thinking that my web service is at fault.
0. How should I begin troubleshooting this setup?
1. Is there a setting in VS/Delphi that could affect parameter
passing
2. How can I capture the SOAP requests into/outof the web service to
examine what is different between the clients
Thanks,
Bryan
Disclaimer: All information here is valid in the Framework 1.1, I am not
sure if it changed in 2.0.
In my experience, a typical case where parameters get lost is that you
use a RPC SOAP request with a Document SOAP Web Method, or the opposite.
SOAP comes in two flavours, RPC and Document. To enable a RPC Web
Method, you need the decoration attribute:
[SoapRpcMethod]
before the method declaration (where you place the [WebMethod]
attribute). Per default, web methods work in document mode in Visual Studio.
To debug the setup, a good idea is to observe the HTTP request/response,
where you should see the SOAP XML content. To do this, I use TCP Trace.
It's not very complicated to use, but you need to change the destination
port of your web service request, for example to 8080. Please refer to
TCP Trace documentation at
http://www.pocketsoap.com/tcpTrace/
This should help you to get on track.
Greetings,
Laurent