|
Hi There,
I've generated a C# file from a wsdl file using wsdl.exe utility.
Then I created a console application and made a call to the method
generated, first I got the error:
"The request failed with HTTP status 407: Proxy Access Denied."
Then I added a proxy validating and proxy credentials and got this:
"The underlying connection was closed: An unexpected error occurred on
a receive."
I send you the code to see if you can help me on this one, please...
Thanks,
Luis Miguel Pinho
----------------------------------------------------------------
Z_PO_SyncService service = new Z_PO_SyncService();
WebProxy wp = new System.Net.WebProxy("172.28.6.2:80",true);
wp.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.Proxy = wp;
ZLOTS a = new ZLOTS();
a.BATCH = "23";
ZLOTS b = new ZLOTS();
b.BATCH = "45";
ZLOTS[] input = new ZLOTS[]{a,b};
ZPOSLIST[] output = null;
try
{
service.Z_PO_RETURN_VERS2_OB_Sync(ref input,ref output);
}
catch(Exception ex)
{
Console.WriteLine("An error occured:");
Console.WriteLine("******************************* *******");
Console.WriteLine(ex.Message);
Console.WriteLine("******************************* *******");
return;
}
foreach(ZPOSLIST po in output)
{
Console.WriteLine(po.BATCH+"|"+po.EBELN+"|"+po.EBE LP+"|"+po.ELIKZ);
} |