Why SilverLight Tool not generating ServiceClient related to WCF Service?

SreeniSreeni INMember
edited August 2013 in General

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/AdminService1.svc/
/directory:"c:\Documents\MyFolder"

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

After Adding the files to my client application.

In "AdminService1.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;
}
}
}

}

ClientConfig File :

<bindings
basicHttpBinding

binding name="BasicHttpBinding_IAdminService1" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
security mode="None"
binding
basicHttpBinding
bindings>

<client
endpoint
address="http://192.168.4.800/GPFWebServices-GPFDEV/AdminService1.svc/AdminService1"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IAdminService1"
contract="IAdminService" name="BasicHttpBinding_IAdminService1"

client>

I followed the same procedure to generate Proxy for another service(i.e
GPFService)I got the same Client Proxy in the GPFService.cs File like ABOVE
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.AdminServiceClient.WebServiceClient
and
Gold.GPFWebServices.GPFServiceClient.WebServiceClient.

But why it's getting only Gold.GPFWebServices.WebServiceClient ? for both the services

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 One More Question:
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

By Following above procedures we are getting ServiceRefernce.ClientConfig files for each service. Which is again Problem.

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

Sign In or Register to comment.