Contributions
Re: service does not have WSDL doc, using http post instead
Hi Ole, When i am creating the dummy WSDL, is it necessary that i have to define corresponding SOAP action for each operation in the WS and also specify how the input and output are encoded? Please help. Waiting for your reply. KC.4.3KViews0likes0CommentsRe: service does not have WSDL doc, using http post instead
Hi Ole, This is goin' to be a pretty big post. I have used a free WS which is available over the net. This is the link to that WS/site. http://www.holidaywebservice.com/Holidays/default.aspx and the endpoint is http://www.holidaywebservice.com/Holida ... rvice.asmx The original WSDL for the WS is available at http://www.holidaywebservice.com/Holida ... .asmx?WSDL The below WSDL, is edited by me. I have removed most of the content from the original WSDL. I have retained just one request message, one response message, one operation for GetCountriesAvailable <wsdl:definitions targetNamespace="http://www.27seconds.com/Holidays/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.27seconds.com/Holidays/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://www.27seconds.com/Holidays/"> <s:import namespace="http://www.w3.org/2001/XMLSchema"/> <s:element name="GetCountriesAvailable"> <s:complexType/> </s:element> <s:element name="GetCountriesAvailableResponse"> <s:complexType/> </s:element> </s:schema> </wsdl:types> <wsdl:message name="GetCountriesAvailableSoapIn"> <wsdl:part name="parameters" element="tns:GetCountriesAvailable"/> </wsdl:message> <wsdl:message name="GetCountriesAvailableSoapOut"> <wsdl:part name="parameters" element="tns:GetCountriesAvailableResponse"/> </wsdl:message> <wsdl:portType name="HolidayServiceSoap"> <wsdl:operation name="GetCountriesAvailable"> <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Get the countries supported.</documentation> <wsdl:input message="tns:GetCountriesAvailableSoapIn"/> <wsdl:output message="tns:GetCountriesAvailableSoapOut"/> </wsdl:operation> </wsdl:portType> <wsdl:portType name="HolidayServiceHttpGet"> <wsdl:operation name="GetCountriesAvailable"> <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Get the countries supported.</documentation> <wsdl:input message="tns:GetCountriesAvailableHttpGetIn"/> <wsdl:output message="tns:GetCountriesAvailableHttpGetOut"/> </wsdl:operation> </wsdl:portType> <wsdl:portType name="HolidayServiceHttpPost"> <wsdl:operation name="GetCountriesAvailable"> <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Get the countries supported.</documentation> <wsdl:input message="tns:GetCountriesAvailableHttpPostIn"/> <wsdl:output message="tns:GetCountriesAvailableHttpPostOut"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="HolidayServiceSoap" type="tns:HolidayServiceSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="GetCountriesAvailable"> <soap:operation soapAction="http://www.27seconds.com/Holidays/GetCountriesAvailable" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="HolidayServiceHttpGet" type="tns:HolidayServiceHttpGet"> <http:binding verb="GET"/> <wsdl:operation name="GetCountriesAvailable"> <http:operation location="/GetCountriesAvailable"/> <wsdl:input> <http:urlEncoded/> </wsdl:input> <wsdl:output> <mime:mimeXml part="Body"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="HolidayServiceHttpPost" type="tns:HolidayServiceHttpPost"> <http:binding verb="POST"/> <wsdl:operation name="GetCountriesAvailable"> <http:operation location="/GetCountriesAvailable"/> <wsdl:input> <mime:content type="application/x-www-form-urlencoded"/> </wsdl:input> <wsdl:output> <mime:mimeXml part="Body"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="HolidayService"> <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Web service that calculates national holidays for the country code provided.</documentation> <wsdl:port name="HolidayServiceSoap" binding="tns:HolidayServiceSoap"> <soap:address location="http://www.holidaywebservice.com/Holidays/HolidayService.asmx"/> </wsdl:port> <wsdl:port name="HolidayServiceHttpGet" binding="tns:HolidayServiceHttpGet"> <http:address location="http://www.holidaywebservice.com/Holidays/HolidayService.asmx"/> </wsdl:port> <wsdl:port name="HolidayServiceHttpPost" binding="tns:HolidayServiceHttpPost"> <http:address location="http://www.holidaywebservice.com/Holidays/HolidayService.asmx"/> </wsdl:port> </wsdl:service> </wsdl:definitions> I created a test case with GetCountriesAvailable and the request-response works fine. Now for this same edited WSDL, i created another test case, with a request that is not mentioned in the edited WSDL. It is GetHolidaysAvailable. This request is supposed to get a list of all the holidays for a particular country. (Please see the main site for more info on this 'cause this post will get real lengthy if i have to post the requests and responses). But the response i received for GetHolidaysAvailable was not correct. It was the response for GetCountriesAvailable. I checked the http log. The log shows response for GetCountriesAvailable. Just to add to this, when i create any request, SoapUI presents me an option to choose from a list of operations which are present in the WSDL. In this case, for the edited WSDL, i get only one operation for GetCountriesAvailable. I had a doubt if this could be a problem for the wrong response for a request that did not exist in the WSDL. Now my queries are, 1. If i assume that this WS does not have a WSDL, is the above WSDL (that i have edited and posted above) sufficient to access the entire WS, including the requests-responses that are not present in the WSDL? 2. If not, how sud i edit the WSDL in order to make the above requirement work? Also, can i edit the above WSDL to simplify it further? 3. You have suggested that i create a dummy-WSDL with only one operation. Is the WSDL i have created correct? Else, how should i prepare a dummy-WSDL? I would be really greatful if you could help me with this problem. Thanks in advance, KC.4.3KViews0likes0CommentsRe: service does not have WSDL doc, using http post instead
Hi Ole, I tried creating the WSDL for only one request and its corresponding response and with one operation. This works well only with respect to this. When i tried to send another request, i got the response for the previous request and not the correct one. Is it necessary that we have to have the info of all the requests/responses/operations in the service or just a sample will do. Please help. Also it would be of great help if you could give me a sample WSDL which i can use. Thanks in advance. KC.4.3KViews0likes0CommentsRe: global variables between suite and test case
Hi, I was looking more like global variables rather than properties. for example, in test suite set up script i have def a=0 i must be able to access the variable "a" from a test case script, something like perform the function def b = a + 5 so for this i must be able to access "a" from the test case. Please tell me how i can do this. Thanks in advance. KC.7.2KViews0likes0Comments- 4.1KViews0likes0Comments
Re: Test step Type
Hi Ole, This is the error i got. org.codehaus.groovy.runtime.metaclass.MissingPropertyExceptionNoStack: No such property: WsdlTestRequestStep for class: Script27 i did not replace "WsdlTestRequestStep" in the code with anything else. Was this the problem? KC.4.1KViews0likes0Commentsglobal variables between suite and test case
Hi, i want to declare some groovy variables at the beginning of the suite (suite set up script) and update these values at the end of every test case (test case tear down) and then finally use these variables at the end of test suite (suite tear down). How can i do this? Since, when i an declaring a variable in suite set up script, i can only access it with it the same script. Thanks in advance. KC.9.9KViews0likes3Comments