Great explanation Mork,
Thanks for your knowledge sharing :-)
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "Mork" <da*****@gmail.com>
Newsgroups: microsoft.public.dotnet.framework.webservices
Subject: Re: How to diagnose SoapHttpClientProtocol.Invoke() failures
Date: 5 Dec 2005 09:44:17 -0800
Organization:
http://groups.google.com
Lines: 32
Message-ID: <11*********************@g14g2000cwa.googlegroups. com>
References: <ui**************@TK2MSFTNGP11.phx.gbl>
<11**********************@z14g2000cwz.googlegroups .com>
<uK**************@TK2MSFTNGP15.phx.gbl>
<OK**************@TK2MSFTNGXA02.phx.gbl>
<O#*************@TK2MSFTNGP12.phx.gbl>
NNTP-Posting-Host: 192.28.2.17
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1133804662 14839 127.0.0.1 (5 Dec 2005 17:44:22
GMT)
X-Complaints-To:
gr**********@google.com
NNTP-Posting-Date: Mon, 5 Dec 2005 17:44:22 +0000 (UTC)
In-Reply-To: <O#*************@TK2MSFTNGP12.phx.gbl>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 us-ecdn-mn-stpinet243 (NetCache NetApp/6.0.1P2)
Complaints-To:
gr**********@google.com
Injection-Info: g14g2000cwa.googlegroups.com; posting-host=192.28.2.17;
posting-account=PaTdRg0AAADA36dFZ_8Q2VJvudkD0iVm
Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
ews.com!postnews.google.com!g14g2000cwa.googlegrou ps.com!not-for-mail
microsoft.public.dotnet.framework.webservices:1294 1
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Bob,
The problem was that the XML returned by their service did not conform
to their schema. In their schema (as of last Friday), the type
"Protocol" was defined in the "urn:uddi-aaci-org:protocols" namespace
and (*this is the important part*) the schema did not specify
"elementFormDefault" (therefore elementFormDefault was unqualified).
An "elementFormDefault" value of qualified means that an unqualified
element is in the default namespace defined on an ancestor. If it is
"unqualified" then an unqualified element is in the empty namespace
(xmlns=""). The default is "unqualified".
They returned a the following: "<Protocol>...</Protocol>". This is the
same as this: "<Protocol xmlns=''>...</Protocol>". Their schema said
that you should expect this: "<Protocol
xmlns='urn:uddi-aaci-org:protocols'>...</Protocol>". The processor does
not assume this unqualified "Protocol" element is in the default
namespace of 'urn:uddi-aaci-org:protocols' defined on
getProtocolsResult b/c of the elementFormDefault of unqualified.
Therefore, the proxy class was correct to give you null meaning that
there were no urn:uddi-aaci-org:protocols#Protocol elements in the
result XML. No bug.
I notice today that they've since fixed the problem in the XML schema
by adding elementFormDefault="qualified" so if you regenerate your
proxy ("Update Web Reference") in VS 2005 it should work beautifully
for you.
Cheers,
~Mork