RE: WCF hosted in a webservice
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng [MSFT])
- Date: Fri, 11 Apr 2008 03:33:53 GMT
{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang2052\f0\fs20 Hi Bill,
\par
\par As for the additional "xxxSpecified" parameter, I think it is a webservice specific behavior for value type parameter/return value. For value type parameter in webservice, it support marking it as "nullable". However, since value type always contains a value, the .NET proxy generation will add an additional parameter for you to indicate whether this value has been set or not. You can try replace the "bool" type with another reference type such as string or a custom class .e .g.
\par
\par =================
\par [OperationContract]
\par
\par MyResult CanRunRef(string AppName, string Username, string Function);
\par .....................
\par \}
\par
\par
\par [DataContract]
\par public class MyResult
\par \{
\par [DataMember]
\par public bool CanRun;
\par \}
\par ================
\par
\par Then, the generated proxy method won't have that additional output parameter. For your scenario, I think you do not quite need to use it if the return value is always a valid/expected value. For more information about Nullable types in webservice, here is another form thread mentioned this:
\par
\par #Consuming WebService which returns NULL-values
\par http://bytes.com/forum/thread375805.html
\par
\par Sincerely,
\par
\par Steven Cheng
\par
\par Microsoft MSDN Online Support Lead
\par
\par
\par Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx
\par
\par ==================================================
\par Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.
\par
\par Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support
\par Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support
\par professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations
\par that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx.
\par ==================================================
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par \pard\li720 --------------------
\par Thread-Topic: WCF hosted in a webservice
\par thread-index: AcibJIPR/116RF3rRpymhXG08ZjkVQ==
\par X-WBNR-Posting-Host: 199.106.94.142
\par From: =?Utf-8?B?d2R1ZGVr?= <wdudek@xxxxxxxxxxxxxxxx>
\par Subject: WCF hosted in a webservice
\par Date: Thu, 10 Apr 2008 09:04:11 -0700
\par
\par I have a web service hosting a WCF library, which works fine but produced a
\par strange signature when interacting with vs 2005/2.0 clients. My method takes
\par 3 strings and returns a bool as below.
\par
\par bool CanRun(string appName, string userName, string function);
\par
\par However the auto generated proxy in 2005 looks like this
\par
\par void CanRun(string appName, string userName, string function, out bool
\par result, out bool resultSpecified);
\par
\par I unserstand the new result parameter, but what is the resultSpecified
\par parameter that was created? It looks like it is always the same as the result
\par parameter, although admittedly I haven't tested this very thouroughly yet?
\par I'm pushing for WCF in our organization and don't want to get caught not
\par haveing an explanation of what is occurring here.
\par
\par Thanks,
\par Bill
\par \pard
\par
\par }
- Follow-Ups:
- RE: WCF hosted in a webservice
- From: wdudek
- RE: WCF hosted in a webservice
- References:
- WCF hosted in a webservice
- From: wdudek
- WCF hosted in a webservice
- Prev by Date: Re: WCF Security mixed users
- Next by Date: non .NET data consumption on Client
- Previous by thread: WCF hosted in a webservice
- Next by thread: RE: WCF hosted in a webservice
- Index(es):
Relevant Pages
|
Loading