Hello
There are two ways you can do it.
Case 1:
1. Create a proxy class DLL in C# or any .NET or COM.
2. If its C# or .NET regiter (gacutil.exe )it in GAC, by make it as interop
using regasm.exe.
3. Now write a script in ACT to instansite the object and call the method.
Case 2:
1. In ACT create a web request.
2. Build the soap request ( you can lauch the .asmx is IE and get the SOAP
request format"
3. now post the request e.g like below
Set oConnection = Test.CreateConnection(serviceServer, servicePort, false)
If (oConnection is Nothing) Then
Test.Trace "Error: Unable to create connection to " & serviceServer & ":" &
servicePort
Test.StopTest
Else
Set oRequest = Test.CreateRequest
oRequest.Path = serviceUrl
oRequest.Verb = "POST"
oRequest.HTTPVersion = "HTTP/1.1"
oRequest.EncodeBody = false
Set oHeaders = oRequest.Headers
'-------------------------------------------------------------------------
' Add Request header information
'-------------------------------------------------------------------------
oHeaders.RemoveAll
oHeaders.Add "Accept", "image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*"
oHeaders.Add "Accept-Language", "en-us"
oHeaders.Add "Content-Type", "text/xml; charset=utf-8"
oHeaders.Add "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.2; H010818; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
oHeaders.Add "Host", "(automatic)"
oHeaders.Add "Pragma", "no-cache"
oHeaders.Add "Cookie", "(automatic)"
oHeaders.Add "Content-Length", "(automatic)"
oHeaders.Add "SOAPAction", soapAction
'------------------------------------------------------------------------------------------------------------
' Create the Request in memory
'------------------------------------------------------------------------------------------------------------
Dim ReqStr
ReqStr = ""
ReqStr = ReqStr + "<?xml version=""1.0"" encoding=""utf-8""?>"
ReqStr = ReqStr + "<soap:Envelope
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">
<soap:Body>
<HugeText2500 xmlns=""http://tempuri.org/"" />
</soap:Body>
</soap:Envelope>"
Set oResponse = oConnection.Send(oRequest)
If (oResponse is Nothing) Then
.............................
Cheers :)
Geoman
"Alexis" wrote:
Hello,
I have developted a webservice application. The application has a few
webservices each webservice with their own webmethods of course.
I want to measure the performance of my site. I look at the Application
Center Test of Visual Studio Enterprice edition, but can not make it to work
with the web services. I can't figure out how to call the web services from
an ACT test. It seems it only can work with aspx pages not web services asmx
(where you have to call the web method)
Eventhought you can create you own ACT projects from Visual Studio the only
laguages supported are vbscript and javascript.
Help!!!
Does any of you have tested performance on webservices?
/Alexis