Share via

Problems Connecting to Webservice Visual Studio 2026

Kmcnet 1,356 Reputation points
2026-03-03T23:17:33.7266667+00:00

Hello everyone and thanks for the help in advance. I am upgrading a project to VS 2026 that utilizes connected services but am running into problems.

Here is the WSDL

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="urn:cdc:iisb:2011" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="urn:cdc:iisb:2011">
    <types>
        <s:schema elementFormDefault="qualified" targetNamespace="urn:cdc:iisb:2011">
            <s:element name="connectivityTestFL">
                <s:complexType>
                    <s:sequence>
                        <s:element name="echoBack" type="s:string" minOccurs="1" maxOccurs="1" nillable="true"/>
                        <s:element name="username" type="s:string" minOccurs="1" maxOccurs="1" nillable="true"/>
                        <s:element name="password" type="s:string" minOccurs="1" maxOccurs="1" nillable="true"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="connectivityTestFLResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element name="return" type="s:string" minOccurs="1" maxOccurs="1" nillable="true"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="submitSingleMessage">
                <s:complexType>
                    <s:sequence>
                        <s:element name="username" type="s:string" minOccurs="1" maxOccurs="1" nillable="true"/>
                        <s:element name="password" type="s:string" minOccurs="1" maxOccurs="1" nillable="true"/>
                        <s:element name="facilityID" type="s:string" minOccurs="1" maxOccurs="1" nillable="true"/>
                        <s:element name="hl7Message" type="s:string" minOccurs="1" maxOccurs="1" nillable="true"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="submitSingleMessageResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element name="return" type="s:string" minOccurs="1" maxOccurs="1" nillable="true"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
        </s:schema>
    </types>
    <message name="connectivityTestFL_Message">
        <part name="parameters" element="s0:connectivityTestFL"/>
    </message>
    <message name="connectivityTestFLResponse_Message">
        <part name="parameters" element="s0:connectivityTestFLResponse"/>
    </message>
    <message name="submitSingleMessage_Message">
        <part name="parameters" element="s0:submitSingleMessage"/>
    </message>
    <message name="submitSingleMessageResponse_Message">
        <part name="parameters" element="s0:submitSingleMessageResponse"/>
    </message>
    <portType name="InterOp_ServiceSoap">
        <operation name="connectivityTestFL">
            <input message="s0:connectivityTestFL_Message"/>
            <output message="s0:connectivityTestFLResponse_Message"/>
        </operation>
        <operation name="submitSingleMessage">
            <input message="s0:submitSingleMessage_Message"/>
            <output message="s0:submitSingleMessageResponse_Message"/>
        </operation>
    </portType>
    <binding name="HL7IISMethods" type="s0:InterOp_ServiceSoap">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <operation name="connectivityTestFL">
            <soap12:operation soapAction="urn:cdc:iisb:2011:connectivityTestFL" style="document"/>
            <input>
                <soap12:body use="literal"/>
            </input>
            <output>
                <soap12:body use="literal"/>
            </output>
        </operation>
        <operation name="submitSingleMessage">
            <soap12:operation soapAction="urn:cdc:iisb:2011:submitSingleMessage" style="document"/>
            <input>
                <soap12:body use="literal"/>
            </input>
            <output>
                <soap12:body use="literal"/>
            </output>
        </operation>
    </binding>
    <service name="InterOp_Service">
        <port name="HL7IISMethods" binding="s0:HL7IISMethods">
            <soap12:address location="https://www.flshots.com/interop/InterOp.Service.HL7IISMethods.cls" />
        </port>
    </service>
</definitions>

I used this WSDL to create a Connected Service named FLShotsInterop. In my older project, I could reference this by

var client = new FLShotsInterop.InterOp_ServiceSoapChannel();

However, in the new project, I am receiving an error message "Cannot create an instance of the abstract type of interface "Interop_ServiceSoapChannel". Any help would be appreciated.

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

{count} votes

Answer accepted by question author
  1. Jack Dang (WICLOUD CORPORATION) 14,955 Reputation points Microsoft External Staff Moderator
    2026-03-04T03:45:22.0066667+00:00

    Hi @Kmcnet ,

    Thanks for reaching out.

    In your older project, the service reference was generated using an older version of Microsoft.Tools.ServiceModel.Svcutil (2.0.3). That version generated a concrete InterOp_ServiceSoapChannel class, which is why this worked:

    var client = new FLShotsInterop.InterOp_ServiceSoapChannel();
    

    In the newer project, Microsoft Visual Studio 2026 is using Svcutil 8.0.0. The newer tool generates a different proxy structure. Specifically:

    • InterOp_ServiceSoapChannel is now an interface or abstract type.
    • You can no longer directly instantiate it with new.
    • A concrete client class is generated (usually something like InterOp_ServiceSoapClient), and that’s what you should create instead.

    So instead of:

    var client = new InterOp_ServiceSoapChannel();
    

    Look inside Reference.cs and find the generated concrete client class. It will typically look like:

    var client = new InterOp_ServiceSoapClient(
        InterOp_ServiceSoapClient.EndpointConfiguration.HL7IISMethods);
    

    If you’re seeing errors on every line in Reference.cs, that usually points to one of these:

    • Missing WCF packages
    • Target framework mismatch
    • SOAP 1.2 binding requiring proper configuration support

    Make sure your project has the required System.ServiceModel.Http (and related) packages installed, since modern .NET doesn’t include full WCF client support by default.

    If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide provide feedback. Thank you.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.