Webservice som "Service reference" eller "Web reference"??
Hej,Hvis jeg tilføjer min webservice som Service Reference, får jeg følgende warnings:
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://myserviceweb/']/wsdl:binding[@name='Service1HttpGet'] C:\Users\me\Documents\Visual Studio 2012\Projects\TestApp\TestApp\Service References\tbweb\Reference.svcmap 1 1 TestApp
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://myserviceweb/']/wsdl:binding[@name='Service1HttpGet']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://myserviceweb/']/wsdl:service[@name='Service1']/wsdl:port[@name='Service1HttpGet'] C:\Users\me\Documents\Visual Studio 2012\Projects\TestApp\TestApp\Service References\tbweb\Reference.svcmap 1 1 TestApp
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://myserviceweb/']/wsdl:binding[@name='Service1HttpPost'] C:\Users\me\Documents\Visual Studio 2012\Projects\TestApp\TestApp\Service References\tbweb\Reference.svcmap 1 1 TestApp
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://myserviceweb/']/wsdl:binding[@name='Service1HttpPost']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://myserviceweb/']/wsdl:service[@name='Service1']/wsdl:port[@name='Service1HttpPost'] C:\Users\me\Documents\Visual Studio 2012\Projects\TestApp\TestApp\Service References\tbweb\Reference.svcmap 1 1 TestApp
Jeg havde samme problem i VS2010 og læste flere steder online at man skulle fjerne fluebenet i "Reuse types in referenced assemblies", men det gjorde nu ingen forskel her.
Tilføjer jeg den som en "Web reference" får jeg ingen fejl og jeg kan kalde servicen og få returneret data.
Skal jeg bare fortsætte med at bruge "Web reference" (nogle siger det er old schoool dinosaur style) eller hvordan hulen får jeg "Service Reference" til at virke?
Håber nogen kan hjælpe :-)