Error while loading WSDLReader30 object
|
| Error while loading WSDLReader30 object | Hi,
I am using WSDLReader30 object to load the specific WSDL file. But while loading it showing an error message
WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason is: Access is denied. HRESULT=0x1: Incorrect function.
I checked the web service authentication in IIS. Windows Authentication is enabled. When I access the same WSDL file through browser it is asking for user name and password. It showed the WSDL file after I enter those details. How can I pass the user name and password to that web service? If anonymous access is enabled then it is working fine.Please find the code bellow
WSDLReader30 reader = new WSDLReader30Class(); IEnumWSDLService EnumService; IWSDLService Service; IEnumWSDLPorts EnumPort; IWSDLPort Port; IEnumWSDLOperations EnumOperation; IWSDLOperation Operation; IEnumSoapMappers EnumMapper; ISoapMapper Mapper; int fetched; int Enumfetched; string address;
reader.Load(textBox1.Text, ""); reader.GetSoapServices(out EnumService); EnumService.Next(1, out Service, ref fetched); label1.Text = Service.Name; Service.GetSoapPorts(out EnumPort); EnumPort.Next(1, out Port, ref fetched); Port.GetSoapOperations(out EnumOperation); address = Port.Address; EnumOperation.Next(1, out Operation, out fetched); Operation.GetOperationParts(out EnumMapper); while (fetched == 1) {
listBox1.Items.Add(Operation.Name); EnumOperation.Next(1, out Operation, out fetched);
} private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { listBox2.Items.Clear(); listBox3.Items.Clear(); string methodname = listBox1.SelectedItem.ToString(); EnumOperation.Find(methodname, out Operation); Operation.GetOperationParts(out EnumMapper);
EnumMapper.Next(1, out Mapper, out Enumfetched);
while (Enumfetched == 1) { listBox2.Items.Add(Mapper.ElementName); listBox3.Items.Add(Mapper.ElementType); EnumMapper.Next(1, out Mapper, out Enumfetched); } }
If any body came accross this same scenario? -- Rajesh
|
|
|
|
|
 | Members Area | |
|
 | Last Web Marketing |
|
|
|
|
 | Last Programming Tips |
|
|
|
|
 | Last News |
|
|
|
|
|
|