This project is read-only.

Cannot import wsdl:portType

Oct 14, 2010 at 4:30 PM

I have XSD and WSDL from a service I am using. I am trying to implement the WSDL and am getting errors when I try to generate the Service-side stub in VS2010.

Thanks for any help.

Here is the message:

Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: Schema with target namespace 'http://farelogix.com/flx/tc' could not be found.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://farelogix.com/flx']/wsdl:portType[@name='FlxPort']
---------------------------------------------------------------------------------
Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://farelogix.com/flx']/wsdl:portType[@name='FlxPort']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://farelogix.com/flx']/wsdl:binding[@name='FlxFareSearchBinding']
---------------------------------------------------------------------------------
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://farelogix.com/flx']/wsdl:binding[@name='FlxFareSearchBinding']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://farelogix.com/flx']/wsdl:service[@name='FlxFareSearchService']/wsdl:port[@name='FlxPort']
---------------------------------------------------------------------------------

<wsdl:definitions targetNamespace="http://farelogix.com/flx" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s0="http://farelogix.com/flx" xmlns:t="http://farelogix.com/flx/tc" xmlns:s1="http://farelogix.com/flx/faresearch/request" xmlns:s2="http://farelogix.com/flx/faresearch/response">
  <wsdl:types>
    <xsd:schema targetNamespace="http://farelogix.com/flx/tc" elementFormDefault="qualified" attributeFormDefault="qualified">
      <xsd:include schemaLocation="transaction.xsd" />
    </xsd:schema>
    <xsd:schema targetNamespace="http://farelogix.com/flx/faresearch/request" elementFormDefault="qualified" attributeFormDefault="qualified">
      <xsd:include schemaLocation="FareSearchRQ.xsd" />
    </xsd:schema>
    <xsd:schema targetNamespace="http://farelogix.com/flx/faresearch/response" elementFormDefault="qualified" attributeFormDefault="qualified">
      <xsd:include schemaLocation="FareSearchRS.xsd" />
    </xsd:schema>
    <xsd:schema targetNamespace="http://farelogix.com/flx" elementFormDefault="qualified" attributeFormDefault="qualified">
      <xsd:import namespace="http://farelogix.com/flx/faresearch/request" />
      <xsd:element name="FlxTransaction">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="Context" minOccurs="0" maxOccurs="1" type="xsd:string" />
            <xsd:element ref="t:TransactionControl" minOccurs="0" maxOccurs="1" />
            <xsd:element ref="s1:FareSearchRQ" minOccurs="0" maxOccurs="1" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
    <xsd:schema targetNamespace="http://farelogix.com/flx" elementFormDefault="qualified" attributeFormDefault="qualified">
      <xsd:import namespace="http://farelogix.com/flx/faresearch/response" />
      <xsd:element name="FlxTransactionResponse">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="Context" minOccurs="0" maxOccurs="1" type="xsd:string" />
            <xsd:element ref="s2:FareSearchRS" minOccurs="1" maxOccurs="1" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
    <xsd:schema targetNamespace="http://farelogix.com/flx" elementFormDefault="qualified" attributeFormDefault="qualified">
      <xsd:element name="XXTransaction">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="Context" minOccurs="0" maxOccurs="1" type="xsd:string" />
            <xsd:element name="FareSearchRQ" minOccurs="1" maxOccurs="1">
              <xsd:complexType>
                <xsd:sequence>
                  <xsd:any />
                </xsd:sequence>
              </xsd:complexType>
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
    <xsd:schema targetNamespace="http://farelogix.com/flx" elementFormDefault="qualified" attributeFormDefault="qualified">
      <xsd:element name="XXTransactionResponse">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="Context" minOccurs="0" maxOccurs="1" type="xsd:string" />
            <xsd:element name="FareSearchRS" minOccurs="1" maxOccurs="1">
              <xsd:complexType>
                <xsd:sequence>
                  <xsd:any />
                </xsd:sequence>
              </xsd:complexType>
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
  </wsdl:types>
  <message name="tcRequest">
    <part name="tcinfo" element="t:TransactionControl" />
  </message>
  <message name="tcResponse">
    <part name="tcinfo" element="t:Transaction" />
  </message>
  <message name="FlxRequestMessage">
    <part name="body" element="s0:FlxTransaction" />
  </message>
  <message name="FlxResponseMessage">
    <part name="body" element="s0:FlxTransactionResponse" />
  </message>
  <message name="XXRequestMessage">
    <part name="body" element="s0:XXTransaction" />
  </message>
  <message name="XXResponseMessage">
    <part name="body" element="s0:XXTransactionResponse" />
  </message>
  <portType name="FlxPort">
    <operation name="FlxTransaction">
      <input name="request" message="s0:FlxRequestMessage" />
      <output name="response" message="s0:FlxResponseMessage" />
    </operation>
    <operation name="XXTransaction">
      <input name="request" message="s0:XXRequestMessage" />
      <output name="response" message="s0:XXResponseMessage" />
    </operation>
  </portType>
  <binding name="FlxFareSearchBinding" type="s0:FlxPort">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="FlxTransaction">
      <soap:operation soapAction="XXTransaction" />
      <input name="request">
        <soap:header message="s0:tcRequest" part="tcinfo" use="literal" />
        <soap:body use="literal" />
      </input>
      <output name="response">
        <soap:header message="s0:tcResponse" part="tcinfo" use="literal" />
        <soap:body use="literal" />
      </output>
    </operation>
    <operation name="XXTransaction">
      <soap:operation soapAction="XXTransaction" />
      <input name="request">
        <soap:header message="s0:tcRequest" part="tcinfo" use="literal" />
        <soap:body use="literal" />
      </input>
      <output name="response">
        <soap:header message="s0:tcResponse" part="tcinfo" use="literal" />
        <soap:body use="literal" />
      </output>
    </operation>
  </binding>
  <service name="FlxFareSearchService">
    <documentation>FLX Web Services - FareSearch</documentation>
    <port name="FlxPort" binding="s0:FlxFareSearchBinding">
      <soap:address location="http://localhost:8800" />
    </port>
  </service>
</wsdl:definitions>

Nov 5, 2010 at 1:32 PM

Hi Folks,

 

Any update on this issue ? I have very similar errors only since moving to Vs2010 & WSCF blue from vs2005 & older wscf version.

I can generate the WSDL from XSD without any problems. When generating the server side code from the WSDL I get the 3 errors below.

Any help appreciated.

 

Cannot import wsdl:portType

Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter

Error: These members may not be derived.

XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.myco.com/GatewayInternal']/wsdl:portType[@name='GatewayInternalInterface']

---------------------------------------------------------------------------------

Cannot import wsdl:binding

Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.

XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://www.myco.com/GatewayInternal']/wsdl:portType[@name='GatewayInternalInterface']

XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.myco.com/GatewayInternal']/wsdl:binding[@name='BasicHttpBinding_GatewayInternalInterface']

---------------------------------------------------------------------------------

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.myco.com/GatewayInternal']/wsdl:binding[@name='BasicHttpBinding_GatewayInternalInterface']

XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.myco.com/GatewayInternal']/wsdl:service[@name='GatewayInternalPort']/wsdl:port[@name='GatewayInternalPort']

---------------------------------------------------------------------------------

Jan 18, 2013 at 10:42 AM

Hi, i've the same problem.

Can you help me ?

Thanks