Red Gate forums :: View topic - Recording a script: Client javascript posting to webservice
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Load
ANTS Load forum

Recording a script: Client javascript posting to webservice

Search in ANTS Load forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
davidb



Joined: 30 May 2006
Posts: 2
Location: Blackburn, Lancashire

PostPosted: Tue May 30, 2006 3:57 pm    Post subject: Recording a script: Client javascript posting to webservice Reply with quote

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" Sad

Is there a way to call the web service using AddPostData?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6648

PostPosted: Thu Jun 08, 2006 7:20 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
davidb



Joined: 30 May 2006
Posts: 2
Location: Blackburn, Lancashire

PostPosted: Fri Jun 09, 2006 9:58 am    Post subject: Reply with quote

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 Smile

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
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6648

PostPosted: Fri Jun 09, 2006 6:06 pm    Post subject: Reply with quote

Hello David,

Yes, the SOAP/XMLHTTP/AJAX thing is being looked into as we speak, as fate would have it.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. 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