Re: C# web service and sproxy generated proxy problem
From: Dan Rogers (danro_at_microsoft.com)
Date: 12/01/04
- Next message: Dan Rogers: "Re: DataSet too Memory Intensive!"
- Previous message: Dan Rogers: "Re: How does the MSFT Web Service Proxy Generator figure out .NET object types?"
- In reply to: Mark Sztainbok: "Re: C# web service and sproxy generated proxy problem"
- Next in thread: Mark Sztainbok: "Re: C# web service and sproxy generated proxy problem"
- Reply: Mark Sztainbok: "Re: C# web service and sproxy generated proxy problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 01 Dec 2004 23:31:46 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
>Lines: 132
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
>Message-ID: <eabe7D$1EHA.2180@TK2MSFTNGP10.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
>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
>
>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
>
>"Dan Rogers" <danro@microsoft.com> wrote in message
>news:2KBsU891EHA.2732@cpmsftngxa10.phx.gbl...
>> Hi,
>>
>> I don't think it's valid to pass a null pointer for an array that is
>> required. An option you do have is to change the generated code to the
>> behaviors you desire.
>>
>> I hope this helps,
>>
>> Dan Rogers
>> Microsoft Corporation
>> --------------------
>> >From: "Mark Sztainbok" <sz@myretsu.com>
>> >Subject: C# web service and sproxy generated proxy problem
>> >Date: Wed, 1 Dec 2004 22:13:10 +1100
>> >Lines: 65
>> >X-Priority: 3
>> >X-MSMail-Priority: Normal
>> >X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
>> >X-RFC2646: Format=Flowed; Original
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>> >Message-ID: <#TM2$a51EHA.1408@TK2MSFTNGP10.phx.gbl>
>> >Newsgroups:
>>
>microsoft.public.dotnet.framework.aspnet.webservices,microsoft.public.vc.at
l
>> ,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!TK2MSFTNGP1
0
>> phx.gbl
>> >Xref: cpmsftngxa10.phx.gbl microsoft.public.vc.atl:65264
>> microsoft.public.vc.utilities:17001 microsoft.public.webservices:2570
>> microsoft.public.dotnet.framework.aspnet.webservices:26929
>> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>> >
>> >I have a C# web service for which I have generated a C++ proxy using
>> sproxy.
>> >I'm having a problem with the generated proxy and one of the methods of
>> the
>> >web service. The method has the following signature:
>> >public bool submitTemperatureData(String userId, String password, String
>> >consignmentGUID, String uid, ConfigurationData configuration,
>> >TemperatureData[] data, bool handheld, SignatureData[] signatureData)
>> >
>> >The problem I'm having is that sproxy generates a proxy with the
>following
>> >code which doesn't allow me to pass an null array for the data or
>> >signatureData parameters (it returns E_POINTER):
>> >
>> >emplate <typename TClient>
>> >
>> >inline HRESULT CExagoDataServiceT<TClient>::submitTemperatureData(
>> >
>> >BSTR userId,
>> >
>> >BSTR password,
>> >
>> >BSTR consignmentGUID,
>> >
>> >BSTR uid,
>> >
>> >ConfigurationData configuration,
>> >
>> >TemperatureData* data, int __data_nSizeIs,
>> >
>> >bool handheld,
>> >
>> >SignatureData* signatureData, int __signatureData_nSizeIs,
>> >
>> >bool* submitTemperatureDataResult
>> >
>> >)
>> >
>> >{
>> >
>> >if ( data == NULL )
>> >
>> >return E_POINTER;
>> >
>> >if ( signatureData == NULL )
>> >
>> >return E_POINTER;
>> >
>> >if ( submitTemperatureDataResult == NULL )
>> >
>> >return E_POINTER;
>> >
>> >
>> >
>> >This problem has only happened since I upgraded my Visual Studio .NET
>2002
>> >project to Visual Studio .NET 2003 so the behaviour is specific to the
>> >proxies generated by the 2003 version of sproxy.
>> >
>> >Has anyone else had this problem? If so, how did they fix it? Is there
>> >anyway to fix it without having to manually change the generated proxy
>> file?
>> >
>> >Any help would be greatly appreciated.
>> >
>> >Thanks,
>> >
>> >Mark
>> >
>> >
>> >
>>
>
>
>
- Next message: Dan Rogers: "Re: DataSet too Memory Intensive!"
- Previous message: Dan Rogers: "Re: How does the MSFT Web Service Proxy Generator figure out .NET object types?"
- In reply to: Mark Sztainbok: "Re: C# web service and sproxy generated proxy problem"
- Next in thread: Mark Sztainbok: "Re: C# web service and sproxy generated proxy problem"
- Reply: Mark Sztainbok: "Re: C# web service and sproxy generated proxy problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|