Sending file from component

I’m trying to start a file transfer from a component to a user. When I send the iq type=“set” message it does not reach the client so I assume is openfire itself who is ansering with a 503 service-unavailable message.

Is this right? Why is openfire responding with the 503 error?

Can provide specific transmission packets do?

<iq type="set" id="324-32" from="user1@component.domain" to="user2@domain">
        <si xmlns="http://jabber.org/protocol/si" profile="http://jabber.org/protocol/si/profile/file-transfer" id="purple4a31803a">
                <file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="forticlientsslvpn.log" size="288"/>
                <feature xmlns="http://jabber.org/protocol/feature-neg">
                        <x xmlns="jabber:x:data" type="form">
                                <field var="stream-method" type="list-single">
                                        <option>
                                                <value>
                                                        http://jabber.org/protocol/bytestreams
                                                </value>
                                        </option>
                                        <option>
                                                <value>
                                                        http://jabber.org/protocol/ibb
                                                </value>
                                        </option>
                                </field>
                        </x>
                </feature>
        </si>
</iq>
<iq type="error" id="324-32" from="user2@domain" to="user1@component.domain">
        <si xmlns="http://jabber.org/protocol/si" profile="http://jabber.org/protocol/si/profile/file-transfer" id="purple4a31803a">
                <file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="forticlientsslvpn.log" size="288"/>
                <feature xmlns="http://jabber.org/protocol/feature-neg">
                        <x xmlns="jabber:x:data" type="form">
                                <field var="stream-method" type="list-single">
                                        <option>
                                                <value>
                                                        http://jabber.org/protocol/bytestreams
                                                </value>
                                        </option>
                                        <option>
                                                <value>
                                                        http://jabber.org/protocol/ibb
                                                </value>
                                        </option>
                                </field>
                        </x>
                </feature>
        </si>
        <error code="503" type="cancel">
                <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
        </error>
</iq>

Maybe it is important to add that I’m using the PacketRouter to send this message.

Well, I resolved my issue but I’m not sure that it is the best way to go.

The problem in fact was the PacketRouter who was rejecting my package because it did not have an IQHandler for the si messages.

I have found two ways of solving it:

  1. Use RoutingTable.routePacket() which bypasses PacketRouter and works
  2. Create an IQHandler for si and send the packetes from there using RoutingTable

I don’t see much difference besides that RoutingTable does not take into consideration the PacketInterceptors.

Any ideas?