cancel
Showing results for 
Search instead for 
Did you mean: 

service does not have WSDL doc, using http post instead

Contributor

service does not have WSDL doc, using http post instead

Hi,

We are trying to implement SoapUI within projects in our company, but we are having a problem.

The services we are planning to test does not have WSDL documents. Instead we are using HTTP post to send requests.

Is there any way that i can create a project and create test cases and run them without a WSDL doc? If so how can i do it? Is WSDL a mandatory requirement if i have to use SoapUI?

Could you please as soon as possible.
Thanks in advance.

Kusuma.
10 REPLIES 10
Super Contributor

Re: service does not have WSDL doc, using http post instead

Hi Kusuma,

you will still need a WSDL to create an interface in soapUI, but from then on you can send whatever messages you want; I suggest you just create a dummy-wsdl with one operation and then use that operation for all your POSTs.

There is a Request-level setting to not set the SOAP-Action parameter in outgoing requests specifically for this purpose (bottom left Properties)

Obviously you wont be able to use the message validation features in soapUI, but all other features (property transfers, xpath assertions, etc.) should work fine

Hope this helps!

regards,

/Ole
eviware.com
Contributor

Re: service does not have WSDL doc, using http post instead

Thanks for your quick reply Ole.. I will try with the dummy WSDL, and will revert in case i have any problem..

Also, if I have to create only one operation, will it have to be a valid operation? what should i be mentioning for the input and the output?

Another question is that, what are the different message validation features available in SoapUI and which are the ones i will not be able to use if i am using dummy WSDL.

Please help.
Kusuma.
Super Contributor

Re: service does not have WSDL doc, using http post instead

Hi,

just create a simple doc-literal operation with request /  response elements of anyType..

Regarding validation, the editor has Alt-V validation which will check against the messages schema (both request and response), you can also enable this to be done automatically before/after sending requests. Also, there is a Schema Compliance assertions for TestRequests that validates the response message agains the Schema. All of these use the WSDL/Schema, and require a corresponding SOAP-Envelope/Message-Body.

regards!

/Ole
eviware.com
Contributor

Re: 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.
Super Contributor

Re: service does not have WSDL doc, using http post instead

Hi KC,

getting the response for the previous request sounds like a bug to me, either in soapUI or in the server you are calling. Can you check the httplog when making the second request to see what is actually returned from the server!?

regards,

/Ole
eviware.com
Contributor

Re: 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.
Contributor

Re: service does not have WSDL doc, using http post instead

Hi Ole,

Could you please respond to this query? Is this a bug in SoapUI?
We want to use SoapUI in one of our projects but this issue is stopping us.

Looking forward for your response.
KC.
Contributor

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.
Contributor

Re: service does not have WSDL doc, using http post instead

Hi Ole,

Could you please respond to this query? We are waiting to implement SoapUI in several projects and this is the problem we are facing.

KC.