Thing is that according to the WSDL file, the array isn't required as it has
minOccurs =0.
The proxy generated by the 2002 version of sproxy allowed a null array to be
passed and converted it correctly to an XML nil which became null again when
the ASMX file processed it.
If I pass a zero length array to the 2003 proxy, it generates an assertion
but the data still successfully goes to the web service so the 2003 version
of atlsoap.h does support zero length and null arrays. Just code in the
proxy that disallows.
I could manually remove the checks for the null arrays but this would cause
problems within my team as if they have to regenerate the proxy for some
reason, they may not remember/know to make the changes to the generated
code.
Any ideas of a way around this?
Mark
> Hi,
>
[quoted text clipped - 18 lines]
> >Message-ID: <#TM2$a51EHA.1408@TK2MSFTNGP10.phx.gbl>
> >Newsgroups:
microsoft.public.dotnet.framework.aspnet.webservices,microsoft.public.vc.atl
> ,microsoft.public.vc.utilities,microsoft.public.webservices
> >NNTP-Posting-Host: adsl-21-105.swiftdsl.com.au 218.214.21.105
> >Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
> phx.gbl
> >Xref: cpmsftngxa10.phx.gbl microsoft.public.vc.atl:65264
[quoted text clipped - 66 lines]
> >
> >Mark
Mark Sztainbok - 01 Dec 2004 22:21 GMT
Another problem is that when I do a Rebuild on the project, it regenerates
the proxy using sproxy and overwrites any changes that I've made...
Mark
> Thing is that according to the WSDL file, the array isn't required as it has
> minOccurs =0.
[quoted text clipped - 39 lines]
> > >Message-ID: <#TM2$a51EHA.1408@TK2MSFTNGP10.phx.gbl>
> > >Newsgroups:
microsoft.public.dotnet.framework.aspnet.webservices,microsoft.public.vc.atl
> > ,microsoft.public.vc.utilities,microsoft.public.webservices
> > >NNTP-Posting-Host: adsl-21-105.swiftdsl.com.au 218.214.21.105
> > >Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
> > phx.gbl
> > >Xref: cpmsftngxa10.phx.gbl microsoft.public.vc.atl:65264
[quoted text clipped - 68 lines]
> > >
> > >Mark
Dan Rogers - 01 Dec 2004 23:31 GMT
Some issues here. A "nill" in XML is not the same thing as not passing the
element since on the wire it turns into "<fooElement nill="true"/> instead
of not being expressed. Have you considered a less cryptic interface - I
was not able to figure out why you would want to process a nothing? If you
really mean to make it an optional processing element, try encapsulating
the arguments here into a type on it's own, and then making that type the
argument.
I think you are stumbling on some of the cross platform/language issues
that you'll encounter with this kind of interface. I do know that the
sproxy tool does what it does, so we can't change that. To me, I think
there is a big difference between a nill argument and a null pointer - and
since there aren't really pointers in the CLR, I think that this is a
work-around for the differences between the languages ... it seems to be
saying "you must pass a pointer.".
Sorry I am not of more help here.
Dan
--------------------
>From: "Mark Sztainbok" <sz@myretsu.com>
>References: <#TM2$a51EHA.1408@TK2MSFTNGP10.phx.gbl>
<2KBsU891EHA.2732@cpmsftngxa10.phx.gbl>
>Subject: Re: C# web service and sproxy generated proxy problem
>Date: Thu, 2 Dec 2004 08:59:03 +1100
[quoted text clipped - 7 lines]
>NNTP-Posting-Host: ext58.myretsu.com 203.62.151.58
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
.phx.gbl
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:26964
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
[quoted text clipped - 120 lines]
>> >
>> >Mark
Mark Sztainbok - 02 Dec 2004 01:24 GMT
I've done a diff between the source of atlsoap.h in VS .NET 2002 and 2003
and also done one of the generated proxy and there is minimal differences
between the 2 and the only change in the function calls is the extra NULL
checks at the beginning.
The code was interacting perfectly with the ASP.NET web service when it was
compiled with VC++ 2002 so why did they make the change in VC++ 2003 as it
breaks code that previously worked?????
Anyway, I changed the code to use a C# wrapper struct that simply contains
the array as suggested and sproxy allows me to pass the array as NULL and
works so looks like I have a solution. Just annoying that I had to do this.
Mark
> Some issues here. A "nill" in XML is not the same thing as not passing the
> element since on the wire it turns into "<fooElement nill="true"/> instead
[quoted text clipped - 30 lines]
> >NNTP-Posting-Host: ext58.myretsu.com 203.62.151.58
> >Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
> phx.gbl
> >Xref: cpmsftngxa10.phx.gbl
[quoted text clipped - 128 lines]
> >> >
> >> >Mark