Wednesday, July 12, 2017

Error: ERROR:org.apache.http.conn.HttpHostConnectException: Connection to is refused



7/12/2017:

Tue Jun 27 15:49:49 IST- 2017:ERROR:org.apache.http.conn.HttpHostConnectException: Connection to <url> refused  ---- getting this errro while trying to connect using SOAP UI
1. Could be due to invalid request/header  
2. Firewall blocker  

yet to try the fix.

Thursday, October 29, 2015

Groovy Scripting

10/29/2015

Groovy Scripting –

Types of Testing using SOAP UI

10/29/2015

JSON

10/29/2015

- JSON is a format, which is used to represent a data.

Data start with curly braces in JSON.

Tool- SOAP UI

10/29/2015:

- Current version of the tool is 5.2.0
-
Steps to start testing Web Service:


  1. Create Project
  2. Add WSDL web service url for the service that you wanted to test
Note:Generally basic level difference between SOAP and REST based SOAP UI tool
1. If the web service is a SOAP then it will have Interface, if it is REST based then it will have               service.
2. Inside Interface you will have Operations (SOAP web services)
    And in Service you will have Resource (REST based web services)
3.  Inside Operations you have Requests. And then Request will have methods inside it.
     And inside Resource you have Methods. And inside Method you will see Request.
4. The methods that are available in SOAP are mostly get and set. Here the operations are going and       getting back the information.
    But in REST, it would be GET, POST, PUT, Delete, Head, Options, Trace and Patch
5. In SOAP you have Request , End Point and Response . 
    In REST - you input parameters instead of Input request. Similar to SOAP UI you can also send         xml along with your message. Set it to POST method and include any kind of XML(media type           window..) that you wanted to send.
6. SOAP based web services only handles XML based formats in the request.
    REST based accepts data of format XML, HTML, JSON and Rawdata...

7 . Request and Response:
SOAP:
Request and Response of SOAP based on service follows standard xml structure. Soap Envelop, Soap Header and Soap Body

Soap Body in the Request - is user defined. '?' in the Body means where you could provide your input.

In the Request you could see POST that means, SOAP uses POST method every time during the request and REST has many methods to use.


REST:
Update the parameter value in the request and then click on play button to execute.
In the Response you will have four types of formats to view the Response - XML, JSON, Raw, HTML. If you don't see response in XML format then you could change the format to view accordingly.

JSON format - starts with curly braces. Inside braces, you have 'responseData' that is a root node and then 'results'.




8. Executing the request is simple, just click on the play button once the request xml or parameters are ready.




Wednesday, October 28, 2015

REST based Web Service


10/29/2015

- REST(Representational State Transfer)  relies on stateless, client server, catchable communication protocol.REST is architectural style for designing web services.

SOAP based Web Service

10/29/2015:

- SOAP(Simple object Access Protocol) is simple XML based protocol to let applications exchange information over HTTP(which is a Transport protocol)

- It has its own way of defining web service, it has its own standards.

- It is a communication protocol for communication between applications. Is a format for sending messages

- It is designed to communicate via internet

- SOAP is platform and language independent

- SOAP is based on XML

- It is simple and extensible. Allows you to get around Firewalls

- A better way to communicate between applications is over HTTP because HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this.
SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.

-