Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Why SilverLight Tool won't generate Service related ServiceClient?

$
0
0

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 :

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


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>