On 7.7.2009, at 5:11,
metro@... wrote:
> 3. Create a metro.xml file and place in META-INF directory. You can
> put your TubeFactory implementation in client-side, endpoint-side or
> both.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <metro xmlns:xsi='
http://www.w3.org/2001/XMLSchema-instance' xmlns='
http://java.sun.com/xml/ns/metro/config'
> version="1.0">
> <tubelines default="#test-tubline">
> <tubeline name="test-tubeline">
> <client-side>
> <tube-factory className="test.CustomTubeFactory" />
> </client-side>
> <endpoint-side>
> <tube-factory className="test.CustomTubeFactory" />
> </endpoint-side>
> </tubeline>
> </tubelines>
> </metro>
>
> thats it.
There are two things you need to be aware of with this last step:
1. metro.xml and its content is not a public API yet and I can almost
100% guarantee that at least the file name will be changed in the
future. The reason is that we plan to consolidate all our
configuration files into a single one in one of the next releases
after Metro 2.0. We may also want to introduce relative positioning of
tubes in a tubeline as well.
2. With the tubeline definition above you are excluding all Metro
tubes from the tubeline ( => no validation, no WS-* feature
support ... ). The only tube in the tubeline will be your CustomTube.
If you wanted just to add your custom tube to the existing default
Metro tubeline definition (say, after WS-Addressing tube), you would
have to copy the default definition[1] and insert your tube factory at
any place in the tubeline you want it to have, like this:
<metro xmlns:xsi='
http://www.w3.org/2001/XMLSchema-instance' xmlns='
http://java.sun.com/xml/ns/metro/config' version="1.0">
<tubelines default="#test-tubline">
<tubeline name="test-tubline">
<client-side>
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.TerminalTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.HandlerTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.ValidationTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.MustUnderstandTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.MonitoringTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.AddressingTubeFactory" />
<tube-factory className="test.CustomTubeFactory" />
<tube-factory
className="com.sun.xml.ws.tx.runtime.TxTubeFactory" />
<tube-factory
className="com.sun.xml.ws.rx.rm.runtime.RmTubeFactory" />
<tube-factory
className="com.sun.xml.ws.rx.mc.runtime.McTubeFactory" />
<tube-factory
className="com.sun.xml.wss.provider.wsit.SecurityTubeFactory" />
<tube-factory
className="com.sun.xml.ws.rx.testing.PacketFilteringTubeFactory" />
<tube-factory
className="com.sun.xml.ws.dump.MessageDumpingTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.TransportTubeFactory" />
</client-side>
<endpoint-side>
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.TransportTubeFactory" />
<tube-factory
className="com.sun.xml.ws.dump.MessageDumpingTubeFactory" />
<tube-factory
className="com.sun.xml.ws.rx.testing.PacketFilteringTubeFactory" />
<tube-factory
className="com.sun.xml.wss.provider.wsit.SecurityTubeFactory" />
<tube-factory
className="com.sun.xml.ws.rx.mc.runtime.McTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.AddressingTubeFactory" />
<tube-factory className="test.CustomTubeFactory" />
<tube-factory
className="com.sun.xml.ws.rx.rm.runtime.RmTubeFactory" />
<tube-factory
className="com.sun.xml.ws.tx.runtime.TxTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.MonitoringTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.MustUnderstandTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.HandlerTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.ValidationTubeFactory" />
<tube-factory
className="com.sun.xml.ws.assembler.jaxws.TerminalTubeFactory" />
</endpoint-side>
</tubeline>
</tubelines>
</metro>
Btw. in case you are interested in the full format of metro.xml,
here's the current XSD schema with some documentation:
https://wsit.dev.java.net/source/browse/wsit/wsit/etc/schemas/config/metro.xsd?view=markupThanks,
Marek
[1] located in
https://wsit.dev.java.net/source/browse/*checkout*/wsit/wsit/etc/META-INF/metro-default.xml?content-type=text%2Fplain---------------------------------------------------------------------
To unsubscribe, e-mail:
users-unsubscribe@...
For additional commands, e-mail:
users-help@...