Click here to Skip to main content
15,919,358 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have generated web service from WSDL using following command:

wsdl.exe myFile.wsdl /l:CS /serverInterface


however it has generated different case than WSDL and I have come to know about this issue after 3 hours of Debugging.

For eg:
public class MyWebService : System.Web.Services.WebService, IMyWsdlInterface
 {    
     [WebMethod]
     public string GetSomeString(string yourName)
     {
         //you'll have to write your own business logic 
         return "Hello, " + yourName + "!";
     }
 }


My generated Interface:

public abstract string GetSomeString(string yourName);


But actual WSDL contains:
public abstract string GetSomeString(string yourNAME);


yourName and YourNAME are the magic for me!

I am unable to figure the reason behind the error, so kindly let me know the reason behind it.

Thanks.
Posted
Updated 19-Jun-15 8:00am
v2

1 solution

Your question does not make any sense at all. Those two methods are 100% identical:
C#
public abstract string GetSomeString(string yourName);

and
C#
public abstract string GetSomeString(string yourNAME);

The names of the abstract method arguments make no difference, as soon as they are unique in the argument list and are the valid .NET names.

—SA
 
Share this answer
 
Comments
Member 10459713 20-Jun-15 0:04am    
@Sergey Alexandrovich Kryukov

First of all thanks for looking into this.
But I think you have misinterpret question.

I know

public abstract string GetSomeString(string yourName);

and

public abstract string GetSomeString(string yourNAME);

are identical.But actually problem is that when I request my asmx service using SOAP UI it doesn't take value of string because of case.

In my asmx WSDL generates parameter name as yourNAME but my webmethod has parameter name as yourName .

Issue: Actually I am unable to identify reason behind why generated Interface have other case of contract name?
Sergey Alexandrovich Kryukov 20-Jun-15 1:09am    
Where? What are those two different contract names?
If this is still yourName vs yourNAME, it doesn't matter, but I don't know why the code generator changes the name, if even it happens at all...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900