2010-11-28 20 views
5

मुझे वेब सेवा क्लाइंट प्रोग्राम में निम्न त्रुटियां/चेतावनियां मिलीं।वेब सेवा क्लाइंट अपवाद: wsdl आयात नहीं कर सकता: बाध्यकारी

मुझे बताया गया था कि अगर मैं अपने वेब.कॉन्फिग से HTTP/GET और HTTP/POST जैसे प्रोटोकॉल को हटा देता हूं, तो इसे काम करना चाहिए। लेकिन मैं विंडोज फॉर्म का उपयोग कर रहा हूँ।

मैं विंडोज फॉर्म में ऐसा कैसे कर सकता हूं?

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

आपको डब्लूएसडीएल दस्तावेज़ कहां मिला? डब्ल्यूएसडीएल दस्तावेज़ किस प्रकार की सेवा का वर्णन करता है? डब्ल्यूएसडीएल का उपयोग केवल एसओएपी सेवाओं के लिए किया जाता है। डब्ल्यूसीएफ एसओएपी 1.1 और एसओएपी 1.2 सेवाओं का समर्थन करता है जो HTTP जीईटी का उपयोग नहीं करते हैं। –

+0

यह वेब सेवा का लिंक है जिसका मैं उपयोग कर रहा हूं http://www.webservicex.net/country.asmx –

उत्तर

0

आप सेवा प्रॉक्सी पैदा करने के लिए svcutil उपयोग करना चाहते हैं आप http://schemas.xmlsoap.org/wsdl/http नाम स्थान जो से संबंधित सब कुछ कि http पहले से जुड़ा हुआ है को दूर करने के लिए है। तो आपको दो बाइंडिंग और वेब सेवा बंदरगाहों को हटाने की जरूरत है। उस स्थिति में आपको दो बंदरगाहों और कई संदेश प्रकारों की भी आवश्यकता नहीं होगी।

संबंधित मुद्दे