Posts

Showing posts from February, 2013

How to configure soapUI to send HTTP chunked encoded requests

Image
soapUI makes use of Apache HttpClient (based on HTTPComponents project) as the client side HTTP implementation. When submitting requests using soapUI, you may have noticed that, the requests always send Content-Length HTTP header. You can find it out in the Raw View of the request editor. POST http://localhost:9000/services/SimpleStockQuoteService HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: text/xml;charset=UTF-8 SOAPAction: "urn:getQuote" User-Agent: Jakarta Commons-HttpClient/3.1 Host: localhost:9000 Content-Length: 416 In functional and non-functional testing, we usually need to test the servers by sending HTTP requests with both Content-Length as well as chunked transfer encoding. How can we configure soapUI to send chunked encoded requests instead of Content-Length? Step 1 Click on Global soapUI Preferences icon in the main tool bar (Or else, click on File --> Preferences) Step 2 HTTP Settings tab will be selected by default. You will notice

How to connect WSO2 ESB to Apache ActiveMQ using simple authentication

There are different types of pluggable authentication mechanisms provided by Apache ActiveMQ message broker. One of the quickest and easiest mechanisms is to use simple authentication . As the name implies, it is as simple as adding authentication details to ACTIVEMQ_HOME/conf/activemq-security.xml <plugins> <!-- Configure authentication; Username, passwords and groups --> <simpleAuthenticationPlugin> <users> <authenticationUser username= "system" password= "${activemq.password}" groups= "users,admins" /> <authenticationUser username= "user" password= "${guest.password}" groups= "users" /> <authenticationUser username= "guest" password= "${guest.password}" groups= "guests" /> </users> </si

How to preserve User-Agent HTTP header when messages passing through WSO2 ESB

When WSO2 ESB forwards a request to the back-end web service, ESB alters the User-Agent of the incoming request and sets it to Synapse-HttpComponent-NIO . Suppose, you want to avoid this and preserve User-Agent header sent by client. You can simply do it using the following method. Step 1 Open ESB_HOME/repository/conf/nhttp.properties file Step 2 Add the following property and save nhttp.properties file. http.user.agent.preserve=true Step 3 Restart ESB and send a HTTP request to ESB. Monitor the HTTP traffic between ESB and the back-end web service. You will see the User-Agent value is not altered by ESB. HTTP headers of the inbound request (client to ESB) POST http://localhost:8280/services/Axis2Proxy HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: text/xml;charset=UTF-8 SOAPAction: "urn:echoString" User-Agent: Jakarta Commons-HttpClient/3.1 Host: localhost:8280 Content-Length: 299 HTTP headers of the outbound request (ESB to back-end