Problème avec le Webservice MapPoint
Bonsoir,
Je suis en train de faire mes premiers pas avec le web service map point, mais je rencontre déjà quelques problèmes .
Tout d'abord , lors de l'instanciation d'un objet de type : FindServiceSoap
Code:
FindServiceSoad fss = new FindServiceSoap();
j'obtiens l'erreur suivante :
Citation:
Error 1 Cannot create an instance of the abstract class or interface 'PickMeUp_BusinessLayer.ReferenceMapPoint.FindServiceSoap' C:\Documents and Settings\COMPAQ\My Documents\Visual Studio 2008\Projects\PickMeUp_BusinessLayer\PickMeUp_BusinessLayer\MapPoint.cs 15 35 PickMeUp_BusinessLayer
Dans le même genre , le code suivant ne fonctionne pas :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
FindAddressSpecification addressSpecif = new FindAddressSpecification();
FindResult resultats;
Address address = new Address();
// On insère les données relatives à l'adresse
address.AddressLine =_address;
address.PostalCode = _postal_code;
address.PrimaryCity = _city;
address.CountryRegion = _country;
addressSpecif.InputAddress = address;
addressSpecif.DataSourceName ="MapPoint.EU";
resultats = fss.FindAddress(addressSpecif);
latlongobj = resultats.FoundLocation.LatLong; |
J'obtiens les erreurs suivantes :
Citation:
Error 2 The best overloaded method match for 'PickMeUp_BusinessLayer.ReferenceMapPoint.FindServiceSoap.FindAddress(PickMeUp_BusinessLayer.ReferenceMapPoint.FindAddressRequest)' has some invalid arguments C:\Documents and Settings\COMPAQ\My Documents\Visual Studio 2008\Projects\PickMeUp_BusinessLayer\PickMeUp_BusinessLayer\MapPoint.cs 34 25 PickMeUp_BusinessLayer
Error 3 Argument '1': cannot convert from 'PickMeUp_BusinessLayer.ReferenceMapPoint.FindAddressSpecification' to 'PickMeUp_BusinessLayer.ReferenceMapPoint.FindAddressRequest' C:\Documents and Settings\COMPAQ\My Documents\Visual Studio 2008\Projects\PickMeUp_BusinessLayer\PickMeUp_BusinessLayer\MapPoint.cs 34 41 PickMeUp_BusinessLayer
J'ai pourtant fait exactement comme la doc le disait !
Ah oui j'ai appellé le web service à l'adresse suivante :
http://staging.mappoint.net/standard-30/mappoint.wsdl
Je vous remercie !