hi,
i am utilizing a web service in a C# windows application for a smart
client.
there is a method
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("
http://kajol
.csse.monash.edu.au/cse3211/ValidateUser",
RequestNamespace="
http://kajol.csse.monash.edu.au/cse3211",
ResponseNamespace="
http://kajol.csse.monash.edu.au/cse3211",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
]
public int ValidateUser(string userName, string password) {
object[] results = this.Invoke("ValidateUser", new object[]
{
userName,
password});
return ((int)(results[0]));
}
which works fine.when i supply a user name and pwd..
but then there is this other method ;
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("
http://kajol
.csse.monash.edu.au/cse3211/GetMovies",
RequestNamespace="
http://kajol.csse.monash.edu.au/cse3211",
ResponseNamespace="
http://kajol.csse.monash.edu.au/cse3211",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
]
public System.Data.DataSet GetMovies(int userID) {
object[] results = this.Invoke("GetMovies", new object[] {
userID});
return ((System.Data.DataSet)(results[0]));
}
but whenever i supply the user id (196 or 129) to this it gives me error
saying
"The remote server returned an error : (403)
Forbidden"
but when i manually go to the site and enter the user id (196 or 129) i
dont get any error and i can see the data in XML format..
what i am trying to do in my code is to get the dataset returned by the
web-service method : "GetMovies" into a dataset so i do this :
DataSet ds = new System.Data.DataSet();
Users wsUsers = new Users();
ds = wsUsers.GetMovies(129);
this is where i get the above mentioned error..
can anyone pls help????
tks a lot...
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Leer las respuestas