1
votes

I want to call a SOAP-service from my ,net code. But when I import the wsdl I get the following error:

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.bipro.net/namespace']/wsdl:binding[@name='KrankenServiceBinding'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.bipro.net/namespace']/wsdl:service[@name='KrankenService_2.6.0.1.1']/wsdl:port[@name='KrankenService'] Cannot import wsdl:binding Detail: An exception was thrown in a call to a policy import extension. Extension: System.ServiceModel.Channels.SecurityBindingElementImporter Error: An unsupported security policy assertion was detected during the security policy import: https://example.com/SecurityTokenService XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.bipro.net/namespace']/wsdl:binding[@name='KrankenServiceBinding']

I tried it initially with .NET Core but also with the classic Framework. Same result.

What can I do?

1

1 Answers

0
votes

Are you using the Microsoft WCF Web Service Reference Provider? If the error occurred in DotNetFramework too, I think there is something wrong with the WSDL file. one more thing needs to mention is that there are two kinds of WSDL file that WCF generally published.

http://localhost:11000/Service1.svc?wsdl
http://localhost:11000/Service1.svc?singleWsdl

The ?singleWSDL file contains all schemas that imported from an external file., such as Data Contract. It is normally applicable for the invocation from SOAPUI. The ?WSDL file usually is used to generate the client proxy to call the service. Have you tried another WSDL file? Besides, please try to call the service with a client proxy created by using ?WSDL file.
Feel free to let me know if there is anything I can help with.