I am currently developing a webapp based on c# that calls some webservices. I have imported three different WSDLs from the provider into my WebApplication3 project (references -> add web reference). In the class viewer they appear as:
WebApplication3.com.provider.webservices1
WebApplication3.com.provider.webservices2
WebApplication3.Properties
Apparently the first and second WSDL have repeated functions (is that the correct name?)
If I add to my Default.aspx.cs the following using:
using WebApplication3.com.sabre.webservices1;
using WebApplication3.com.sabre.webservices2;
using WebApplication3.Properties;
and then try using:
MessageHeader msgHeader = new MessageHeader();
in my WebApplication3 namespace, I get the error
“Ambiguous reference between WebApplication3.com.provider.webservices1 and
WebApplication3.com.provider.webservices2”
I guess this is because it is declared in both WSDL? How can I fix this so I can use it?
Thanks, and sorry if the question is stupid!
try referencing MessageHeader by using its full namespace.
eg.
for brevity you can try
which would let you use
where MessageHeader is from the webservices1 namespace