Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

HTTP Get and Post requests with SOAtest

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
HTTP Get and Post requests with SOA Test
Just wondering, If we can send HTTP Get/Post requests with SOA Test and receive the response back ? Or SOA test works only with SOAP requests ?
Tagged:

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    If you want to send request messages that are not SOAP, then you can use the HTTP Client tool. The HTTP Client tool has a button called Transport Properties. If you click on this button, it will open a panel that will let you choose between POST and GET. Let me know if you have more questions about this tool.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Thank you very much for the reply. It was helpful.

    I was able to use, HTTP Client tool and was able to send the HTTP messages with Get method.
    However, I was unable to use POST method.

    Following are the steps performed for HTTP Get method:
    1) Added HTTP Client tool: "Add output -> Request -> SOAP Envelope -> New Output -> HTTP Client
    2) Filled up the Name and Router as the URL.
    3) Used "URL parameters" button to provide the parameters to the URL
    4) Used "Transport Properties" button to use the "Get" method.
    5) Ran the test case and was able to see the traffic.
    6) Was able to create a regression control too.

    Please let me know if the above steps are correct.

    However, I am not sure what needs to be changed apart form chosing "POST" method in "Transport Properties"

    Thanks.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Instead of adding the HTTP Client to an existing SOAP Client, try adding a HTTP Client by itself. For instance,

    1) Right click on the test suite.
    2) Select Add Test->Standard Test->New Tool->HTTP Client.

    Then copy/paste the request into the HTTP Client. Let me know if this works.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    I was able to add HTTP Client Successfully. Thank you very much for your help. !!

    I was able to use HTTP-Get method to send and receive messages.
    However, was unsuccessful with HTTP-Post. I am not sure if anything needs to be changed apart form chosing "POST" method in "Transport Properties" ?
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Are there any error messages when you try using POST?
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    There are no error messages seen.

    Following are the steps performed:

    1) Added new HTTP Client (Add Test->Standard Test->New Tool->HTTP Client)
    2) Populated the Router.
    3) Added following URL Parameter:
    ClientCap=DummyClientCap

    4) Selected POST method, in the Transport Properties.
    5) Following are the request and response received:

    Request:
    POST /API/platform/httpdispatch.adp/IAppConfig?ClientCap=DummyClientCap HTTP/1.0
    Host: vidapi.dummy.com
    Content-Type: text/xml; charset=utf-8
    Content-Length: 2
    Cookie: MC_UNAUTH=1; RSP_DAEMON=f9b5f3aa87aa83de69d59e820c5627f1

    Response:
    Status code="BAD_CLIENT" comment="ClientCap: is not registered"

    NOTE: From the response, we can note that, the "ClientCap" string is not sent to the server.


    Following is the Request and Response when used HTTP - Get method.

    Request:
    GET /API/platform/httpdispatch.adp/IAppConfig?ClientCap=DummyClientCap HTTP/1.0
    Host: vidapi.dummy.com
    Cookie: MC_UNAUTH=1; RSP_DAEMON=f9be5f3aa87ae83d69d59e820c5627f1

    Response:
    Status code="BAD_CLIENT" comment="ClientCap: DummyClientCap is not registered

    Please note that the "ClientCap" String is sent to the server in this case.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    edited August 2006
    Once we chose, the "Text" radio button, MIME Type as "text/plain" and parameter as "ClientCap=DummyClientCap&", Request went through and we got the output expected !!

Tagged