OpenFire Client webservice restfull client iphone

I would like your advice kindly. I would like to develop a chat for iphone using devices such as OpenFire server. I saw that there is a framwork for iphone to interact and connect to the server co OpenFire. Unfortunately, this framework is not easy to use. I was thinking of creating a webservice in java restfull to establish connections between clients. I wanted to know if this process kindly architecture and correctly? will be very slow? Thanks in advance for your advice.
schema.jpg

Do your iPhone clients interact with chat using XMPP?

If so, I suppose the connection layout might be as following:

Java services registers self as an external component for Openfire.

Chat clients connect to Openfire using appropriate “to” for identifying your Java component as recipient. So that Openfire automatically redirects request from PDA to Java server.

What was the reason for putting Java server between client and Openfire server?

Thanks for your help.
I wanted to use this architecture because the framework XMPPFramework for ios and very difficult for me. I decided to create a webservice in java to simplify communication between client and backend.
I just wanted to know if this architecture java webservice (backend) and ios client was possible.