Mule2, CXF and http chunking

This post is one of the series of posts about issues that occurred when we were using Mule2 in a real life project. One of the things we had to do with Mule is communicating with a web service. This seemed not to difficult for a tool like Mule that is just build for interaction with other systems. This turned out to be different. We decided to use the CXF transport that comes standard with Mule. However, the web server we were calling was only able to ‘speak’ via HTTP1.0 and therefor didn’t understand ‘chunking’. That led to the following error: cannot retry due to server authentication, in streaming mode
After lot of googling and searching I found this post that gave us an idea how to solve the problem. We decided to generate CFX client classes and create a Java client for our web service call. That Java class is then configured as a component in Mule. The Java class contains the HTTPConduit code as is stated in the post I mentioned. This got it to work. Afterwards I found another post that solves this same issue but in another way. I haven’t tried it but it looks nice because you don’t have to write any code, only some xml in the Mule config.
But the best solution would be if the supplied ‘cxf.xml’ config file is picked up by Mule in version 2.2.1 so you can arrange it there as it should be working (see some posts here and here about this issue).

About Pascal Alma

Pascal is a senior software developer and architect. Pascal has been designing and building applications since 2001. He is particularly interested in Open Source toolstack (Mule, Spring Framework, JBoss) and technologies like Web Services, SOA and Cloud technologies. Lately he is having great fun by building iOS apps with Swift. Specialties: JEE AWS XML/XSD/XSLT Web Services/SOA Mule ESB/ WSO2 ESB Maven Cloud Technology Swift/ iOS
This entry was posted in Mule and tagged , . Bookmark the permalink.