Groups | Blog | Home
all groups > dotnet web services > november 2006 >

dotnet web services : Null Web Service Request/Response


John Saunders
11/6/2006 11:37:46 PM
[quoted text, click to view]

You probably have a mismatch in the namespaces between the client and the
server.

Namespaces are critical in XML. The following two XML documents are totally
different:

<prefix:root xmlns:prefix="urn:one.namespace.com"/>

<prefix:root xmlns:prefix="urn:two.namespace.com"/>



If your server is expecting the second document and you send it the first,
it will receive null, since that's "how much" of the second document you
sent it!

John

Gramps
11/7/2006 12:00:00 AM
Hi,

I've generated a client proxy and web service stub using WSDL.exe.

All appears ok. The client proxy .cs is in the client app running in VS2005
and the web service stub is running in another instance of VS2005. Both
projects build and when debugging, brealpoints are hit.

When the client app is using instantiated client proxy objects, the response
object sent to web service 'arrives' empty. When the request object is sent
back from web service, it is empty back in the client application.

I can run exactly the same code but now add a 'web reference' to the web
service on localhost and re-type the web service, request and response
objects accordingly and this sees the request and response objects correctly
marshalled/serialized between the client and server apps.

I am new to web services but my understadning was that the proxy allowed for
ease of development and deployment without having to add a 'web reference'
in my client project and simply setting the URL between environments is all
that is required.

1) How do I get the proxy objects to marshall correctly?
2) If I must have a 'Web Reference', how is this dynamic in code/config for
easy switch between dev/test/prod environments?


thanks,

Simon

AddThis Social Bookmark Button