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 IT consultant and has been working in IT since 1997. He is monitoring the latest development in new technologies (Mobile, Cloud, Big Data) closely and particularly interested in Java open source tool stacks, cloud related technologies like AWS and mobile development like building iOS apps with Swift. Specialties: Java/JEE/Spring Amazon AWS API/REST Big Data Continuous Delivery Swift/iOS
This entry was posted in Mule and tagged , . Bookmark the permalink.