none
Problem adding service reference(included WSDL) RRS feed

  • Question

  • Hi,

    I have a WSDL that are validated OK with XML Spy, SoupUI 5.3.0 can generate proxy from it. Visual Studio 2017 can add the reference but I get the following error and validations : 

    Severity Code Description Project File Line Suppression State Error Custom tool error: Failed to generate code for the service reference 'ServiceReference1'. Please check other error and warning messages for details. WindowsFormsApp1 c:\users\Me\source\repos\WindowsFormsApp1\WindowsFormsApp1\Connected Services\ServiceReference1\Reference.svcmap 

    Severity Code Description Project File Line Suppression State Warning Custom tool warning: 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='MyTest.GetInformation:v2']/wsdl:binding[@name='GetInformationBinding'] XPath to Error Source: //wsdl:definitions[@targetNamespace='MyTest.GetInformation:v2']/wsdl:service[@name='GetInformationService']/wsdl:port[@name='GetInformationPort'] WindowsFormsApp1 c:\users\Me\source\repos\WindowsFormsApp1\WindowsFormsApp1\Connected Services\ServiceReference1\Reference.svcmap 1

    Severity Code Description Project File Line Suppression State Warning Custom tool warning: 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='MyTest.GetInformation:v2']/wsdl:portType[@name='GetInformationInterface'] XPath to Error Source: //wsdl:definitions[@targetNamespace='MyTest.GetInformation:v2']/wsdl:binding[@name='GetInformationBinding'] WindowsFormsApp1 c:\users\Me\source\repos\WindowsFormsApp1\WindowsFormsApp1\Connected Services\ServiceReference1\Reference.svcmap 1

    Severity Code Description Project File Line Suppression State Warning Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter Error: The datatype 'MyTest.attentionSignal:v1:II' is missing. XPath to Error Source: //wsdl:definitions[@targetNamespace='MyTest.GetInformation:v2']/wsdl:portType[@name='GetInformationInterface'] WindowsFormsApp1 c:\users\Me\source\repos\WindowsFormsApp1\WindowsFormsApp1\Connected Services\ServiceReference1\Reference.svcmap 1

    You can find the WSDL here : https://1drv.ms/u/s!AskujIssKpne7kPry5-efAgjft0o

    It is possible to add it If I use compability mode but then it will use .NET 2.0. Because this is a new version of a former WSDL I need it to work like the old one did(add it as a regular service reference(have a big part of the code already written). 




    • Edited by SnowJim Wednesday, March 21, 2018 10:35 PM
    Monday, February 26, 2018 2:24 PM

All replies

  • Hi SnowJim,

    For this error message, it seems there is some reference missing in WSDL. I suggest you check these error elements whether they are required. If not, I suggest you try to remove them from the wsdl file and try again.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, February 28, 2018 2:35 AM
  • Hi, 

    They are used in multiple places and they are defined in the ISO_dt.xsd. I dont see why Visual Studio would not find the TS in the ISO_dt.xsd.

    I have uploaded the files again here : https://1drv.ms/u/s!AskujIssKpne7kPry5-efAgjft0o

    BestRegards

    Wednesday, March 21, 2018 10:40 PM
  • I have now removed these properties : 

    AttentionSignalType.signalVersionDateTime

    AttentionSignalType.signalSignDateTime

    AttentionSignalType.signalDeletionDate

    HypersensitivityType.reasessmentDateTime

    HypersensitivityDrugs.reasessmentDateTime

    NonStandardProcedureType.reasessmentDateTime

    TreatmentAndConditionType.reasessmentDateTime

    Treatment.treatmentDateTime

    Condition.diagnosisDateTime

    UnstructuredDataType. reasessmentDateTime

    HypersensitivityDrugs.signalATCCodes.signalATCCode

    AttentionSignalType.rc_id

    AttentionSignalType.signerID

    MedicalRecordLinkType.rc_id

    And when this is done it works. I have made a call to a SoapUI MockUp Service based on the unmudified WSDL and that do also work. 

    But what If I need some of the properties above? I suspect that the import/include is wrong somewhere in the WSDL.?

    Thursday, March 22, 2018 3:26 PM
  • I think it is related with the different standard between .net and other platforms.

    I would suggest you make a test with modified WSDL, will you receive any error? If not, I would suggest you go without these properties.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 23, 2018 6:08 AM