Bug 14260 - Why SilverLight Tool won't generate Service related ServiceClient?
Summary: Why SilverLight Tool won't generate Service related ServiceClient?
Status: RESOLVED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2013-08-27 03:24 UTC by Sreeni
Modified: 2014-07-28 17:31 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Sreeni 2013-08-27 03:24:19 UTC
Firstly, Thanks for all your replies.

I am asking this question related to SilverLight Tool by assuming that you worked with the SilverLight tool to generate the proxy client for consuming wcf services in MonoAndroid.

When I tried using the services Asynchronously. Here is my
Problem.

Q 1)
Why SilverLight Tool won't generate Service related ServiceClient?

Description:

Using SilverLight Tool. I tried getting Proxy Class and Config Files

I ran the follwing command in command prompt:

 C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Tools>SlSVcUtil.exe
http://192.168.4.800/GPFWebServices-GPFDEV/AdminService.svc/
/directory:"c:\Documents\MyFolder"

I got proxy class with the service name "AdminService.cs" and
ServiceRefernce.ClientConfig files.

After Adding the files to my client application.
--------------------------------------
In "AdminService.cs" (Proxy file)
-----------------------------------
namespace Gold.GPFWebServices
{
    using System.Runtime.Serialization;

    [System.Diagnostics.DebuggerStepThroughAttribute()]
   
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization",
"4.0.0.0")]
   
[System.Runtime.Serialization.DataContractAttribute(Name="WebServicesClient",
Namespace="http://schemas.datacontract.org/2004/07/Gold.GPFWebServices")]

public partial class WebServicesClient : object
{
 private string _userNameField;

 public string UName
        {
            get
            {
                return this._userNameField;
            }
            set
            {
                this._userNameField = value;
            }
        }}
}
and ClientConfig File with 
<configuration>
    <system.serviceModel>
        <bindings>
         <basicHttpBinding>
            <binding name="BasicHttpBinding_IAdminService"    
maxBufferSize="2147483647"
               maxReceivedMessageSize="2147483647">
                    <security mode="None" />
                </binding>
   </basicHttpBinding>
        </bindings>
 <client>
            <endpoint
address="http://192.168.4.800/GPFWebServices-GPFDEV/AdminService.svc/AdminService"
                binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IAdminService"
                contract="IAdminService" name="BasicHttpBinding_IAdminService"
/>
 </client>
</configuration>


-----------------------------------------------------
I followed the same procedure to generate Proxy for another service(i.e
GPFService)I got the same Client Proxy (like AdminService.cs)in the GPFService.cs File 
and ServiceReferences.ClientConfig File.

ServiceRefernce.ClientConfig file contains the info related the GPFService
binding and endpoint adress info....

Problem is with the Proxy Class which i am getting..

Actually i need to get
Gold.GPFWebServices.AdminService1Client.WebServiceClient  
and 
Gold.GPFWebServices.GPFServiceClient.WebServiceClient.

But why it's getting only Gold.GPFWebServices.WebServiceClient ? 

This is causing Ambiguity Error with the properites when i tried to add another
service (for eg:GPFService) to my Client Application in which also having the
same Properties (like UName,etc ..etc), By this i am limited to use only one
service at time.

ServicRefernce.ClientConfig 
And One More Question:

This is causing Ambiguity Error with the properites when i tried to add another service (for eg:GPFService) to my Client Application in which also having the same Properties (like UName,etc ..etc), By this i am limited to use only one service at time.

What's the wrong i am doing. Is there any other way to fix the problem. I am looking for response. If any sample applications provided will be appreciated.

And some more questions:

Q 2). How can i generate Proxy Client to all Services at a time with one ServiceRefernce.ClientConfig file, in which it contains all the services binding and endpoint information of all Services

Q 3) How can i read a ServicReference.ClientConfig File using C# in MonoAndroid Applicaiton, which helps to get the endpoint address?

Thanks in Advance

Sreeni
Comment 1 Jonathan Pryor 2014-07-28 17:31:51 UTC
The Silverlight tool is not supported.

System.Configuration is not supported.