473,386 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

WCF hosted in a webservice

I have a web service hosting a WCF library, which works fine but produced a
strange signature when interacting with vs 2005/2.0 clients. My method takes
3 strings and returns a bool as below.

bool CanRun(string appName, string userName, string function);

However the auto generated proxy in 2005 looks like this

void CanRun(string appName, string userName, string function, out bool
result, out bool resultSpecified);

I unserstand the new result parameter, but what is the resultSpecified
parameter that was created? It looks like it is always the same as the result
parameter, although admittedly I haven't tested this very thouroughly yet?
I'm pushing for WCF in our organization and don't want to get caught not
haveing an explanation of what is occurring here.

Thanks,
Bill
Apr 10 '08 #1
1 2445
That's fine. Thanks for your response.

Have a good day!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
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:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

From: =?Utf-8?B?d2R1ZGVr?= <wd****@newsgroup.nospam>
References: <32**********************************@microsoft.co m>
<FU**************@TK2MSFTNGHUB02.phx.gbl>
Subject: RE: WCF hosted in a webservice
Date: Fri, 11 Apr 2008 07:42:01 -0700
Steven,

Thanks, I don't need to get rid of the parameter, just wanted to
understand what it was so I can explain to the people writing the client
apps
why they got it.

Thanks again.

"Steven Cheng [MSFT]" wrote:
Hi Bill,

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.

=================
[OperationContract]

MyResult CanRunRef(string AppName, string Username, string Function);
.....................
}
[DataContract]
public class MyResult
{
[DataMember]
public bool CanRun;
}
================

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:

#Consuming WebService which returns NULL-values
http://bytes.com/forum/thread375805.html

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
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:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
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/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
>
--------------------
Thread-Topic: WCF hosted in a webservice
thread-index: AcibJIPR/116RF3rRpymhXG08ZjkVQ==
X-WBNR-Posting-Host: 199.106.94.142
From: =?Utf-8?B?d2R1ZGVr?= <wd****@newsgroup.nospam>
Subject: WCF hosted in a webservice
Date: Thu, 10 Apr 2008 09:04:11 -0700

I have a web service hosting a WCF library, which works fine but produced
a
strange signature when interacting with vs 2005/2.0 clients. My method
takes
3 strings and returns a bool as below.

bool CanRun(string appName, string userName, string function);

However the auto generated proxy in 2005 looks like this

void CanRun(string appName, string userName, string function, out bool
result, out bool resultSpecified);

I unserstand the new result parameter, but what is the resultSpecified
parameter that was created? It looks like it is always the same as the
result
parameter, although admittedly I haven't tested this very thouroughly
yet?
I'm pushing for WCF in our organization and don't want to get caught not
haveing an explanation of what is occurring here.

Thanks,
Bill
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Dennis C. Drumm | last post by:
I would like to be able to update an xml file located on my hosted server from my local computer. The server requires a user name and password to access the web site for writing or updating...
5
by: Nate | last post by:
We are attempting to make a request to a web service (we will refer to it as XXXServices) hosted on a Web Logic server from a C# SOAP client. The server responds with a 401 Unauthorized error...
5
by: James | last post by:
Hi, I have built a Windows Form Control which is hosted in IE (for our Intranet). The form logs into a Web Service and retrieves information for display. However, because the web service is on a...
0
by: Jon Pope | last post by:
I'm using VS2005. Within a C# project, I'm attempting to add a web reference that points to a webservice that I'm hosting on my local development machine. I'm able to add the reference, and see...
3
by: Gary H | last post by:
Hi, If I were to write an application hosted webservice (ie a webservice that is contained wholly within the application) what sort of .NET technology would I use? I am writing an application...
6
by: scott | last post by:
what is the best way to send data to and query SQL 2005 server express edition db hosted on a dedicated server with ISP ? i need to query it directly from an application on my LAN (asp site on...
3
by: Arild Bakken | last post by:
Hi, I have written a webservice using WCF. Everything works fine and I can consume the webservice using wsdl, svcutil or visual studio as long as the application pool is running under...
1
by: aparna1212 | last post by:
We have developed a client for webservice in c++ using gSOAP. The client runs on AIX unix system. Webservice is SSL enabled & is hosted on windows IIs. We are using OpenSSL on AIX. While invoking the...
4
by: James | last post by:
Hi, I have just upgraded a user machine to Vista (our first) as a test. Unfortunately a couple of our apps are failing due to Vista... 1. One app that loads an assembly from an Intranet...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.