Error after importing web service.

Topics: Technical Questions
May 27, 2008 at 1:39 PM

Hi,

I get the following error after importing a new web service and restarting the MSE Runtime Server:

MseEndpointResolver: Cannot import wsdl:portType

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

Error: There was a problem loading the XSD documents provided: a reference to a schema element with name 'getFlightList' and namespace 'urn:BBFService' could not be resolved because the element definition could not be found in the schema for targetNamespace 'urn:BBFService'.
Please check the XSD documents provided and try again.

I know that the imported WSDL is correct in some way as I can generate client proxies e.g. with VS2005.

Imported WSDL (extract):

 

  <?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="urn:BBFService" xmlns:tns3="http://errors.model.ws.swiss.clients.interes.com" xmlns:impl="urn:BBFService" xmlns:intf="urn:BBFService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://bbf.model.ws.swiss.clients.interes.com" xmlns:tns1="http://common.model.ws.swiss.clients.interes.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://common.model.ws.swiss.clients.interes.com">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="Price">
- <sequence>
  <element name="currency" nillable="true" type="xsd:string" />
  <element name="amount" nillable="true" type="xsd:float" />
  </sequence>
  </complexType>
 </schema>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:BBFService">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="ArrayOf_tns2_SeatAvailability">
- <complexContent>
- <restriction base="soapenc:Array">
  <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:SeatAvailability[]" />
  </restriction>
  </complexContent>
  </complexType>
  </schema>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://bbf.model.ws.swiss.clients.interes.com">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="ItineraryBased">
- <sequence>
  <element name="pricedItineraries" nillable="true" type="impl:ArrayOf_tns2_PricedItinerary" />
  <element name="outboundFlights" nillable="true" type="tns1:SeqScheduleFlight" />
  <element name="inboundFlights" nillable="true" type="tns1:SeqScheduleFlight" />
  </sequence>
  </complexType>
  </schema>
  </wsdl:types>
<wsdl:message name="getReturnFlightInformationResponse">
  <wsdl:part name="getReturnFlightInformationReturn" type="tns2:BBFReturnFlightResponse" />
  </wsdl:message>
- <wsdl:operation name="triggerPricing" parameterOrder="in0">
  <wsdl:input name="triggerPricingRequest" message="impl:triggerPricingRequest" />
  <wsdl:output name="triggerPricingResponse" message="impl:triggerPricingResponse" />
  </wsdl:operation>
- <wsdl:service name="BBFServiceService">
- <wsdl:port name="BBFService" binding="impl:BBFServiceSoapBinding">
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

Thx for your help,
Manuel

Developer
May 28, 2008 at 5:48 PM
Hi Manuel
It looks like the problem is missing schemaLocation attributes on your import statements.  For our wsdl importer we need to be able to resolve the location of the schema to verify it defines each of the elements being used.  If that doesn't help, please provide a full/condensed sample wsdl that repro's the issue.  The extract you provided doesn't reference the getFlightList element that is generating the error.

Thanks.



Manuel9999 wrote:

Hi,

I get the following error after importing a new web service and restarting the MSE Runtime Server:

MseEndpointResolver: Cannot import wsdl:portType

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

Error: There was a problem loading the XSD documents provided: a reference to a schema element with name 'getFlightList' and namespace 'urn:BBFService' could not be resolved because the element definition could not be found in the schema for targetNamespace 'urn:BBFService'.
Please check the XSD documents provided and try again.

I know that the imported WSDL is correct in some way as I can generate client proxies e.g. with VS2005.

Imported WSDL (extract):

 

  <?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="urn:BBFService" xmlns:tns3="http://errors.model.ws.swiss.clients.interes.com" xmlns:impl="urn:BBFService" xmlns:intf="urn:BBFService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://bbf.model.ws.swiss.clients.interes.com" xmlns:tns1="http://common.model.ws.swiss.clients.interes.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://common.model.ws.swiss.clients.interes.com">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="Price">
- <sequence>
  <element name="currency" nillable="true" type="xsd:string" />
  <element name="amount" nillable="true" type="xsd:float" />
  </sequence>
  </complexType>
 </schema>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:BBFService">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="ArrayOf_tns2_SeatAvailability">
- <complexContent>
- <restriction base="soapenc:Array">
  <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:SeatAvailability[]" />
  </restriction>
  </complexContent>
  </complexType>
  </schema>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://bbf.model.ws.swiss.clients.interes.com">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="ItineraryBased">
- <sequence>
  <element name="pricedItineraries" nillable="true" type="impl:ArrayOf_tns2_PricedItinerary" />
  <element name="outboundFlights" nillable="true" type="tns1:SeqScheduleFlight" />
  <element name="inboundFlights" nillable="true" type="tns1:SeqScheduleFlight" />
  </sequence>
  </complexType>
  </schema>
  </wsdl:types>
<wsdl:message name="getReturnFlightInformationResponse">
  <wsdl:part name="getReturnFlightInformationReturn" type="tns2:BBFReturnFlightResponse" />
  </wsdl:message>
- <wsdl:operation name="triggerPricing" parameterOrder="in0">
  <wsdl:input name="triggerPricingRequest" message="impl:triggerPricingRequest" />
  <wsdl:output name="triggerPricingResponse" message="impl:triggerPricingResponse" />
  </wsdl:operation>
- <wsdl:service name="BBFServiceService">
- <wsdl:port name="BBFService" binding="impl:BBFServiceSoapBinding">
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

Thx for your help,
Manuel