locked
Is there a WCF Service Library in this address? RRS feed

  • Question

  • User48651432 posted

    It's been a while since I've dealt with WCF, so please bear with me.

    I'm including some of the code.

    My question: is http://tracking.mysite.com/2012/06 a WCF service in this case? If it doesn't exist, should this run?

    I'm working in a silverlight application, and this is what the constructor looks like. I'm having trouble with the debugger, so I assume the List collection of <Monthly> is somehow related to the "Monthly" in Reference.cs:

    public LaunchedPerMonth()
    {        
       InitializeComponent();
       DashboardServiceSoapClient proxy = new DashboardServiceSoapClient();
       proxy.GetLaunchedCompleted += new EventHandler<GetLaunchedCompletedEventArgs>(proxy_GetLaunchedCompleted);
       proxy.GetLaunchedAsync(Status.Launched);
    }
    void proxy_GetLaunchedCompleted(object sender, GetLaunchedCompletedEventArgs e)
    {
       List<Monthly> resultList = e.Result.Cast<Monthly>().ToList();
    
       LineSeries Listing = this.FindName("Listing") as LineSeries;
       Listing.ItemsSource = resultList;
       ...
    }

    Reference.cs looks like this:

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Monthly", Namespace="http://tracking.mysite.com/2012/06")]
    public partial class NSBMonthly : object, System.ComponentModel.INotifyPropertyChanged {
        private string MonthField;
        ...
    }
    

    Thanks for the help.

    Tuesday, March 5, 2013 8:41 AM

Answers

  • User220959680 posted

    is http://tracking.mysite.com/2012/06 a WCF service in this case?

    No. It is DataContractAttribute.Namespace

    DashboardServiceSoapClient proxy = new DashboardServiceSoapClient();
       proxy.GetLaunchedCompleted += new EventHandler<GetLaunchedCompletedEventArgs>(proxy_GetLaunchedCompleted);
       proxy.GetLaunchedAsync(Status.Launched);

    Above code is creating service proxy and invoking the methods.

    check client configuration file for the service end point (contract). When the service reference is added to the client, visual studio automatically update generates proxy class and updates the client configuraiton file, check <ServiceModel> element.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 5, 2013 4:11 PM