scripter78
asked on
Windows Phone 7 Consuming Webservice WSDL
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_getPredi ctionsComp leted or even PredictionsClient_OpenComp leted when I put a break point in the code it doesn't even reach it.
Any suggestions would be greatly appreciated
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_getPredi
Any suggestions would be greatly appreciated
PredictionService.getPredictionsRequest pr = new PredictionService.getPredictionsRequest(new PredictionService.Parameters
{
beginDate = DateTime.Now.ToString("yyyyMMdd"),
endDate = DateTime.Now.AddDays(1.0).ToString("yyyyMMdd"),
dataInterval = 6,
timeZone = 0,
unit = 1,
stationId = "8726724",
datum = 0
});
PredictionsClient.getPredictionsAsync(pr);
void PredictionsClient_OpenCompleted(object sender, AsyncCompletedEventArgs e)
{
throw new NotImplementedException();
}
void PredictionsClient_getPredictionsCompleted(object sender, PredictionService.getPredictionsCompletedEventArgs e)
{
throw new NotImplementedException();
}
What Type is getting returned from the WEb Service? Only primitive types can be returned from a WS.
ASKER
it should be returning XML
I don't know if this may help but you can see where I am getting from and do tests on it here
http://opendap.co-ops.nos.noaa.gov/axis/
it is the Tide Predictions WSDL
I don't know if this may help but you can see where I am getting from and do tests on it here
http://opendap.co-ops.nos.noaa.gov/axis/
it is the Tide Predictions WSDL
you an approach like this:
http://stackoverflow.com/questions/3993300/dynamic-web-service-request-in-windows-phone-7
http://stackoverflow.com/questions/3993300/dynamic-web-service-request-in-windows-phone-7
ASKER
That did not work
also I have found many suggested option like the one in this link
http://stackoverflow.com/questions/5396671/how-to-send-receive-soap-request-and-response-using-c-sharp
the only problem I have found so far with this suggestion is
httpRequest.Headers.Add("S OAPAction: http://tempuri.org/" + methodName);
WP7 does not allow for the option of Header.Add
also I have found many suggested option like the one in this link
http://stackoverflow.com/questions/5396671/how-to-send-receive-soap-request-and-response-using-c-sharp
the only problem I have found so far with this suggestion is
httpRequest.Headers.Add("S
WP7 does not allow for the option of Header.Add
ASKER
Going back to my original code I ran it a few times and through in a break in the code with a test loop.
I noticed if giving the soap request long enough it would infact pull results but the problem with this is how to get the code to wait on the soap request to complete before going on to the next part of the code.
I noticed if giving the soap request long enough it would infact pull results but the problem with this is how to get the code to wait on the soap request to complete before going on to the next part of the code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.