2010-11-28 8 views
5

J'ai reçu les erreurs/avertissements suivants dans le programme WebService Client.Exception de client WebService: impossible d'importer wsdl: liaison

On m'a dit qu'après, si je supprime les protocoles, tels que HTTP/GET et HTTP/POST de mon web.config, cela devrait fonctionner. Mais j'utilise Windows Form.

Comment faire la même chose avec Windows Form?

Warning 1 Custom tool warning: Cannot import wsdl:binding 
Detail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled. 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.webserviceX.NET']/wsdl:binding[@name='countryHttpGet'] C:\Users\user\Documents\Visual Studio 2010\Projects\PublicWebService\PublicWebService\Service References\CountryInfoWebSrv\Reference.svcmap 1 1 PublicWebService 

Warning 2 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://www.webserviceX.NET']/wsdl:binding[@name='countryHttpGet'] 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.webserviceX.NET']/wsdl:service[@name='country']/wsdl:port[@name='countryHttpGet'] C:\Users\user\Documents\Visual Studio 2010\Projects\PublicWebService\PublicWebService\Service References\CountryInfoWebSrv\Reference.svcmap 1 1 PublicWebService 

Warning 3 Custom tool warning: Cannot import wsdl:binding 
Detail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled. 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.webserviceX.NET']/wsdl:binding[@name='countryHttpPost'] C:\Users\user\Documents\Visual Studio 2010\Projects\PublicWebService\PublicWebService\Service References\CountryInfoWebSrv\Reference.svcmap 1 1 PublicWebService 

Warning 4 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://www.webserviceX.NET']/wsdl:binding[@name='countryHttpPost'] 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.webserviceX.NET']/wsdl:service[@name='country']/wsdl:port[@name='countryHttpPost'] C:\Users\user\Documents\Visual Studio 2010\Projects\PublicWebService\PublicWebService\Service References\CountryInfoWebSrv\Reference.svcmap 1 1 PublicWebService 
+0

Où avez-vous reçu le document WSDL? Quel type de document WSDL de service décrit? WSDL est utilisé uniquement pour les services SOAP. WCF prend en charge les services SOAP 1.1 et SOAP 1.2 qui n'utilisent pas HTTP GET. –

+0

Ceci est le lien du service web que j'utilise http://www.webservicex.net/country.asmx –

Répondre

0

Si vous souhaitez utiliser svcutil pour générer proxy de service que vous devez supprimer tout ce qui concerne http://schemas.xmlsoap.org/wsdl/http wich espace de noms est préfixé http. Vous devez donc supprimer deux liaisons et les ports de service Web. Dans ce cas, vous n'aurez pas non plus besoin de deux types de ports et de plusieurs types de messages.