| Author |
Message |
davidb
Joined: 30 May 2006 Posts: 2 Location: Blackburn, Lancashire
|
Posted: Tue May 30, 2006 3:57 pm Post subject: Recording a script: Client javascript posting to webservice |
|
|
Hello.
Firstly forgive me if this question has been asked before.
Our web site has a page which takes in user input (It is classic ASP) and then posts that information to a web service. It does this by building up an XML string of SOAP and then POSTs this back to the server in a client-side javascript routine.
When I record a script it seems to create some of the XML but appears as if a large chunk (indeed the main body of data seems to be missing) of data is missing.
I read somewhere else in another post that it is preferable to try and add a web-reference and use the dot net code to call the web service methods rather than through AddPostData? For one thing when I try and add a web reference to the service I get an error "Unable to create proxy wrapper for this web service"
Is there a way to call the web service using AddPostData? |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6345 Location: Red Gate Software
|
Posted: Thu Jun 08, 2006 7:20 pm Post subject: |
|
|
Hello,
You can use the script recorder way to call a web service, but you would need to configure it so that you can invoke the webservice from a web page by clicking an 'invoke' button or something like that. A lot of the Microsoft webservice examples are like this. There is something in the configuration that enables it. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
davidb
Joined: 30 May 2006 Posts: 2 Location: Blackburn, Lancashire
|
Posted: Fri Jun 09, 2006 9:58 am Post subject: |
|
|
Whatl we're trying to achieve is emulating an admin user creating a "sub division" user and running it as 100 concurrent users to see if there's any impact on the site. When this script is running we'll then log on through the web and navigate around the site, also creating "sub users" to make sure that the web site is still usable (i.e. not running very slow).
Recording a script would not allow the soap request to go through, the xml produced was "cut short". When run as a recorded script the "sub division" user was not created.
Anyway I finally managed to get the web service running and now I have a State Information script with the data required which the ANTS scripts uses and passes to the web service thus emulating the web user clicking on the "Add" button. Running it like this works
The part of our web site we are testing has only recently been introduced so this will be a good test for it.
I read somewhere that the standard Record would not cope with soap requests. The functionality here is client-side which creates an XML string of SOAP and does it all with AJAX.
Many thanks,
David Baxter. |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6345 Location: Red Gate Software
|
Posted: Fri Jun 09, 2006 6:06 pm Post subject: |
|
|
Hello David,
Yes, the SOAP/XMLHTTP/AJAX thing is being looked into as we speak, as fate would have it. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group