Web Service Parameters Lost

H

hinsbr

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
 
L

Laurent Bugnion

Hi,

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top