Exception referencing TIBCO WSDL in .Net project: The XML element named 'Root' from namespace 'http://CCHMC.AD.UPIREpic' references a method and a type.

Exception referencing TIBCO WSDL in .Net project: The XML element named 'Root' from namespace 'http://CCHMC.AD.UPIREpic' references a method and a type.

book

Article ID: KB0086936

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
Title:
When I take the WSDL generated by Tibco (WSDL Source tab for the Service activity) and reference it as a WSDL in Microsoft VB.Net project then I get the following error:

The XML element named 'Root' from namespace 'http://CCHMC.AD.UPIREpic' references a method and a type. Change the method's message name using WebMethodAttribute or change the type's root element using the XmlRootAttribute.

Resolution:
For some reason, .Net does not like SOAP input and output messages both have part with the same name.
For example, the following WSDL does not work in .Net
...
    <wsdl:message name="UPIRRootIn">
        <wsdl:part name="parameters" element="tns:Root"/>
    </wsdl:message>
    <wsdl:message name="UPIRRootOut">
        <wsdl:part name="parameters" element="tns:Root"/>
    </wsdl:message>
...

If you change it to:
...
    <wsdl:message name="UPIRRootIn">
        <wsdl:part name="parameters1" element="tns:Root"/>
    </wsdl:message>
    <wsdl:message name="UPIRRootOut">
        <wsdl:part name="parameters2" element="tns:Root"/>
    </wsdl:message>
...

It should work.

Issue/Introduction

Exception referencing TIBCO WSDL in .Net project: The XML element named 'Root' from namespace 'http://CCHMC.AD.UPIREpic' references a method and a type.