:: Forum >> Version 1 >>

Using .net webservices

Hi
this is really kool.
But Iam having little problem with this when calling webservice.
its returns empty xml string all the time.
If anyone has any examples that its using a web service results and formatting the grid. Iam also sending couple of parameters to the web method.
Help would be appreciated

Thanks
Raj
Tuesday, August 23, 2005
If I were you I would work backwards to see where the problem is. Start by creating a web service that does not require parameters but returns valid code to create the grid and test that to see if it works. The problem might be in the way you are passing the parameters and the service is returning an empty string because of what it thinks is invalid parameters.
If the test works, then create a service with one parameter to see if you are passing parameters correctly.
Go from there.
Jim Hunter
Tuesday, August 23, 2005
Thanks Jim,
its working fine without parameter but not with parameters.

do you have any code snippet that its taking more than one parameter.?
I would really appreciate your help,

Raj
Raj
Wednesday, August 24, 2005
Raj, best thing to do is to open the webservice through internet explorer and invoke it with parameters from there. You would then be able to see the way they pass the parameters to the webservice by looking at the URL.

It should give you a fair idea of what you're doing wrong. Also watch out for & (which should be changed to %26 before sending it through)

Good luck
AcidRaZor
Wednesday, August 24, 2005
hi AcidRazor thanks for the reply
I tried that way but Iam getting weired error
like
Request format is unrecognized

here is the url that Iam trying get the result
http://localhost/DevWeb/TestWeb/Service/SelectService.asmx/getEmpActivty?strState=MD

getEmpActivty is the method that Iam calling from web service,
good thing is Iam able to get results when I invoked from the web when it asks parameters.
Iam sorry ask this question in this forum even though its not related to Grid

Thanks
Raj
Wednesday, August 24, 2005
Request format is unrecognized meands that the web service is not being called correctly.

When you invoke it via the web, it goes through the POST command (<form name=myform method=post>)

When you invoke it without "posting" the data via XMLHttp request, it goes through a GET command. Which is by default turned off in ASP.NET. You can turn it on by going to the machine.config file (i think)

Not sure where or what the key is. All I know it's commented out.

Try and rather do a post (you need to set a header on the XMLHttp when you post the data) to the web service as it is by default. Because normally you won't have access to the server's machine.config file unless you admin it yourself
AcidRaZor
Thursday, August 25, 2005



This topic is archived.

Back to support forum

Forum search