So your proxy object doens't contain a def for your soap header field. I just
tried writing a quick web service that uses a soap header. It seems to work
fine in c#, the only difference between my code and yours is that the proxy
contained a field for the header in the syntax [SoapHeaderObjType]Value.
Refresh your web reference (right click on the web reference in the solution
explorer, choose update). then clikc "show all files" for that project.
Expand the serivice in the explorer and drill down to the reference file.
this is your proxy. Look at the class def. you will see the field that
exposes your header and the type defined in this fiel as well.
I tested my code in C# but i assume it to work the same in VB
Let me know if this helped....
"Justin Dutoit" wrote:
Thanks for replying, but I don't think I need NetworkCredential, it's custom
authentication, where a distant web app is calling my web service by
supplying a username and password. Have a look at the web service code.
Tks
Justin
"tom wisnowski" <to**********@discussions.microsoft.com> wrote in message
news:7F**********************************@microsof t.com... try:
SampleSvcs.Service1 svcs = new SampleSvcs.Service1();
svcs.Credentials = new System.Net.NetworkCredential("user", "password",
"domain");
"Justin Dutoit" wrote:
Hey. I have the error CS0117 'BusinessLayer' does not contain a definition for 'MySoapHeader'. Below is a link to the asmx source, and the code which calls the web service. MS seems to do the same thing at
http://www.dotnetjunkies.com/QuickSt...rl=/quickstart /aspplus/doc/secureservices.aspx
I'd appreciate any help. Thanks
Justin Dutoit
http://justindutoit.port5.com/Quicks...layer.asmx.txt
void callws(Object Source, EventArgs e) {
BusinessLayer business = new BusinessLayer();
AuthHeader auth = new AuthHeader();
auth.Username = "justindutoit";
auth.Password = "paulpaul";
business.MySoapHeader = auth; // <<< error here
info.Text = business.Test();
}