Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6717165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:49:13+00:00 2026-05-26T08:49:13+00:00

Ok I have written some basic generic webservices before but I have never tried

  • 0

Ok I have written some basic generic webservices before but I have never tried to consume a 3rd party one.
The one I am trying to consume is
http://opendap.co-ops.nos.noaa.gov/axis/webservices/predictions/wsdl/Predictions.wsdl

I am not getting any results back from this what so ever and cannot figure out why.
More odd is it is not even reaching PredictionsClient_getPredictionsAndMetadataCompleted when I put a break point in the code it doesn’t even reach it.
Any suggestions would be greatly appreciated

    public void Bouy(double meters)   
    {   
        PredictionService.Parameters PredictionParams = new PredictionService.Parameters();   
        PredictionService.PredictionsPortTypeClient PredictionsClient = new PredictionService.PredictionsPortTypeClient();   

        GeoCoordinateWatcher gc = new GeoCoordinateWatcher(GeoPositionAccuracy.Default);   
        //gc.Position.Location.Latitude, gc.Position.Location.Longitude   
        GeoCoordinate myLocation = new GeoCoordinate(27.931631,-82.802582);   


        foreach (var bl in BouyLocation.GetAll())   
        {    
            GeoCoordinate otherLocation = new GeoCoordinate(bl.Lat, bl.Lon);   

                PredictionParams.beginDate = DateTime.Now.ToString("yyyyMMdd");   
                PredictionParams.endDate = DateTime.Now.AddDays(1.0).ToString("yyyyMMdd");   
                PredictionParams.stationId = bl.LocationID;   
                PredictionParams.timeZone = 0;   
                PredictionParams.unit = 1;   
                PredictionParams.dataInterval = 6;   
                PredictionsClient.getPredictionsAndMetadataCompleted += new EventHandler<PredictionService.getPredictionsAndMetadataCompletedEventArgs>(PredictionsClient_getPredictionsAndMetadataCompleted);   

                PredictionsClient.getPredictionsAndMetadataAsync(PredictionParams);   


            double mymeters = myLocation.GetDistanceTo(otherLocation);   
            if (mymeters < meters)   
            {   
                TextBlock DynTextBlock = new TextBlock   
                {   
                    Name = "Appearance" + bl.LocationID,   
                    Text = bl.LocationName + PredictionResult,   
                    TextWrapping = System.Windows.TextWrapping.Wrap,   
                    Margin = new Thickness(12, -6, 12, 0),   
                    Style = (Style)Resources["PhoneTextSubtleStyle"]   

                };   

                DynamicAppearance.Children.Add(DynTextBlock);   
                this.nearByLocations.Add(new BouyLocationModel() { LocationName = bl.LocationName, LocationID = bl.LocationID, Lat = bl.Lat, Lon = bl.Lon });   
            }   
        }   
        var test = nearByLocations;   
    }   

    void PredictionsClient_getPredictionsAndMetadataCompleted(object sender, PredictionService.getPredictionsAndMetadataCompletedEventArgs e)   
    {   
        string err = e.Error.ToString();   

        PredictionResult = e.Result.ToString();   
    }  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:49:14+00:00Added an answer on May 26, 2026 at 8:49 am

    Loooking at the code you have here I think that you have used the importing of a ServiceReference to auto build the classes for you?

    Unfortunately I have found that this is rather temperamental on WP7 and the only way I actually got it to work was when I connected it to a Microsoft WCF service. Connecting to anything else just doesn’t work.

    If you do google searches there are various pages talking about the fact it doesn’t work and ways around it (which I couldn’t get to work).

    However, there are ways around it but it isn’t as simple as the auto-generated stuff. Basically you do things manually.

    Although there are other ways to manually create the web service what I did was follow the information in the following which worked well: http://zetitle.wordpress.com/2010/10/14/using-reactive-extensions-with-webrequest/

    You will need to parse the response yourself but XML to LINQ works really well for this.

    Hope that helps, or maybe someone will have the solution as it is something I am interested in knowing how to get working too

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written some basic c++ programs in one of my classes for school.
I have never written multi-threaded code before (barring a few basic backgroundworker tricks) and
I have java code written in eclipse and I want to show some basic
I have written some code in my VB.NET application to send an HTML e-mail
I have written some CSS which targets elements using the parent > child selector.
I have written some code for playing a .wav through my application. Now I
I have written some jQuery ajax code where I am sending a request to
I have written some sample program and DLL to learn the concept of DLL
I have written some code to ensure that items on an order are all
I have written some code to look at properties using reflection. I have retrieved

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.