on 06-30-2010 3:01 PM
Hi
I have downloaded the WSDL file from SAP Netweaveer and added it as a reference to my .NET project.
I am getting the following error when calling the web service: The request failed with HTTP status 407: Proxy Authentication Required.
Could anyone please help?
My code looks as follows:
protected void Button1_Click(object sender, EventArgs e)
{
WebReference.CurrencyConversionRateQuery q = new WebApplication1.WebReference.CurrencyConversionRateQuery();
q.ExchangeRateType = "W";
q.FromCountry = "ZA";
q.ToCountry = "US";
q.Date = "2010-02-02";
WebReference.DCS_CurrencyConversionRateQuery_Out o = new WebApplication1.WebReference.DCS_CurrencyConversionRateQuery_Out();
o.Credentials = new NetworkCredential("SAPUser", "SAP_Pass");
Label1.Text = o.CurrencyConversionRateRead_Sync(q).ExchangeRate.ToString();
}
NetSpike,
You need to pass authentication credentials...DO you have them setup in netweaver ?
o.Credentials = new NetworkCredential("SAPUser", "SAP_Pass");
Where are you passing these values.
Are these setup in the SAP System.
Regards
Ravi Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I have changed my code to the following, which seems to connect I think, however I now receiving the following error:
The request failed with HTTP status 503: Service Unavailable.
The code now looks like this:
protected void Button1_Click(object sender, EventArgs e)
{
WebProxy myProxy = new WebProxy("http://proxy.company.co.za:8080", true);
myProxy.Credentials = new NetworkCredential("windows_user", "win_pass", "DOMAIN");
WebReference.CurrencyConversionRateQuery q = new WebApplication1.WebReference.CurrencyConversionRateQuery();
q.ExchangeRateType = "W";
q.FromCountry = "ZA";
q.ToCountry = "US";
q.Date = "2010-02-02";
WebReference.DCS_CurrencyConversionRateQuery_Out o = new WebApplication1.WebReference.DCS_CurrencyConversionRateQuery_Out();
o.Credentials = new NetworkCredential("SAP_USER", "SAP_PASS");
o.Proxy = myProxy;
Label1.Text = o.CurrencyConversionRateRead_Sync(q).ExchangeRate.ToString();
}
When I import the WSDL into soapUI with the SAP_USER and SAP_PASS credentials, then it works fine.
Edited by: NetSpike on Jul 1, 2010 11:10 AM
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.