0

i am creating a c# with services with the soap header. The following is my example code

public class Service : System.Web.Services.WebService
{
    public AuthHeader Authentication = new AuthHeader();
    public Service () {
    }

    [WebMethod]
    [SoapHeader("Authentication")]
    public string HelloWorld() {

        return "Hello World";
    }

}
public class AuthHeader : SoapHeader
{
    public String APIKey;
}

Lets say today i call my web services in the .net platform, i will using the following way to call my web services.

    ServiceReference2.AuthHeader header = new ServiceReference2.AuthHeader();
    header.APIKey = "abc";
    ServiceReference2.ServiceSoapClient clientt = new ServiceReference2.ServiceSoapClient();
    clientt.HelloWorld(header);

However , what is my concern is, if a client which using java intend to call our web services, is it possible for them to grab authheader class in the services and put inside the function to call? If do, can you provide some article link for me to refer and check it?

Ryan Shine
  • 442
  • 1
  • 9
  • 23

0 Answers0