Reputation: 1850
I am using Windows 7 and Visual Studio .NET 2010 with Silverlight 5 Framework.
I am working with a video tutorial from YouTube on how to create a Windows phone application using a web service.
The problem is that when I add the web service "http://msrmaps.com/TerraService2.asmx", once added the service reference i get a lots of and an error that I do not understand.
I call the web service as follows:
WARNINGS AND ERRORS
Warning 1 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load type 'System.Runtime.Serialization.DataContractSet' from assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://msrmaps.com/']/wsdl:portType[@name='TerraServiceSoap'] c:\users\botoeo\documents\visual studio 2010\Projects\OpenEye\OpenEye\Service References\TerraService\Reference.svcmap
Warning 2 Custom tool warning: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://msrmaps.com/']/wsdl:portType[@name='TerraServiceSoap']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://msrmaps.com/']/wsdl:binding[@name='TerraServiceSoap'] c:\users\botoeo\documents\visual studio 2010\Projects\OpenEye\OpenEye\Service References\TerraService\Reference.svcmap
Warning 3 Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://msrmaps.com/']/wsdl:binding[@name='TerraServiceSoap']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://msrmaps.com/']/wsdl:service[@name='TerraService']/wsdl:port[@name='TerraServiceSoap'] c:\users\botoeo\documents\visual studio 2010\Projects\OpenEye\OpenEye\Service References\TerraService\Reference.svcmap
Warning 4 Custom tool warning: No endpoints compatible with Silverlight 3 were found. The generated client class will not be usable unless endpoint information is provided via the constructor. c:\users\botoeo\documents\visual studio 2010\Projects\OpenEye\OpenEye\Service References\TerraService\Reference.svcmap
Warning 5 Custom tool warning: Exception has been thrown by the target of an invocation. c:\users\botoeo\documents\visual studio 2010\Projects\OpenEye\OpenEye\Service References\TerraService\Reference.svcmap
Error 6 Custom tool error: Failed to generate code for the service reference 'TerraService'. Please check other error and warning messages for details. c:\users\botoeo\documents\visual studio 2010\Projects\OpenEye\OpenEye\Service References\TerraService\Reference.svcmap
How do I get rid of these warnings and erros. What causes this?
Upvotes: 1
Views: 790
Reputation: 1850
I found the solution for this problem.. I simply updated my Windows Phone SDK to the latest version. Latest Version can be found HERE . Download the latest update installer. Save your solution and close the Visual Studio. Update your Windows Phone SDK using downloaded file. Once this is done. Open your Visual Studio again. It will work smoothly.
Upvotes: 1