|
View previous topic :: View next topic |
Author |
Message |
Nadir
Joined: 29 Aug 2005 Posts: 264
|
Posted: Wed Apr 23, 2008 7:37 am Post subject: XML and HTTP Post |
|
|
Hi,
Could it possible to send XML request to a web server and parse reply to check for key word.
Thanks for help |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Wed Apr 23, 2008 7:49 am Post subject: |
|
|
We are going to implement particular test method to check SOAP/XML services, however, it has not been implemented yet.
Anyway, I think you may use "URL" test methods to check SOAP services over HTTP: http://www.ks-soft.net/hostmon.eng/mframe.htm#tests.htm#url
"URL" test method supports "POST" requests, so you may specify some piece of XML code into "Post data" field" to be sent to the Webservice, available by URL, specified in "URL" field.
Also you may enable "Check content" option to make HostMontor alert you if returned content contains/doesn't contain particular string or expression.
We understand that it is not very convenient to check string in XML content, returned by webservice. That's why we decided to implement dedicated test the check SOAP webservices, based on "URL" test method. Probably, you could point us into right direction? Our vision of this test is described below:
1. User have to specify URL to the Webservice into "URL" field.
2. User may choose between "GET" and "POST" requests to the WebService. In case of "POST" request, user have to provide some part of XML being sent to the web service.
3. User may verify returned XML content using two following approaches:
a) value of specified node in returned content should be equal to specified string
b) we provide ability to specify some XSL code. The result of transforming of the returned content with specified XSL should be equal to specified string
What do you say? Will it suit your needs? Do you have any suggestion at this point?
Your help is greatly appreciated.
Also you may use "Active Script" test method: http://www.ks-soft.net/hostmon.eng/mframe.htm#tests.htm#script
This method allows you to create come .vb, .js or .pl script to access your web service. For instance, you may use following objects within your scripts: Msxml2.XMLHTTP or Microsoft.XMLHTTP
http://msdn2.microsoft.com/en-us/magazine/cc301512.aspx
Regards,
Max |
|
Back to top |
|
|
Nadir
Joined: 29 Aug 2005 Posts: 264
|
Posted: Wed Apr 23, 2008 8:25 am Post subject: |
|
|
Is http test and URL test use same part of code to do HTTP Post?
If I want to send the following code, I just need to copy it into post data?
Quote: |
<Transaction
xmlns="http://www.exchangefortravel.org/xft/current"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exchangefortravel.org/xft/current file:/C:/Perinfo/XFT/Docs/1.1.15/xft_transaction.xsd"
xsi:type="TransactionRequestType"
TimeStamp="2008-02-13T11:27:27">
<Control>
<Requester Code="%CodeCanalConnexion%" />
</Control>
<Action Code="Status" Purpose="Get"/>
</Transaction>
|
Quote: | 1. User have to specify URL to the Webservice into "URL" field.
|
Yes
Quote: | 2. User may choose between "GET" and "POST" requests to the WebService. In case of "POST" request, user have to provide some part of XML being sent to the web service.
|
yes and macros could be used in code
Quote: | 3. User may verify returned XML content using two following approaches:
a) value of specified node in returned content should be equal to specified string
b) we provide ability to specify some XSL code. The result of transforming of the returned content with specified XSL should be equal to specified string
|
Great |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Wed Apr 23, 2008 8:37 am Post subject: |
|
|
Nadir wrote: | Is http test and URL test use same part of code to do HTTP Post? | No, they aren't. Both methods perform the same POST request, but using different approaches. "URL" test method uses Microsoft's WinInet/WinHTTP API, while "HTTP" test method uses our own code. Beside that, "HTTTP" test method does not support "HTTPS" requests, but using "HTTP" test method you can define more parameters specific to HTTP protocol and setup more varied checks.
Nadir wrote: | If I want to send the following code, I just need to copy it into post data? | Correct. You may use "%HttpPage%" macro variable to see the content, returned by server. Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mframe.htm#actions.htm#macro
===================================
%HttpPage% - Represents contents of the monitored web page (first 32768 (32K) characters of the web page if test was performed by HostMonitor; first 2048 (2K) characters of the page if test was performed by RMA).
===================================
Nadir wrote: | yes and macros could be used in code | Not sure I understand what macros do you have in mind? Could you explain, please?
Regards,
Max |
|
Back to top |
|
|
Nadir
Joined: 29 Aug 2005 Posts: 264
|
Posted: Wed Apr 23, 2008 9:20 am Post subject: |
|
|
Date macro variable, folder macro variable, udv macro variable ... |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Wed Apr 23, 2008 9:58 am Post subject: |
|
|
Nadir wrote: | Date macro variable, folder macro variable, udv macro variable ... | Ah, these macros... Good point. Thank you.
Regards,
Max |
|
Back to top |
|
|
Nadir
Joined: 29 Aug 2005 Posts: 264
|
Posted: Thu Apr 24, 2008 6:43 am Post subject: |
|
|
You are welcom |
|
Back to top |
|
|
|
|
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
|