Click here to Skip to main content
15,886,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've been through loads of web pages about this and nothing has worked.

I'm using VS2012 and have created a proxy class using the 'add service reference' This web service was tested and worked but now an id and password have been added to the web service and it fails when I try to consume it.


System Web Services Protocols.SoapException occurred
An error was discovered processing the wsse:Security header
System Web Services


This should be so simple. What am I missing?

C#
MyCompanyGetCases objWebService_MyCompanyGetCases = new MyCompanyGetCases();

System.Net.CredentialCache myCredentials = new System.Net.CredentialCache();
NetworkCredential netCred = new NetworkCredential(strServiceHostWebServiceId, strServiceHostWebServicePassword);

myCredentials.Add(new Uri(objWebService_MyCompanyGetCases.Url), "Basic", netCred);
objWebService_MyCompanyGetCases.Credentials = myCredentials;
objWebService_MyCompanyGetCases.UseDefaultCredentials = false;

MyCompany_getcasesRequest objMyCompany_getcasesRequest = new MyCompany_getcasesRequest(); // The receiver object
MyCompany_getcasesResponse objMyCompany_getcasesResponse = objWebService_MyCompanyGetCases.GetCases(objMyCompany_getcasesRequest);
Posted

1 solution

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