WSDL service was created using ASP.Net Core 2.1
When I add reference to WCF service I get error message:
Metadata not available
Failed to get metadata from "http://xxx.xxx.xxx.xxx:port/somewsdl?wsdl".
(Microsoft.BizTalk.Adapter.Wcf.Consuming.MetadataExchange.MetadataExchangeException) Unable to download metadata from "http://xxx.xxx.xxx.xxx:port/somewsdl??wsdl" using WS-Metadata Exchange.
(System.InvalidOperationException) Metadata contains a reference that cannot be resolved: 'http://xxx.xxx.xxx.xxx:port/somewsdl??wsdl'. (System.ServiceModel.CommunicationException)
The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\somedll.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>
When I tested wsdl from SoapUI, it works. Can you help me please?
VS 2010 Ultimate version 10.0.30319.1
BizTalk Server 2010 version 3.9.469.0
I did a test to make sure it wasn't a problem with the old VS / BizTalk:
VS 2015 Professional
BizTalk Server 2016
-------------- Edited ---------------------
I am adding a reference by using:
When I am using "Metadata files" in "BizTalk WCF service consuming wizard" then I get error:
wsdl file:
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://tempuri.org/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" targetNamespace="http://tempuri.org/" name="ISomeImport" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
<xs:import namespace="http://schemas.datacontract.org/2004/07/System"/>
<xs:element name="InputData">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="template" type="tns:FormTemplateType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="InputDataResponse">
<xs:element minOccurs="0" maxOccurs="1" name="InputDataResult" type="tns:FormTemplateResponseType"/>
</xs:element>
<xs:complexType name="FormTemplateType">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Changed" type="xs:dateTime"/>
<xs:element minOccurs="0" maxOccurs="1" name="Data" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="Gestor" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="Identifier" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="Publisher" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="Status" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="Version" type="tns:FormTemplteVersion"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FormTemplateResponseType">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Code" type="xs:int"/>
<xs:element minOccurs="0" maxOccurs="1" name="Message" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="TimestampStart" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="TimestampEnd" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FormTemplteVersion">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Major" type="xs:int"/>
<xs:element minOccurs="1" maxOccurs="1" name="Minor" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="ISomeImport_InputData_InputMessage">
<wsdl:part name="parameters" element="tns:InputData"/>
</wsdl:message>
<wsdl:message name="ISomeImport_InputData_OutputMessage">
<wsdl:part name="parameters" element="tns:FormTemplateResponseType"/>
</wsdl:message>
<wsdl:portType name="ISomeImport">
<wsdl:operation name="InputData">
<wsdl:input message="tns:ISomeImport_InputData_InputMessage"/>
<wsdl:output message="tns:ISomeImport_InputData_OutputMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding" type="tns:ISomeImport">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="InputData">
<soap:operation soapAction="http://tempuri.org/ISomeImport/InputData" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ISomeImport">
<wsdl:port name="BasicHttpBinding" binding="tns:BasicHttpBinding">
<soap:address location="http://xxx.xxx.xxx.xxx:port/someImport"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Problem was in wsdl.
New wsdl: